Files
Sourcetrail/src/lib_gui/qt/window/QtWindowStack.h
T
Andreas Stallinger 37ead804bf src: clazy compiler warnings
get rid of most clazy warnings (https://github.com/KDE/clazy)
* range loop use refs
* qcolor ctor with ints
* missing Q_OBJECT macro
* use .constfirst instead of .first

enabled ccache for unix systems for fasterr recompiling
* if ccache is in path we use it now
2017-08-10 09:45:55 +02:00

50 lines
758 B
C++

#ifndef QT_WINDOW_STACK
#define QT_WINDOW_STACK
#include <vector>
#include <QWidget>
class QtWindowStackElement
: public QWidget
{
Q_OBJECT
public:
QtWindowStackElement(QWidget* parent = nullptr);
virtual void showWindow() = 0;
virtual void hideWindow() = 0;
};
class QtWindowStack
: public QObject
{
Q_OBJECT
signals:
void empty();
void pop();
void push();
public:
QtWindowStack(QObject* parent = nullptr);
QtWindowStackElement* getTopWindow();
QtWindowStackElement* getBottomWindow();
size_t getWindowCount();
void centerSubWindows();
public slots:
void pushWindow(QtWindowStackElement* window);
void popWindow();
void clearWindows();
private:
std::vector<QtWindowStackElement*> m_stack;
};
#endif // QT_WINDOW_STACK