summaryrefslogtreecommitdiff
path: root/libopie2/examples/opieui
Side-by-side diff
Diffstat (limited to 'libopie2/examples/opieui') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/examples/opieui/olistviewdemo/main.cpp3
-rw-r--r--libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp2
-rw-r--r--libopie2/examples/opieui/olistviewdemo/olistviewdemo.h2
-rw-r--r--libopie2/examples/opieui/osplitter_example/osplitter_example.cpp3
-rw-r--r--libopie2/examples/opieui/osplitter_example/osplitter_example.h1
-rw-r--r--libopie2/examples/opieui/osplitter_example/osplitter_mail.cpp8
-rw-r--r--libopie2/examples/opieui/osplitter_example/osplitter_mail.h6
-rw-r--r--libopie2/examples/opieui/oversatileviewdemo/main.cpp3
-rw-r--r--libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp8
-rw-r--r--libopie2/examples/opieui/oversatileviewdemo/opieuidemo.h6
-rw-r--r--libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.cpp2
-rw-r--r--libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.h26
-rw-r--r--libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.cpp2
-rw-r--r--libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.h3
14 files changed, 45 insertions, 30 deletions
diff --git a/libopie2/examples/opieui/olistviewdemo/main.cpp b/libopie2/examples/opieui/olistviewdemo/main.cpp
index a93f361..cd49c28 100644
--- a/libopie2/examples/opieui/olistviewdemo/main.cpp
+++ b/libopie2/examples/opieui/olistviewdemo/main.cpp
@@ -1,26 +1,29 @@
/**********************************************************************
** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved.
**
** This file is part of Opie Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
**********************************************************************/
#include "olistviewdemo.h"
#include <opie2/oapplication.h>
+using namespace Opie::Ui;
+using namespace Opie::Core;
+
int main( int argc, char **argv )
{
OApplication a( argc, argv, "OListViewDemo" );
OListViewDemo e;
a.showMainWidget(&e);
return a.exec();
}
diff --git a/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp
index 5ba7b69..7834b3b 100644
--- a/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp
+++ b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp
@@ -16,48 +16,50 @@
    .i_,=:_.      -<s. This program is distributed in the hope that
     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
    : ..    .:,     . . . 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.
*/
#include "olistviewdemo.h"
#include <opie2/olistview.h>
#include <qstring.h>
#include <qpixmap.h>
#include <qlistview.h>
+using namespace Opie::Ui;
+
OListViewDemo::OListViewDemo( QWidget* parent, const char* name, WFlags f )
:QVBox( parent, name, f )
{
lv = new ONamedListView( this );
lv->setRootIsDecorated( true );
lv->addColumns( QStringList::split( ' ', "Column1 Column2 Column3 Column4" ) );
ONamedListViewItem* item = new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) );
item->setText( "Column2", "ModifiedText" );
item->setText( "Column5", "ThisColumnDoesNotExits" );
new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) );
new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) );
new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Minni" ) );
item = new ONamedListViewItem( lv, QStringList::split( ' ', "XXX YYY ZZZ ***" ) );
new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) );
new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) );
new ONamedListViewItem( item, QStringList::split( ' ', "SubText1 Text2 Text3 Text4" ) );
new ONamedListViewItem( item, QStringList::split( ' ', "SubText1 Text2 Text3 Text4" ) );
new ONamedListViewItem( item, QStringList::split( ' ', "SubText1 Text2 Text3 Text4" ) );
item = new ONamedListViewItem( item, QStringList::split( ' ', "Text1 Text2 Text3 HereItComes" ) );
item = new ONamedListViewItem( item, QStringList::split( ' ', "Text1 Text2 Text3 HereItComesSoon" ) );
item = new ONamedListViewItem( item, QStringList::split( ' ', "Text1 Text2 Text3 Mickey" ) );
diff --git a/libopie2/examples/opieui/olistviewdemo/olistviewdemo.h b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.h
index 8a5986a..0b5c498 100644
--- a/libopie2/examples/opieui/olistviewdemo/olistviewdemo.h
+++ b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.h
@@ -23,29 +23,29 @@
 -.   .:....=;==+<; 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 OLISTVIEWDEMO_H
#define OLISTVIEWDEMO_H
#include <qvbox.h>
#include <opie2/olistview.h>
class OListViewDemo: public QVBox
{
Q_OBJECT
public:
OListViewDemo( QWidget* parent=0, const char* name=0, WFlags f=0 );
virtual ~OListViewDemo();
private:
- ONamedListView* lv;
+ Opie::Ui::ONamedListView* lv;
};
#endif
diff --git a/libopie2/examples/opieui/osplitter_example/osplitter_example.cpp b/libopie2/examples/opieui/osplitter_example/osplitter_example.cpp
index 7ba0f0d..4a1468d 100644
--- a/libopie2/examples/opieui/osplitter_example/osplitter_example.cpp
+++ b/libopie2/examples/opieui/osplitter_example/osplitter_example.cpp
@@ -1,32 +1,33 @@
#include "osplitter_example.h"
/* OPIE */
#include <opie2/osplitter.h>
+#include <opie2/ofileselector.h>
#include <qpe/qpeapplication.h>
#include <opie2/oapplicationfactory.h>
/* QT*/
#include <qdir.h>
#include <qlayout.h>
-using namespace Opie;
+using namespace Opie::Ui;
OPIE_EXPORT_APP( OApplicationFactory<OSplitterExample> )
OSplitterExample::OSplitterExample( QWidget *w,const char* n,WFlags f )
: QWidget( w, n, f ){
QVBoxLayout * lay = new QVBoxLayout(this);
OSplitter * splitter = new OSplitter( Horizontal, this );
lay->addWidget( splitter );
OFileSelector *selector = new OFileSelector( splitter, OFileSelector::FileSelector,
OFileSelector::Normal, QDir::homeDirPath(),
QString::null );
splitter->addWidget( selector, "zoom", tr("Selector 1") );
selector = new OFileSelector( splitter, OFileSelector::FileSelector, OFileSelector::Normal,
QDir::homeDirPath(), QString::null );
splitter->addWidget( selector, "zoom", tr("Selector 2") );
}
diff --git a/libopie2/examples/opieui/osplitter_example/osplitter_example.h b/libopie2/examples/opieui/osplitter_example/osplitter_example.h
index 176ad62..0cf28aa 100644
--- a/libopie2/examples/opieui/osplitter_example/osplitter_example.h
+++ b/libopie2/examples/opieui/osplitter_example/osplitter_example.h
@@ -1,20 +1,19 @@
/*
* May be used, copied and modified wihtout any limitation
*/
#ifndef OSPlitter_EXAMPLE_H
#define OSPlitter_EXAMPLE_H
#include <qvbox.h>
-#include <opie2/ofileselector.h>
class OSplitterExample : public QWidget {
Q_OBJECT
public:
static QString appName() { return QString::fromLatin1("osplitter_example"); }
OSplitterExample( QWidget *parent, const char* name, WFlags fl );
};
#endif
diff --git a/libopie2/examples/opieui/osplitter_example/osplitter_mail.cpp b/libopie2/examples/opieui/osplitter_example/osplitter_mail.cpp
index 789496c..6443dc0 100644
--- a/libopie2/examples/opieui/osplitter_example/osplitter_mail.cpp
+++ b/libopie2/examples/opieui/osplitter_example/osplitter_mail.cpp
@@ -1,58 +1,60 @@
#include <qstring.h>
#include <qlabel.h>
#include <qheader.h>
#include <qlayout.h>
#include <qpe/qpeapplication.h>
#include <opie2/oapplicationfactory.h>
#include "osplitter_mail.h"
+using namespace Opie::Ui;
+
OPIE_EXPORT_APP( OApplicationFactory<ListViews> )
class Folder {
int dummy;
};
// -----------------------------------------------------------------
ListViews::ListViews( QWidget* p, const char* name, WFlags fl )
: QWidget( p, name, fl ) {
qApp->installEventFilter( this );
m_lstFolders.setAutoDelete( true );
QHBoxLayout *lay = new QHBoxLayout(this);
m_splitter = new OSplitter( Horizontal, this, "SPlitter 1" );
lay->addWidget( m_splitter );
- connect(m_splitter, SIGNAL(sizeChange(bool,const QSize&) ),
- this, SLOT(slotSizeChange(bool,const QSize&) ) );
+ connect(m_splitter, SIGNAL(sizeChanged(bool,Orientation) ),
+ this, SLOT(slotSizeChange(bool,Orientation) ) );
m_overview = new QListView( m_splitter );
m_overview->header()->setClickEnabled( FALSE );
m_overview->addColumn( tr("Folder") );
- m_overview->setMaximumWidth( 200 );
+// m_overview->setMaximumWidth( 200 );
m_splitter->addWidget( m_overview, "zoom", tr("Folder Overview") );
m_splitter->setSizeChange( 300 );
/* OSplitter starts with the small mode */
m_messages = 0;
m_message = m_attach = 0;
splitti = new OSplitter( Vertical, m_splitter, "Splitti2" );
splitti->setSizeChange( 300 );
splitti->setSizePolicy( QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding ) );
QLabel *lbl = new QLabel(splitti);
lbl->setTextFormat ( Qt::RichText );
lbl->setText("<br><br><b>Test Test Test</b><br><br><p>Fooooo hjhh</p>");
m_messages = new QListView( splitti );
m_messages->addColumn(" Messages ");
folder1 = new QListView( splitti );
folder1->addColumn( "Messages 2 " );
splitti->addWidget(m_messages, "mail", tr("Mails") );
splitti->addWidget(folder1, "folder", tr("Folder") );
splitti->addWidget( lbl, "logo", tr("Label") );
diff --git a/libopie2/examples/opieui/osplitter_example/osplitter_mail.h b/libopie2/examples/opieui/osplitter_example/osplitter_mail.h
index 1447a92..67961fb 100644
--- a/libopie2/examples/opieui/osplitter_example/osplitter_mail.h
+++ b/libopie2/examples/opieui/osplitter_example/osplitter_mail.h
@@ -1,53 +1,51 @@
/*
* You may use, modify and distribute this code without any limitation
*/
/*
* Header file for a more complete email client like
* layout
*/
#ifndef OPIE_SPLITTER_MAIL_EXAMPLE_H
#define OPIE_SPLITTER_MAIL_EXAMPLE_H
#include <qwidget.h>
#include <qlist.h>
#include <qlistview.h>
#include <opie2/osplitter.h>
-using Opie::OSplitter;
class Folder;
class QLabel;
-class OSplitter;
class ListViews : public QWidget {
Q_OBJECT
public:
static QString appName() { return QString::fromLatin1("osplitter-mail"); }
ListViews( QWidget* parent, const char * name, WFlags fl );
~ListViews();
bool eventFilter( QObject* , QEvent* );
private:
void initFolders();
void initFolder( Folder *folder, unsigned int &count );
QListView *m_messages, *m_overview;
QLabel *m_message, *m_attach;
QList<QListView> m_folders; // used in tab mode
QList<Folder> m_lstFolders;
bool m_mode : 1; // bitfield
- OSplitter *m_splitter;
- OSplitter *splitti;
+ Opie::Ui::OSplitter *m_splitter;
+ Opie::Ui::OSplitter *splitti;
QListView *folder1;
#if 0
//private slots:
// void slotFolderChanged( QListViewItem* );
// void slotMessageChanged();
// void slotSizeChange( bool, const QSize& );
#endif
};
#endif
diff --git a/libopie2/examples/opieui/oversatileviewdemo/main.cpp b/libopie2/examples/opieui/oversatileviewdemo/main.cpp
index d8c01a4..bcda14c 100644
--- a/libopie2/examples/opieui/oversatileviewdemo/main.cpp
+++ b/libopie2/examples/opieui/oversatileviewdemo/main.cpp
@@ -1,29 +1,32 @@
/**********************************************************************
** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved.
**
** This file is part of Opie Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
**********************************************************************/
#include "opieuidemo.h"
#include <opie2/oapplication.h>
+using namespace Opie::Core;
+using namespace Opie::Ui;
+
int main( int argc, char **argv )
{
OApplication a( argc, argv, "Opie UI Demo" );
qDebug( "." );
OpieUIDemo e;
qDebug( "." );
a.showMainWidget(&e);
qDebug( "." );
return a.exec();
}
diff --git a/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp b/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp
index 0d8bc9f..754a744 100644
--- a/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp
+++ b/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp
@@ -4,74 +4,72 @@
** This file is part of Opie Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
***********************************************************************/
// Qt
#include <qcolor.h>
#include <qpopupmenu.h>
#include <qmenubar.h>
#include <qmessagebox.h>
#include <qvbox.h>
#include <qstring.h>
#include <qstringlist.h>
// Qtopia
-#ifdef QWS
#include <qpe/qpeapplication.h>
#include <qpe/global.h>
-#endif
// Opie
-#ifdef QWS
#include <opie2/odevice.h>
-using namespace Opie;
-#endif
#include <opie2/ocompletionbox.h>
#include <opie2/olineedit.h>
#include <opie2/ocombobox.h>
#include <opie2/oeditlistbox.h>
#include <opie2/oselector.h>
#include <opie2/opopupmenu.h>
#include <qtabwidget.h>
#include "oversatileviewdemo.h"
// Local
#include "opieuidemo.h"
+using namespace Opie::Core;
+using namespace Opie::Ui;
+
enum Demos { ocompletionbox, olineedit, ocombobox, oeditlistbox, oselector };
OpieUIDemo::OpieUIDemo( QWidget* parent, const char* name, WFlags fl )
: QMainWindow( parent, name, fl )
{
QMenuBar* mbar = this->menuBar();
OPopupMenu* demo = new OPopupMenu( this );
demo->setTitle( "Title" );
demo->setItemParameter( demo->insertItem( "OCompletionBox", this, SLOT( demo(int) ) ), ocompletionbox );
demo->setItemParameter( demo->insertItem( "OLineEdit", this, SLOT( demo(int) ) ), olineedit );
demo->setItemParameter( demo->insertItem( "OComboBox", this, SLOT( demo(int) ) ), ocombobox );
demo->setItemParameter( demo->insertItem( "OEditListBox", this, SLOT( demo(int) ) ), oeditlistbox );
demo->setItemParameter( demo->insertItem( "OSelector", this, SLOT( demo(int) ) ), oselector );
mbar->insertItem( "Demonstrate", demo );
build();
}
OpieUIDemo::~OpieUIDemo()
{
}
diff --git a/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.h b/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.h
index 0519ae6..382885f 100644
--- a/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.h
+++ b/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.h
@@ -1,56 +1,60 @@
/**********************************************************************
** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved.
**
** This file is part of Opie Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
**********************************************************************/
#ifndef OPIEUIDEMO_H
#define OPIEUIDEMO_H
#include <qmainwindow.h>
+namespace Opie {
+namespace Ui {
class OVersatileView;
+}
+}
class QTabWidget;
class QVBox;
class OpieUIDemo : public QMainWindow {
Q_OBJECT
public:
OpieUIDemo( QWidget* parent = 0, const char* name = 0, WFlags fl = WType_TopLevel );
~OpieUIDemo();
void demoOCompletionBox();
void demoOLineEdit();
void demoOComboBox();
void demoOEditListBox();
void demoOSelector();
public slots:
void demo( int );
void messageBox( const QString& text );
protected:
void build();
void buildVV( QVBox* b );
private:
QTabWidget* main;
- OVersatileView* vv;
+ Opie::Ui::OVersatileView* vv;
};
#endif
diff --git a/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.cpp b/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.cpp
index 9db4e62..b6d59aa 100644
--- a/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.cpp
+++ b/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.cpp
@@ -17,48 +17,50 @@
     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
    : ..    .:,     . . . 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.
*/
#include "oversatileviewdemo.h"
#include <opie2/oversatileview.h>
#include <opie2/oversatileviewitem.h>
#include <qstring.h>
#include <qpixmap.h>
#include <qlistview.h>
+using namespace Opie::Ui;
+
OVersatileViewDemo::OVersatileViewDemo( QWidget* parent, const char* name, WFlags f )
:QVBox( parent, name, f )
{
vv = new OVersatileView( this );
vv->addColumn( "First" );
vv->addColumn( "2nd" );
vv->addColumn( "IIIrd" );
QString counter;
QPixmap leaf( "leaf.png" );
QPixmap opened( "folder_opened.png" );
QPixmap closed( "folder_closed.png" );
QPixmap leaf32( "leaf32.png" );
QPixmap opened32( "folder_opened32.png" );
QPixmap closed32( "folder_closed32.png" );
vv->setDefaultPixmaps( OVersatileView::Tree, leaf, opened, closed );
vv->setDefaultPixmaps( OVersatileView::Icons, leaf32, opened32, closed32 );
OVersatileViewItem* item;
OVersatileViewItem* item2;
diff --git a/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.h b/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.h
index 79318d0..35e2c3c 100644
--- a/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.h
+++ b/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.h
@@ -13,61 +13,65 @@
     ._= =}       : or (at your option) any later version.
    .%`+i>       _;_.
    .i_,=:_.      -<s. This program is distributed in the hope that
     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
    : ..    .:,     . . . 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 OVERSATILEVIEWDEMO_H
#define OVERSATILEVIEWDEMO_H
#include <qvbox.h>
+namespace Opie {
+namespace Ui {
class OVersatileView;
class OVersatileViewItem;
+}
+}
class OVersatileViewDemo: public QVBox
{
Q_OBJECT
public:
OVersatileViewDemo( QWidget* parent=0, const char* name=0, WFlags f=0 );
virtual ~OVersatileViewDemo();
public slots:
void selectionChanged();
- void selectionChanged( OVersatileViewItem * );
- void currentChanged( OVersatileViewItem * );
- void clicked( OVersatileViewItem * );
- void pressed( OVersatileViewItem * );
+ void selectionChanged( Opie::Ui::OVersatileViewItem * );
+ void currentChanged( Opie::Ui::OVersatileViewItem * );
+ void clicked( Opie::Ui::OVersatileViewItem * );
+ void pressed( OPie::Ui::OVersatileViewItem * );
- void doubleClicked( OVersatileViewItem *item );
- void returnPressed( OVersatileViewItem *item );
+ void doubleClicked( Opie::Ui::OVersatileViewItem *item );
+ void returnPressed( Opie::Ui::OVersatileViewItem *item );
- void onItem( OVersatileViewItem *item );
+ void onItem( Opie::Ui::OVersatileViewItem *item );
void onViewport();
- void expanded( OVersatileViewItem *item );
- void collapsed( OVersatileViewItem *item );
+ void expanded( Opie::Ui::OVersatileViewItem *item );
+ void collapsed( Opie::Ui::OVersatileViewItem *item );
void moved();
- void contextMenuRequested( OVersatileViewItem *item, const QPoint&, int col );
+ void contextMenuRequested( Opie::Ui::OVersatileViewItem *item, const QPoint&, int col );
private:
- OVersatileView* vv;
+ Opie::Ui::OVersatileView* vv;
};
#endif
diff --git a/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.cpp b/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.cpp
index b1c5e70..50cc11b 100644
--- a/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.cpp
+++ b/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.cpp
@@ -1,46 +1,46 @@
/*
* You may use, modify and distribute this example without any limitation
*/
#include "owidgetstack_example.h"
/* OPIE */
#include <opie2/oapplicationfactory.h>
#include <opie2/owidgetstack.h>
#include <qpe/resource.h>
/* QT */
#include <qaction.h>
#include <qtoolbar.h>
#include <qpopupmenu.h>
#include <qmenubar.h>
#include <qlayout.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include <qsignalmapper.h>
-using namespace Opie;
+using namespace Opie::Ui;
OPIE_EXPORT_APP( OApplicationFactory<StackExample> )
StackExample::StackExample( QWidget* parent, const char* name, WFlags fl )
: QMainWindow( parent, name, fl )
{
m_stack = new OWidgetStack( this );
setCentralWidget( m_stack );
/* nice Signal Mapper ;) */
QSignalMapper *sm = new QSignalMapper(this);
connect(sm, SIGNAL(mapped(int) ), m_stack, SLOT(raiseWidget(int)) );
/* toolbar first but this should be known from the other examples */
setToolBarsMovable( false );
/* only a menubar here */
QToolBar* holder = new QToolBar( this );
holder->setHorizontalStretchable( true );
QMenuBar *bar = new QMenuBar( holder );
QPopupMenu *menu = new QPopupMenu( this );
QAction* a = new QAction( tr("Show MainWidget"), Resource::loadPixmap("zoom"),
diff --git a/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.h b/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.h
index aea85cb..c9b70cb 100644
--- a/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.h
+++ b/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.h
@@ -1,28 +1,27 @@
/*
* You may use, modify and distribute this example without any limitation
*/
#ifndef O_STACK_EXAMPLE_SIMPLE_H
#define O_STACK_EXAMPLE_SIMPLE_H
#include <qmainwindow.h>
#include <opie2/owidgetstack.h>
-using namespace Opie;
class StackExample : public QMainWindow {
Q_OBJECT
public:
StackExample( QWidget* paren, const char* name, WFlags fl );
~StackExample();
static QString appName() { return QString::fromLatin1("owidgetstack-example"); }
protected:
void closeEvent( QCloseEvent* e );
private:
- OWidgetStack* m_stack;
+ Opie::Ui::OWidgetStack* m_stack;
QWidget* m_main;
};
#endif