summaryrefslogtreecommitdiff
path: root/libopie2/opieui/big-screen/owidgetstack.h
Side-by-side diff
Diffstat (limited to 'libopie2/opieui/big-screen/owidgetstack.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opieui/big-screen/owidgetstack.h7
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 @@
    : ..    .:,     . . . without even the implied warranty of
    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
..}^=.=       =       ; Library General Public License for more
++=   -.     .`     .: details.
 :     =  ...= . :.=-
 -.   .:....=;==+<; You should have received a copy of the GNU
  -_. . .   )=.  = Library General Public License along with
    --        :-=` this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#ifndef OWIDGETSTACK_H
#define OWIDGETSTACK_H
/* QT*/
#include <qframe.h>
#include <qmap.h>
class QWidgetStack;
-namespace Opie
-{
+namespace Opie {
+namespace Ui {
/**
*
* OWidgetStack is the answer to the problem of using Opie at different screen
* sizes and to have a different behaviour. Most applications use a QWidgetStack
* to supply a view on click. And by clicking the (X) you go back but this
* behaviour feels strange on bigger screens. It's ok on smaller one because
* one can't determine the difference.
* This stack reads the default out of the size of the desktop widget but
* can be forced to have either the one or the other behaviour.
* The first widget added is considered the 'main' widget and its
* sizeHint will be taking if in BigScreen mode.
* In small screen mode this widget behaves exactly like a QWidgetStack and in BigScreen
* mode it'll use the MainWindow as child of this widget and arranges the others as
* hidden top level widgets.
*
* @version 0.1
* @author hOlgAr F.
* @short Either a true stack or a list of top Level widgets
*/
class OWidgetStack : public QFrame {
Q_OBJECT
public:
enum Mode { SmallScreen, BigScreen, NoForce };
OWidgetStack( QWidget* parent, const char* name = 0, WFlags fl = 0 );
@@ -106,27 +106,28 @@ public slots:
void raiseWidget( QWidget* );
void hideWidget( int );
void hideWidget( QWidget* );
void setMainWindow( QWidget* );
void setMainWindow( int );
protected:
void resizeEvent( QResizeEvent* );
private:
void switchStack();
void switchTop();
QMap<int, QWidget*> m_list;
QWidgetStack *m_stack;
QWidget *m_mWidget;
QWidget *m_last;
enum Mode m_mode;
bool m_forced : 1;
struct Private;
Private *d;
};
-};
+}
+}
#endif