Files
Sourcetrail/src/lib_gui/qt/window/QtWindowStack.h
T
Andreas Stallinger 419a2e27ba ui: subwindow when resize mainwindow
* disable drop in qtlineedit
    fixes bug where when file is dropped in the lineedit with text,
    the the file will be added as text midst the existing text
* move message to start from script before layout loading so it will load right
(only when started without script on linux)
* center subwindow when mainwindow size changes
2017-06-08 20:42:32 +02:00

49 lines
748 B
C++

#ifndef QT_WINDOW_STACK
#define QT_WINDOW_STACK
#include <vector>
#include <QWidget>
class QtWindowStackElement
: public QWidget
{
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