mirror of https://github.com/PurpleI2P/i2pd-qt.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
568 B
28 lines
568 B
4 years ago
|
#ifndef WIDGETLOCKREGISTRY_H
|
||
|
#define WIDGETLOCKREGISTRY_H
|
||
|
|
||
|
#include <vector>
|
||
|
#include <widgetlock.h>
|
||
|
|
||
|
class widgetlockregistry {
|
||
|
std::vector<widgetlock*> locks;
|
||
|
|
||
|
public:
|
||
|
widgetlockregistry() : locks() {}
|
||
|
virtual ~widgetlockregistry() {}
|
||
|
void add(widgetlock* lock) {
|
||
|
locks.push_back(lock);
|
||
|
}
|
||
|
|
||
|
void deleteListeners() {
|
||
|
while(!locks.empty()) {
|
||
|
widgetlock* lock = locks.back();
|
||
|
lock->deleteListener();
|
||
|
delete lock;
|
||
|
locks.pop_back();
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
|
||
|
#endif // WIDGETLOCKREGISTRY_H
|