Diffstat (limited to 'libopie/big-screen/osplitter.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie/big-screen/osplitter.h | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/libopie/big-screen/osplitter.h b/libopie/big-screen/osplitter.h index db69fc6..2bcde57 100644 --- a/libopie/big-screen/osplitter.h +++ b/libopie/big-screen/osplitter.h | |||
@@ -33,6 +33,7 @@ | |||
33 | 33 | ||
34 | #include <qframe.h> | 34 | #include <qframe.h> |
35 | #include <qvaluelist.h> | 35 | #include <qvaluelist.h> |
36 | #include <qlist.h> | ||
36 | 37 | ||
37 | #include "obigscreen_p.h" | 38 | #include "obigscreen_p.h" |
38 | 39 | ||
@@ -67,15 +68,22 @@ public: | |||
67 | const char* name = 0, WFlags fl = 0 ); | 68 | const char* name = 0, WFlags fl = 0 ); |
68 | ~OSplitter(); | 69 | ~OSplitter(); |
69 | 70 | ||
71 | void setLabel( const QString& name ); | ||
72 | void setIconName( const QString& name ); | ||
73 | QString label()const; | ||
74 | QString iconName()const; | ||
75 | |||
70 | void setSizeChange( int width_height ); | 76 | void setSizeChange( int width_height ); |
71 | 77 | ||
78 | void addWidget( OSplitter* splitter ); | ||
72 | void addWidget( QWidget* wid, const QString& icon, const QString& label ); | 79 | void addWidget( QWidget* wid, const QString& icon, const QString& label ); |
73 | void removeWidget( QWidget* ); | 80 | void removeWidget( QWidget* ); |
81 | void removeWidget( OSplitter* ); | ||
74 | 82 | ||
75 | void setCurrentWidget( QWidget* ); | 83 | void setCurrentWidget( QWidget* ); |
76 | void setCurrentWidget( const QString& label ); | 84 | void setCurrentWidget( const QString& label ); |
77 | void setCurrentWidget( int ); | 85 | void setCurrentWidget( int ); |
78 | QWidget* currentWidget(); | 86 | QWidget* currentWidget()const; |
79 | 87 | ||
80 | signals: | 88 | signals: |
81 | /** | 89 | /** |
@@ -83,6 +91,16 @@ signals: | |||
83 | * | 91 | * |
84 | */ | 92 | */ |
85 | void currentChanged( QWidget* ); | 93 | void currentChanged( QWidget* ); |
94 | |||
95 | /** | ||
96 | * emitted whenever a border is crossed | ||
97 | * true if in small screen mode | ||
98 | * false if in bigscreen | ||
99 | * this signal is emitted after the layout switch | ||
100 | * @param b The layout mode | ||
101 | * @param ori The orientation | ||
102 | */ | ||
103 | void sizeChanged( bool b, Orientation ori); | ||
86 | public: | 104 | public: |
87 | // QSize sizeHint()const; | 105 | // QSize sizeHint()const; |
88 | // QSize minimumSizeHint()const; | 106 | // QSize minimumSizeHint()const; |
@@ -91,6 +109,10 @@ protected: | |||
91 | void resizeEvent( QResizeEvent* ); | 109 | void resizeEvent( QResizeEvent* ); |
92 | 110 | ||
93 | private: | 111 | private: |
112 | /* true if OTabMode */ | ||
113 | bool layoutMode()const; | ||
114 | // void reparentAll(); | ||
115 | void setTabWidget( OTabWidget*); | ||
94 | void addToTab( const Opie::OSplitterContainer& ); | 116 | void addToTab( const Opie::OSplitterContainer& ); |
95 | void addToBox( const Opie::OSplitterContainer& ); | 117 | void addToBox( const Opie::OSplitterContainer& ); |
96 | void removeFromTab( QWidget* ); | 118 | void removeFromTab( QWidget* ); |
@@ -100,10 +122,14 @@ private: | |||
100 | void commonChangeBox(); | 122 | void commonChangeBox(); |
101 | QHBox *m_hbox; | 123 | QHBox *m_hbox; |
102 | OTabWidget *m_tabWidget; | 124 | OTabWidget *m_tabWidget; |
125 | OTabWidget *m_parentTab; | ||
103 | Orientation m_orient; | 126 | Orientation m_orient; |
104 | int m_size_policy; | 127 | int m_size_policy; |
105 | 128 | ||
106 | ContainerList m_container; | 129 | ContainerList m_container; |
130 | QList<OSplitter> m_splitter; | ||
131 | |||
132 | QString m_icon, m_name; | ||
107 | 133 | ||
108 | struct Private; | 134 | struct Private; |
109 | Private *d; | 135 | Private *d; |