Diffstat (limited to 'libopie2/opieui/big-screen/owidgetstack.h') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opieui/big-screen/owidgetstack.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libopie2/opieui/big-screen/owidgetstack.h b/libopie2/opieui/big-screen/owidgetstack.h index 53818c8..d2f9a9f 100644 --- a/libopie2/opieui/big-screen/owidgetstack.h +++ b/libopie2/opieui/big-screen/owidgetstack.h | |||
@@ -14,50 +14,50 @@ | |||
14 | : .. .:, . . . without even the implied warranty of | 14 | : .. .:, . . . without even the implied warranty of |
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
17 | ..}^=.= = ; Library General Public License for more | 17 | ..}^=.= = ; Library General Public License for more |
18 | ++= -. .` .: details. | 18 | ++= -. .` .: details. |
19 | : = ...= . :.=- | 19 | : = ...= . :.=- |
20 | -. .:....=;==+<; You should have received a copy of the GNU | 20 | -. .:....=;==+<; You should have received a copy of the GNU |
21 | -_. . . )=. = Library General Public License along with | 21 | -_. . . )=. = Library General Public License along with |
22 | -- :-=` this library; see the file COPYING.LIB. | 22 | -- :-=` this library; see the file COPYING.LIB. |
23 | If not, write to the Free Software Foundation, | 23 | If not, write to the Free Software Foundation, |
24 | Inc., 59 Temple Place - Suite 330, | 24 | Inc., 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 25 | Boston, MA 02111-1307, USA. |
26 | 26 | ||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #ifndef OWIDGETSTACK_H | 29 | #ifndef OWIDGETSTACK_H |
30 | #define OWIDGETSTACK_H | 30 | #define OWIDGETSTACK_H |
31 | 31 | ||
32 | /* QT*/ | 32 | /* QT*/ |
33 | #include <qframe.h> | 33 | #include <qframe.h> |
34 | #include <qmap.h> | 34 | #include <qmap.h> |
35 | 35 | ||
36 | class QWidgetStack; | 36 | class QWidgetStack; |
37 | 37 | ||
38 | namespace Opie | 38 | namespace Opie { |
39 | { | 39 | namespace Ui { |
40 | /** | 40 | /** |
41 | * | 41 | * |
42 | * OWidgetStack is the answer to the problem of using Opie at different screen | 42 | * OWidgetStack is the answer to the problem of using Opie at different screen |
43 | * sizes and to have a different behaviour. Most applications use a QWidgetStack | 43 | * sizes and to have a different behaviour. Most applications use a QWidgetStack |
44 | * to supply a view on click. And by clicking the (X) you go back but this | 44 | * to supply a view on click. And by clicking the (X) you go back but this |
45 | * behaviour feels strange on bigger screens. It's ok on smaller one because | 45 | * behaviour feels strange on bigger screens. It's ok on smaller one because |
46 | * one can't determine the difference. | 46 | * one can't determine the difference. |
47 | * This stack reads the default out of the size of the desktop widget but | 47 | * This stack reads the default out of the size of the desktop widget but |
48 | * can be forced to have either the one or the other behaviour. | 48 | * can be forced to have either the one or the other behaviour. |
49 | * The first widget added is considered the 'main' widget and its | 49 | * The first widget added is considered the 'main' widget and its |
50 | * sizeHint will be taking if in BigScreen mode. | 50 | * sizeHint will be taking if in BigScreen mode. |
51 | * In small screen mode this widget behaves exactly like a QWidgetStack and in BigScreen | 51 | * In small screen mode this widget behaves exactly like a QWidgetStack and in BigScreen |
52 | * mode it'll use the MainWindow as child of this widget and arranges the others as | 52 | * mode it'll use the MainWindow as child of this widget and arranges the others as |
53 | * hidden top level widgets. | 53 | * hidden top level widgets. |
54 | * | 54 | * |
55 | * @version 0.1 | 55 | * @version 0.1 |
56 | * @author hOlgAr F. | 56 | * @author hOlgAr F. |
57 | * @short Either a true stack or a list of top Level widgets | 57 | * @short Either a true stack or a list of top Level widgets |
58 | */ | 58 | */ |
59 | class OWidgetStack : public QFrame { | 59 | class OWidgetStack : public QFrame { |
60 | Q_OBJECT | 60 | Q_OBJECT |
61 | public: | 61 | public: |
62 | enum Mode { SmallScreen, BigScreen, NoForce }; | 62 | enum Mode { SmallScreen, BigScreen, NoForce }; |
63 | OWidgetStack( QWidget* parent, const char* name = 0, WFlags fl = 0 ); | 63 | OWidgetStack( QWidget* parent, const char* name = 0, WFlags fl = 0 ); |
@@ -106,27 +106,28 @@ public slots: | |||
106 | void raiseWidget( QWidget* ); | 106 | void raiseWidget( QWidget* ); |
107 | void hideWidget( int ); | 107 | void hideWidget( int ); |
108 | void hideWidget( QWidget* ); | 108 | void hideWidget( QWidget* ); |
109 | void setMainWindow( QWidget* ); | 109 | void setMainWindow( QWidget* ); |
110 | void setMainWindow( int ); | 110 | void setMainWindow( int ); |
111 | 111 | ||
112 | protected: | 112 | protected: |
113 | void resizeEvent( QResizeEvent* ); | 113 | void resizeEvent( QResizeEvent* ); |
114 | 114 | ||
115 | private: | 115 | private: |
116 | void switchStack(); | 116 | void switchStack(); |
117 | void switchTop(); | 117 | void switchTop(); |
118 | QMap<int, QWidget*> m_list; | 118 | QMap<int, QWidget*> m_list; |
119 | QWidgetStack *m_stack; | 119 | QWidgetStack *m_stack; |
120 | QWidget *m_mWidget; | 120 | QWidget *m_mWidget; |
121 | QWidget *m_last; | 121 | QWidget *m_last; |
122 | 122 | ||
123 | enum Mode m_mode; | 123 | enum Mode m_mode; |
124 | bool m_forced : 1; | 124 | bool m_forced : 1; |
125 | 125 | ||
126 | struct Private; | 126 | struct Private; |
127 | Private *d; | 127 | Private *d; |
128 | }; | 128 | }; |
129 | 129 | ||
130 | }; | 130 | } |
131 | } | ||
131 | 132 | ||
132 | #endif | 133 | #endif |