libyui-qt
Loading...
Searching...
No Matches
YQMainWinDock.h
1/*
2 Copyright (C) 2000-2012 Novell, Inc
3 This library is free software; you can redistribute it and/or modify
4 it under the terms of the GNU Lesser General Public License as
5 published by the Free Software Foundation; either version 2.1 of the
6 License, or (at your option) version 3.0 of the License. This library
7 is distributed in the hope that it will be useful, but WITHOUT ANY
8 WARRANTY; without even the implied warranty of MERCHANTABILITY or
9 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10 License for more details. You should have received a copy of the GNU
11 Lesser General Public License along with this library; if not, write
12 to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
13 Floor, Boston, MA 02110-1301 USA
14*/
15
16
17/*-/
18
19 File: YQMainWinDock.h
20
21 Author: Stefan Hundhammer <shundhammer@suse.de>
22
23/-*/
24
25
26#ifndef YQMainWinDock_h
27#define YQMainWinDock_h
28
29#include <deque>
30#include <qwidget.h>
31
32class QWidgetStack;
33class YQDialog;
34
35
52class YQMainWinDock : public QWidget
53{
54 friend class YQWizard;
55
56 Q_OBJECT
57
58public:
65 static YQMainWinDock * mainWinDock();
66
74 void add( YQDialog * dialog );
75
87 void remove( YQDialog * dialog = 0 );
88
93 YQDialog * topmostDialog() const;
94
99 bool couldDock();
100
106 virtual void show();
107
114 virtual void closeEvent( QCloseEvent * event );
115
116
117protected:
125
129 virtual ~YQMainWinDock();
130
136 virtual void paintEvent( QPaintEvent * event );
137
143 virtual void resizeEvent( QResizeEvent * event );
144
148 void resizeVisibleChild();
149
153 void setSideBarWidth( int width );
154
159 void activateCurrentDialog( bool active );
160
161
162protected slots:
163
167 void showCurrentDialog();
168
169
170private:
171
172 typedef std::deque<YQDialog *> YQWidgetStack;
173
178 YQWidgetStack::iterator findInStack( YQDialog * dialog );
179
183 void raiseDialog( YQDialog * dialog );
184
185
186 YQWidgetStack _widgetStack;
187 int _sideBarWidth;
188};
189
190
191#endif // YQMainWinDock_h
Definition YQDialog.h:47
Definition YQMainWinDock.h:53
virtual void show()
Definition YQMainWinDock.cc:124
void activateCurrentDialog(bool active)
Definition YQMainWinDock.cc:184
void setSideBarWidth(int width)
Definition YQMainWinDock.cc:312
YQDialog * topmostDialog() const
Definition YQMainWinDock.cc:266
static YQMainWinDock * mainWinDock()
Definition YQMainWinDock.cc:42
virtual ~YQMainWinDock()
Definition YQMainWinDock.cc:71
void remove(YQDialog *dialog=0)
Definition YQMainWinDock.cc:205
virtual void resizeEvent(QResizeEvent *event)
Definition YQMainWinDock.cc:78
void resizeVisibleChild()
Definition YQMainWinDock.cc:89
virtual void paintEvent(QPaintEvent *event)
Definition YQMainWinDock.cc:305
virtual void closeEvent(QCloseEvent *event)
Definition YQMainWinDock.cc:292
void add(YQDialog *dialog)
Definition YQMainWinDock.cc:132
bool couldDock()
Definition YQMainWinDock.cc:276
YQMainWinDock()
Definition YQMainWinDock.cc:53
void showCurrentDialog()
Definition YQMainWinDock.cc:177
Definition YQWizard.h:64