summaryrefslogtreecommitdiff
path: root/libopie/big-screen/osplitter.h
authorzecke <zecke>2004-03-05 22:58:06 (UTC)
committer zecke <zecke>2004-03-05 22:58:06 (UTC)
commitb4ec902435df4e3c834b7790c1dc70a235157477 (patch) (unidiff)
tree56f855525c3da4ca9efd02c148a967a41cc4cdcb /libopie/big-screen/osplitter.h
parent3dd27f86cf3865b771258d80048190e0ef6c3177 (diff)
downloadopie-b4ec902435df4e3c834b7790c1dc70a235157477.zip
opie-b4ec902435df4e3c834b7790c1dc70a235157477.tar.gz
opie-b4ec902435df4e3c834b7790c1dc70a235157477.tar.bz2
Big Screen Extensions should only be in the new LIBOPIEUI2.
We can remove it without risking binary incompatible as these classes were not in the 1.0 API release
Diffstat (limited to 'libopie/big-screen/osplitter.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/big-screen/osplitter.h146
1 files changed, 0 insertions, 146 deletions
diff --git a/libopie/big-screen/osplitter.h b/libopie/big-screen/osplitter.h
deleted file mode 100644
index 61a247b..0000000
--- a/libopie/big-screen/osplitter.h
+++ b/dev/null
@@ -1,146 +0,0 @@
1/*
2               =. This file is part of the OPIE Project
3             .=l. Copyright (c) 2003 hOlgAr <zecke@handhelds.org>
4           .>+-=
5 _;:,     .>    :=|. This library is free software; you can
6.> <`_,   >  .   <= redistribute it and/or modify it under
7:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
8.="- .-=="i,     .._ License as published by the Free Software
9 - .   .-<_>     .<> Foundation; either version 2 of the License,
10     ._= =}       : or (at your option) any later version.
11    .%`+i>       _;_.
12    .i_,=:_.      -<s. This library is distributed in the hope that
13     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
14    : ..    .:,     . . . without even the implied warranty of
15    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
16  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
17..}^=.=       =       ; Library General Public License for more
18++=   -.     .`     .: details.
19 :     =  ...= . :.=-
20 -.   .:....=;==+<; You should have received a copy of the GNU
21  -_. . .   )=.  = Library General Public License along with
22    --        :-=` this library; see the file COPYING.LIB.
23 If not, write to the Free Software Foundation,
24 Inc., 59 Temple Place - Suite 330,
25 Boston, MA 02111-1307, USA.
26
27*/
28
29#ifndef OPIE_SPLITTER_H
30#define OPIE_SPLITTER_H
31
32#include <qstring.h>
33
34#include <qframe.h>
35#include <qvaluelist.h>
36#include <qlist.h>
37
38#include "obigscreen_p.h"
39
40/* forward declarations */
41class OTabWidget;
42class QHBox;
43//template class QValueList<Opie::OSplitterContainer>;
44
45/*
46 * TODO
47 * -check API docu
48 * -one more example
49 * -allow inserting at a position
50 */
51
52/**
53 *
54 * If you've widgets that could be placed side by side but you think
55 * on small resolutions is not enough place but it would really make sense
56 * on bigger resolutions this class will help you.
57 * You can add as many widgets you want to it. Set a poliy on which width/height it
58 * should switch the layout.
59 * You can either say to place widgets vertical or horizontal.
60 * This class uses QHBox, QVBox and QTAbWidget internally.
61 * OSplitter takes ownership of the widgets
62 *
63 * @since 1.2
64 *
65 * @short a small dynamically changing its layout to store two or more widgets side by side
66 * @version 0.1
67 * @author zecke
68 */
69class OSplitter : public QFrame{
70 Q_OBJECT
71public:
72 typedef QValueList<Opie::OSplitterContainer> ContainerList;
73 OSplitter( Qt::Orientation = Horizontal, QWidget *parent = 0,
74 const char* name = 0, WFlags fl = 0 );
75 ~OSplitter();
76
77 void setLabel( const QString& name );
78 void setIconName( const QString& name );
79 QString label()const;
80 QString iconName()const;
81
82 void setSizeChange( int width_height );
83
84 void addWidget( OSplitter* splitter );
85 void addWidget( QWidget* wid, const QString& icon, const QString& label );
86 void removeWidget( QWidget* );
87 void removeWidget( OSplitter* );
88
89 void setCurrentWidget( QWidget* );
90 void setCurrentWidget( const QString& label );
91 void setCurrentWidget( int );
92 QWidget* currentWidget()const;
93
94
95signals:
96 /**
97 * Emitted if in tab and comes directly from the tab widget
98 *
99 */
100 void currentChanged( QWidget* );
101
102 /**
103 * emitted whenever a border is crossed
104 * true if in small screen mode
105 * false if in bigscreen
106 * this signal is emitted after the layout switch
107 * @param b The layout mode
108 * @param ori The orientation
109 */
110 void sizeChanged( bool b, Orientation ori);
111public:
112// QSize sizeHint()const;
113// QSize minimumSizeHint()const;
114
115protected:
116 void resizeEvent( QResizeEvent* );
117
118private:
119 /* true if OTabMode */
120 bool layoutMode()const;
121// void reparentAll();
122 void setTabWidget( OTabWidget*);
123 void addToTab( const Opie::OSplitterContainer& );
124 void addToBox( const Opie::OSplitterContainer& );
125 void removeFromTab( QWidget* );
126 void changeTab();
127 void changeHBox();
128 void changeVBox();
129 void commonChangeBox();
130 QHBox *m_hbox;
131 OTabWidget *m_tabWidget;
132 OTabWidget *m_parentTab;
133 Orientation m_orient;
134 int m_size_policy;
135
136 ContainerList m_container;
137 QList<OSplitter> m_splitter;
138
139 QString m_icon, m_name;
140
141 struct Private;
142 Private *d;
143};
144
145
146#endif