summaryrefslogtreecommitdiff
path: root/libopie2/opieui/big-screen
Side-by-side diff
Diffstat (limited to 'libopie2/opieui/big-screen') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opieui/big-screen/obigscreen_p.h9
-rw-r--r--libopie2/opieui/big-screen/osplitter.cpp13
-rw-r--r--libopie2/opieui/big-screen/osplitter.h15
-rw-r--r--libopie2/opieui/big-screen/owidgetstack.cpp9
-rw-r--r--libopie2/opieui/big-screen/owidgetstack.h7
5 files changed, 31 insertions, 22 deletions
diff --git a/libopie2/opieui/big-screen/obigscreen_p.h b/libopie2/opieui/big-screen/obigscreen_p.h
index db8fc83..a85a56c 100644
--- a/libopie2/opieui/big-screen/obigscreen_p.h
+++ b/libopie2/opieui/big-screen/obigscreen_p.h
@@ -3,14 +3,15 @@
/* QT */
#include <qstring.h>
class QWidget;
-namespace Opie
-{
+namespace Opie {
+namespace Ui {
+namespace Private{
struct OSplitterContainer
{
bool operator==( const OSplitterContainer& o) const
{
if (widget != o.widget ) return false;
@@ -20,9 +21,11 @@ struct OSplitterContainer
}
QWidget* widget;
QString icon;
QString name;
};
-};
+}
+}
+}
#endif
diff --git a/libopie2/opieui/big-screen/osplitter.cpp b/libopie2/opieui/big-screen/osplitter.cpp
index 89f3793..bcfd3a6 100644
--- a/libopie2/opieui/big-screen/osplitter.cpp
+++ b/libopie2/opieui/big-screen/osplitter.cpp
@@ -32,13 +32,14 @@
#include <opie2/otabwidget.h>
/* QT */
#include <qvaluelist.h>
#include <qvbox.h>
-using namespace Opie;
+using namespace Opie::Ui;
+using namespace Opie::Ui::Private;
/**
*
* This is the constructor of OSplitter
* You might want to call setSizeChange to tell
* OSplitter to change its layout when a specefic
@@ -165,13 +166,13 @@ void OSplitter::addWidget( OSplitter* split )
* set tab widget
*/
if (m_tabWidget )
setTabWidget( m_parentTab );
else
{
- Opie::OSplitterContainer con;
+ OSplitterContainer con;
con.widget =split;
addToBox( con );
}
}
/*
@@ -210,13 +211,13 @@ void OSplitter::addWidget( QWidget* wid, const QString& icon, const QString& lab
if (!wid )
{
qWarning("Widget is not valid!");
return;
}
#endif
- Opie::OSplitterContainer cont;
+ OSplitterContainer cont;
cont.widget = wid;
cont.icon =icon;
cont.name = label;
m_container.append( cont );
@@ -393,13 +394,13 @@ void OSplitter::resizeEvent( QResizeEvent* res )
}
/*
* Adds a container to a tab either the parent tab
* or our own
*/
-void OSplitter::addToTab( const Opie::OSplitterContainer& con )
+void OSplitter::addToTab( const Opie::Ui::Private::OSplitterContainer& con )
{
QWidget *wid = con.widget;
// not needed widgetstack will reparent as well wid.reparent(m_tabWidget, wid->getWFlags(), QPoint(0, 0) );
if (m_parentTab )
m_parentTab->addTab( wid, con.icon, con.name );
else
@@ -407,13 +408,13 @@ void OSplitter::addToTab( const Opie::OSplitterContainer& con )
}
/*
* adds a container to the box
*/
-void OSplitter::addToBox( const Opie::OSplitterContainer& con )
+void OSplitter::addToBox( const Opie::Ui::Private::OSplitterContainer& con )
{
QWidget* wid = con.widget;
wid->reparent(m_hbox, 0, QPoint(0, 0) );
}
@@ -542,13 +543,13 @@ void OSplitter::commonChangeBox()
addToBox( (*it) );
}
for ( OSplitter* split = m_splitter.first(); split; split = m_splitter.next() )
{
/* tell them the world had changed */
split->setTabWidget( 0 );
- Opie::OSplitterContainer con;
+ OSplitterContainer con;
con.widget = split;
// con.widget = split->m_tabWidget ? static_cast<QWidget*>(split->m_tabWidget)
// : static_cast<QWidget*>(split->m_hbox);
addToBox( con );
}
diff --git a/libopie2/opieui/big-screen/osplitter.h b/libopie2/opieui/big-screen/osplitter.h
index 2daae7f..7b5ea53 100644
--- a/libopie2/opieui/big-screen/osplitter.h
+++ b/libopie2/opieui/big-screen/osplitter.h
@@ -20,13 +20,13 @@
 -.   .:....=;==+<; 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 OSPLITTER_H
#define OSPLITTER_H
#include "obigscreen_p.h"
@@ -45,14 +45,14 @@ class QHBox;
* TODO
* -check API docu
* -one more example
* -allow inserting at a position
*/
-namespace Opie
-{
+namespace Opie{
+namespace Ui {
class OTabWidget;
/**
*
* If you've widgets that could be placed side by side but you think
* on small resolutions is not enough place but it would really make sense
@@ -70,13 +70,13 @@ class OTabWidget;
* @author zecke
*/
class OSplitter : public QFrame
{
Q_OBJECT
public:
- typedef QValueList<Opie::OSplitterContainer> ContainerList;
+ typedef QValueList<Opie::Ui::Private::OSplitterContainer> ContainerList;
OSplitter( Qt::Orientation = Horizontal, QWidget *parent = 0,
const char* name = 0, WFlags fl = 0 );
~OSplitter();
void setLabel( const QString& name );
void setIconName( const QString& name );
@@ -121,14 +121,14 @@ protected:
private:
/* true if OTabMode */
bool layoutMode()const;
// void reparentAll();
void setTabWidget( OTabWidget*);
- void addToTab( const Opie::OSplitterContainer& );
- void addToBox( const Opie::OSplitterContainer& );
+ void addToTab( const Opie::Ui::Private::OSplitterContainer& );
+ void addToBox( const Opie::Ui::Private::OSplitterContainer& );
void removeFromTab( QWidget* );
void changeTab();
void changeHBox();
void changeVBox();
void commonChangeBox();
QHBox *m_hbox;
@@ -142,9 +142,10 @@ private:
QString m_icon, m_name;
struct Private;
Private *d;
};
-};
+}
+}
#endif
diff --git a/libopie2/opieui/big-screen/owidgetstack.cpp b/libopie2/opieui/big-screen/owidgetstack.cpp
index 57e97e3..a0a6355 100644
--- a/libopie2/opieui/big-screen/owidgetstack.cpp
+++ b/libopie2/opieui/big-screen/owidgetstack.cpp
@@ -29,17 +29,17 @@
#include "owidgetstack.h"
/* QT */
#include <qapplication.h>
#include <qwidgetstack.h>
-namespace {
+namespace Opie {
+namespace Ui {
const int mode_size = 330;
-}
-using namespace Opie;
+
/**
* This is the standard widget. For simple usage see the example. Normally this widget
* is the central widget of a QMainWindow.
* Use removeWidget before you delete a widget yourself. OWidgetStack does not
* yet recognize removal of children.
@@ -430,6 +430,9 @@ void OWidgetStack::switchTop() {
}
}
delete m_stack;
m_stack = 0;
}
+
+}
+} \ No newline at end of file
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
@@ -32,14 +32,14 @@
/* 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
@@ -124,9 +124,10 @@ private:
bool m_forced : 1;
struct Private;
Private *d;
};
-};
+}
+}
#endif