summaryrefslogtreecommitdiff
path: root/examples/opieui
authordrw <drw>2005-06-15 22:39:20 (UTC)
committer drw <drw>2005-06-15 22:39:20 (UTC)
commite0205bac48b9d23af9feb48004c24fcf7a5e8200 (patch) (side-by-side diff)
tree2faa077192fd0bfc4fc409f0513cc0e82113fa9e /examples/opieui
parentd2474c8e654d223b85b6200ce09fabd3a40af8e3 (diff)
downloadopie-e0205bac48b9d23af9feb48004c24fcf7a5e8200.zip
opie-e0205bac48b9d23af9feb48004c24fcf7a5e8200.tar.gz
opie-e0205bac48b9d23af9feb48004c24fcf7a5e8200.tar.bz2
Resource -> OResource
Diffstat (limited to 'examples/opieui') (more/less context) (ignore whitespace changes)
-rw-r--r--examples/opieui/config.in2
-rw-r--r--examples/opieui/owidgetstack_example/owidgetstack_example.cpp14
-rw-r--r--examples/opieui/owidgetstack_example/owidgetstack_example.pro2
3 files changed, 9 insertions, 9 deletions
diff --git a/examples/opieui/config.in b/examples/opieui/config.in
index f538430..cf5fd01 100644
--- a/examples/opieui/config.in
+++ b/examples/opieui/config.in
@@ -1,4 +1,4 @@
config EXAMPLE_LIBOPIE2UI
boolean "libopieui2 examples"
- depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2UI
+ depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI && EXAMPLES
diff --git a/examples/opieui/owidgetstack_example/owidgetstack_example.cpp b/examples/opieui/owidgetstack_example/owidgetstack_example.cpp
index 272e42b..ded3b0c 100644
--- a/examples/opieui/owidgetstack_example/owidgetstack_example.cpp
+++ b/examples/opieui/owidgetstack_example/owidgetstack_example.cpp
@@ -1,133 +1,133 @@
/*
* 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>
+#include <opie2/oresource.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::Core;
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"),
+ QAction* a = new QAction( tr("Show MainWidget"), Opie::Core::OResource::loadPixmap("zoom", Opie::Core::OResource::SmallIcon),
QString::null, 0, this, 0 );
sm->setMapping(a, 1 );
connect(a, SIGNAL(activated() ),
sm, SLOT(map() ) );
a->addTo( menu );
- a = new QAction( tr("Show Details Small"), Resource::loadPixmap("zoom"),
+ a = new QAction( tr("Show Details Small"), Opie::Core::OResource::loadPixmap("zoom", Opie::Core::OResource::SmallIcon),
QString::null, 0, this, 0 );
sm->setMapping(a, 2 );
connect(a, SIGNAL(activated() ),
sm, SLOT(map() ) );
a->addTo( menu );
- a = new QAction( tr("Show Details More"), Resource::loadPixmap("zoom"),
+ a = new QAction( tr("Show Details More"), Opie::Core::OResource::loadPixmap("zoom", Opie::Core::OResource::SmallIcon),
QString::null, 0, this, 0 );
sm->setMapping(a, 3 );
connect(a, SIGNAL(activated() ),
sm, SLOT(map() ) );
a->addTo( menu );
- a = new QAction( tr("Show Details All"), Resource::loadPixmap("zoom"),
+ a = new QAction( tr("Show Details All"), Opie::Core::OResource::loadPixmap("zoom", Opie::Core::OResource::SmallIcon),
QString::null, 0, this, 0 );
sm->setMapping(a, 4 );
connect(a, SIGNAL(activated() ),
sm, SLOT(map() ) );
bar->insertItem( tr("Actions"), menu );
/* now the gui */
/* first widget, main widget */
QWidget * wid = new QWidget( m_stack );
QGridLayout *grid = new QGridLayout(wid, 2, 2 );
QPushButton *btn = new QPushButton( tr("Show Details Small"), wid, "details1" );
sm->setMapping(btn, 2 );
connect(btn, SIGNAL(clicked()), sm, SLOT(map() ) );
grid->addWidget( btn, 0, 0 );
btn = new QPushButton( tr("Show Details Medium"), wid, "details2");
sm->setMapping(btn, 3 );
connect(btn, SIGNAL(clicked()), sm, SLOT(map() ) );
grid->addWidget( btn, 0, 1 );
btn = new QPushButton( tr("Show Details All"), wid, "details3");
sm->setMapping(btn, 4 );
connect(btn, SIGNAL(clicked()), sm, SLOT(map() ) );
grid->addWidget( btn, 1, 1 );
m_stack->addWidget( wid, 1 );
m_main = wid;
QLabel *lbl = new QLabel(m_stack );
- lbl->setText(tr("Only small Details are shown here. Määh") );
+ lbl->setText(tr("Only small Details are shown here. M�h") );
m_stack->addWidget( lbl, 2 );
lbl = new QLabel( m_stack );
lbl->setText( tr("Some more details....Wo ist das Schaf?") );
m_stack->addWidget( lbl, 3 );
lbl = new QLabel( m_stack );
- lbl->setText( tr("<qt>Ne nicht in Bayerisch Gmain sondern in Berlin<br>Vermiss und meine Augen werden nicht eckig, da mein Bildschirm abgerundet ist<br>Es lebe Hamburg Süd,weiss du, verstehst du? ;)<br>Susi ist dOOf, es lebe die Ofenecke...", "hard to translate that") );
+ lbl->setText( tr("<qt>Ne nicht in Bayerisch Gmain sondern in Berlin<br>Vermiss und meine Augen werden nicht eckig, da mein Bildschirm abgerundet ist<br>Es lebe Hamburg Sd,weiss du, verstehst du? ;)<br>Susi ist dOOf, es lebe die Ofenecke...", "hard to translate that") );
m_stack->addWidget( lbl, 4 );
/* THE signal mapper does all the magic */
m_stack->raiseWidget( m_main );
}
StackExample::~StackExample() {
}
void StackExample::closeEvent( QCloseEvent* ev) {
/* if the close even came when we displayed a details */
if (m_stack->visibleWidget() != m_main ) {
m_stack->raiseWidget( m_main );
ev->ignore();
return;
}
ev->accept();
}
diff --git a/examples/opieui/owidgetstack_example/owidgetstack_example.pro b/examples/opieui/owidgetstack_example/owidgetstack_example.pro
index 4cfce9c..8960f03 100644
--- a/examples/opieui/owidgetstack_example/owidgetstack_example.pro
+++ b/examples/opieui/owidgetstack_example/owidgetstack_example.pro
@@ -1,13 +1,13 @@
CONFIG += qt warn_on
TEMPLATE = app
TARGET = owidgetstack-example
SOURCES = owidgetstack_example.cpp
HEADERS = owidgetstack_example.h
INCLUDEPATH += $(OPIEDIR)/include
DEPENDSPATH += $(OPIEDIR)/include
-LIBS += -lqpe -lopieui2
+LIBS += -lqpe -lopiecore2 -lopieui2
include( $(OPIEDIR)/include.pro )