-rw-r--r-- | libopie/big-screen/example/osplitter_example.cpp | 28 | ||||
-rw-r--r-- | libopie/big-screen/example/osplitter_example.h | 20 | ||||
-rw-r--r-- | libopie/big-screen/example/osplitter_example.o | bin | 17276 -> 0 bytes | |||
-rw-r--r-- | libopie/big-screen/example/osplitter_example.pro | 13 | ||||
-rw-r--r-- | libopie/big-screen/example/osplitter_mail.cpp | 82 | ||||
-rw-r--r-- | libopie/big-screen/example/osplitter_mail.h | 49 | ||||
-rw-r--r-- | libopie/big-screen/example/osplitter_mail.pro | 12 | ||||
-rw-r--r-- | libopie/big-screen/example/owidgetstack_example.cpp | 131 | ||||
-rw-r--r-- | libopie/big-screen/example/owidgetstack_example.h | 27 | ||||
-rw-r--r-- | libopie/big-screen/example/owidgetstack_example.pro | 13 |
10 files changed, 0 insertions, 375 deletions
diff --git a/libopie/big-screen/example/osplitter_example.cpp b/libopie/big-screen/example/osplitter_example.cpp deleted file mode 100644 index e337379..0000000 --- a/libopie/big-screen/example/osplitter_example.cpp +++ b/dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | #include <qdir.h> | ||
2 | #include <qlayout.h> | ||
3 | |||
4 | #include "../osplitter.h" | ||
5 | |||
6 | #include <qpe/qpeapplication.h> | ||
7 | #include <opie/oapplicationfactory.h> | ||
8 | |||
9 | #include "osplitter_example.h" | ||
10 | |||
11 | OPIE_EXPORT_APP( OApplicationFactory<OSplitterExample> ) | ||
12 | |||
13 | OSplitterExample::OSplitterExample( QWidget *w,const char* n,WFlags f ) | ||
14 | : QWidget( w, n, f ){ | ||
15 | QVBoxLayout * lay = new QVBoxLayout(this); | ||
16 | OSplitter * splitter = new OSplitter( Horizontal, this ); | ||
17 | lay->addWidget( splitter ); | ||
18 | |||
19 | OFileSelector *selector = new OFileSelector( splitter, OFileSelector::FileSelector, | ||
20 | OFileSelector::Normal, QDir::homeDirPath(), | ||
21 | QString::null ); | ||
22 | splitter->addWidget( selector, "zoom", tr("Selector 1") ); | ||
23 | |||
24 | selector = new OFileSelector( splitter, OFileSelector::FileSelector, OFileSelector::Normal, | ||
25 | QDir::homeDirPath(), QString::null ); | ||
26 | splitter->addWidget( selector, "zoom", tr("Selector 2") ); | ||
27 | |||
28 | } | ||
diff --git a/libopie/big-screen/example/osplitter_example.h b/libopie/big-screen/example/osplitter_example.h deleted file mode 100644 index ae8f120..0000000 --- a/libopie/big-screen/example/osplitter_example.h +++ b/dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* | ||
2 | * May be used, copied and modified wihtout any limitation | ||
3 | */ | ||
4 | |||
5 | #ifndef OSPlitter_EXAMPLE_H | ||
6 | #define OSPlitter_EXAMPLE_H | ||
7 | |||
8 | #include <qvbox.h> | ||
9 | #include <opie/ofileselector.h> | ||
10 | |||
11 | class OSplitterExample : public QWidget { | ||
12 | Q_OBJECT | ||
13 | public: | ||
14 | static QString appName() { return QString::fromLatin1("osplitter_example"); } | ||
15 | OSplitterExample( QWidget *parent, const char* name, WFlags fl ); | ||
16 | |||
17 | }; | ||
18 | |||
19 | |||
20 | #endif | ||
diff --git a/libopie/big-screen/example/osplitter_example.o b/libopie/big-screen/example/osplitter_example.o deleted file mode 100644 index e52d5d9..0000000 --- a/libopie/big-screen/example/osplitter_example.o +++ b/dev/null | |||
Binary files differ | |||
diff --git a/libopie/big-screen/example/osplitter_example.pro b/libopie/big-screen/example/osplitter_example.pro deleted file mode 100644 index b12bf17..0000000 --- a/libopie/big-screen/example/osplitter_example.pro +++ b/dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | CONFIG = qt warn_on | ||
2 | TEMPLATE = app | ||
3 | TARGET = osplitter_example | ||
4 | |||
5 | HEADERS = osplitter_example.h ../osplitter.h | ||
6 | SOURCES = osplitter_example.cpp ../osplitter.cpp | ||
7 | |||
8 | INCLUDEPATH += $(OPIEDIR)/include ../ | ||
9 | DEPENDSPATH += $(OPIEDIR)/include | ||
10 | |||
11 | LIBS += -lqpe -lopie | ||
12 | |||
13 | include ( $(OPIEDIR)/include.pro ) \ No newline at end of file | ||
diff --git a/libopie/big-screen/example/osplitter_mail.cpp b/libopie/big-screen/example/osplitter_mail.cpp deleted file mode 100644 index 4356baa..0000000 --- a/libopie/big-screen/example/osplitter_mail.cpp +++ b/dev/null | |||
@@ -1,82 +0,0 @@ | |||
1 | |||
2 | #include <qstring.h> | ||
3 | #include <qlabel.h> | ||
4 | #include <qheader.h> | ||
5 | #include <qlayout.h> | ||
6 | |||
7 | #include <qpe/qpeapplication.h> | ||
8 | #include <opie/oapplicationfactory.h> | ||
9 | |||
10 | #include "../osplitter.h" | ||
11 | |||
12 | #include "osplitter_mail.h" | ||
13 | |||
14 | |||
15 | OPIE_EXPORT_APP( OApplicationFactory<ListViews> ) | ||
16 | |||
17 | class Folder { | ||
18 | int dummy; | ||
19 | }; | ||
20 | |||
21 | // ----------------------------------------------------------------- | ||
22 | |||
23 | ListViews::ListViews( QWidget* p, const char* name, WFlags fl ) | ||
24 | : QWidget( p, name, fl ) { | ||
25 | qApp->installEventFilter( this ); | ||
26 | m_lstFolders.setAutoDelete( true ); | ||
27 | QHBoxLayout *lay = new QHBoxLayout(this); | ||
28 | |||
29 | m_splitter = new OSplitter( Horizontal, this, "SPlitter 1" ); | ||
30 | lay->addWidget( m_splitter ); | ||
31 | connect(m_splitter, SIGNAL(sizeChange(bool,const QSize&) ), | ||
32 | this, SLOT(slotSizeChange(bool,const QSize&) ) ); | ||
33 | |||
34 | m_overview = new QListView( m_splitter ); | ||
35 | m_overview->header()->setClickEnabled( FALSE ); | ||
36 | m_overview->addColumn( tr("Folder") ); | ||
37 | m_overview->setMaximumWidth( 200 ); | ||
38 | m_splitter->addWidget( m_overview, "zoom", tr("Folder Overview") ); | ||
39 | m_splitter->setSizeChange( 300 ); | ||
40 | |||
41 | /* OSplitter starts with the small mode */ | ||
42 | m_messages = 0; | ||
43 | m_message = m_attach = 0; | ||
44 | |||
45 | splitti = new OSplitter( Vertical, m_splitter, "Splitti2" ); | ||
46 | splitti->setSizeChange( 300 ); | ||
47 | splitti->setSizePolicy( QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding ) ); | ||
48 | |||
49 | QLabel *lbl = new QLabel(splitti); | ||
50 | lbl->setTextFormat ( Qt::RichText ); | ||
51 | lbl->setText("<br><br><b>Test Test Test</b><br><br><p>Fooooo hjhh</p>"); | ||
52 | |||
53 | m_messages = new QListView( splitti ); | ||
54 | m_messages->addColumn(" Messages "); | ||
55 | |||
56 | folder1 = new QListView( splitti ); | ||
57 | folder1->addColumn( "Messages 2 " ); | ||
58 | |||
59 | splitti->addWidget(m_messages, "mail", tr("Mails") ); | ||
60 | splitti->addWidget(folder1, "folder", tr("Folder") ); | ||
61 | splitti->addWidget( lbl, "logo", tr("Label") ); | ||
62 | m_message = lbl; | ||
63 | |||
64 | m_splitter->addWidget( splitti ); | ||
65 | |||
66 | } | ||
67 | |||
68 | |||
69 | ListViews::~ListViews() { | ||
70 | |||
71 | } | ||
72 | |||
73 | |||
74 | bool ListViews::eventFilter( QObject* obj, QEvent* ev ) { | ||
75 | if (!obj->isWidgetType() ) | ||
76 | return false; | ||
77 | if ( ev->type() == QEvent::MouseButtonRelease ) { | ||
78 | qWarning(" name %s, class %s", obj->name(), obj->className() ); | ||
79 | } | ||
80 | |||
81 | return false; | ||
82 | } | ||
diff --git a/libopie/big-screen/example/osplitter_mail.h b/libopie/big-screen/example/osplitter_mail.h deleted file mode 100644 index b7e7efe..0000000 --- a/libopie/big-screen/example/osplitter_mail.h +++ b/dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | /* | ||
2 | * You may use, modify and distribute this code without any limitation | ||
3 | */ | ||
4 | |||
5 | /* | ||
6 | * Header file for a more complete email client like | ||
7 | * layout | ||
8 | */ | ||
9 | |||
10 | #ifndef OPIE_SPLITTER_MAIL_EXAMPLE_H | ||
11 | #define OPIE_SPLITTER_MAIL_EXAMPLE_H | ||
12 | |||
13 | #include <qwidget.h> | ||
14 | #include <qlist.h> | ||
15 | #include <qlistview.h> | ||
16 | |||
17 | class Folder; | ||
18 | class QLabel; | ||
19 | |||
20 | class OSplitter; | ||
21 | class ListViews : public QWidget { | ||
22 | Q_OBJECT | ||
23 | public: | ||
24 | static QString appName() { return QString::fromLatin1("osplitter-mail"); } | ||
25 | ListViews( QWidget* parent, const char * name, WFlags fl ); | ||
26 | ~ListViews(); | ||
27 | |||
28 | bool eventFilter( QObject* , QEvent* ); | ||
29 | private: | ||
30 | void initFolders(); | ||
31 | void initFolder( Folder *folder, unsigned int &count ); | ||
32 | |||
33 | QListView *m_messages, *m_overview; | ||
34 | QLabel *m_message, *m_attach; | ||
35 | QList<QListView> m_folders; // used in tab mode | ||
36 | QList<Folder> m_lstFolders; | ||
37 | bool m_mode : 1; // bitfield | ||
38 | OSplitter *m_splitter; | ||
39 | OSplitter *splitti; | ||
40 | QListView *folder1; | ||
41 | #if 0 | ||
42 | //private slots: | ||
43 | // void slotFolderChanged( QListViewItem* ); | ||
44 | // void slotMessageChanged(); | ||
45 | // void slotSizeChange( bool, const QSize& ); | ||
46 | #endif | ||
47 | }; | ||
48 | |||
49 | #endif | ||
diff --git a/libopie/big-screen/example/osplitter_mail.pro b/libopie/big-screen/example/osplitter_mail.pro deleted file mode 100644 index ec6e626..0000000 --- a/libopie/big-screen/example/osplitter_mail.pro +++ b/dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | CONFIG += qt warn_on | ||
2 | TEMPLATE = app | ||
3 | TARGET = osplitter-mail | ||
4 | |||
5 | INCLUDEPATH += $(OPIEDIR)/include | ||
6 | DEPENDSPATH += $(OPIEDIR)/include | ||
7 | |||
8 | HEADERS = osplitter_mail.h | ||
9 | SOURCES = osplitter_mail.cpp | ||
10 | |||
11 | LIBS += -lqpe -lopie | ||
12 | include ( $(OPIEDIR)/include.pro ) | ||
diff --git a/libopie/big-screen/example/owidgetstack_example.cpp b/libopie/big-screen/example/owidgetstack_example.cpp deleted file mode 100644 index a6b8201..0000000 --- a/libopie/big-screen/example/owidgetstack_example.cpp +++ b/dev/null | |||
@@ -1,131 +0,0 @@ | |||
1 | /* | ||
2 | * You may use, modify and distribute this example without any limitation | ||
3 | */ | ||
4 | |||
5 | #include <qaction.h> | ||
6 | #include <qtoolbar.h> | ||
7 | #include <qpopupmenu.h> | ||
8 | #include <qmenubar.h> | ||
9 | #include <qlayout.h> | ||
10 | #include <qlabel.h> | ||
11 | #include <qpushbutton.h> | ||
12 | #include <qsignalmapper.h> | ||
13 | |||
14 | #include <qpe/resource.h> | ||
15 | |||
16 | #include "../owidgetstack.h" | ||
17 | |||
18 | #include "owidgetstack_example.h" | ||
19 | |||
20 | #include <qpe/qpeapplication.h> | ||
21 | #include <opie/oapplicationfactory.h> | ||
22 | |||
23 | OPIE_EXPORT_APP( OApplicationFactory<StackExample> ) | ||
24 | |||
25 | StackExample::StackExample( QWidget* parent, const char* name, WFlags fl ) | ||
26 | : QMainWindow( parent, name, fl ) | ||
27 | { | ||
28 | m_stack = new OWidgetStack( this ); | ||
29 | setCentralWidget( m_stack ); | ||
30 | |||
31 | /* nice Signal Mapper ;) */ | ||
32 | QSignalMapper *sm = new QSignalMapper(this); | ||
33 | connect(sm, SIGNAL(mapped(int) ), m_stack, SLOT(raiseWidget(int)) ); | ||
34 | |||
35 | /* toolbar first but this should be known from the other examples */ | ||
36 | setToolBarsMovable( false ); | ||
37 | |||
38 | /* only a menubar here */ | ||
39 | QToolBar* holder = new QToolBar( this ); | ||
40 | holder->setHorizontalStretchable( true ); | ||
41 | |||
42 | QMenuBar *bar = new QMenuBar( holder ); | ||
43 | QPopupMenu *menu = new QPopupMenu( this ); | ||
44 | |||
45 | QAction* a = new QAction( tr("Show MainWidget"), Resource::loadPixmap("zoom"), | ||
46 | QString::null, 0, this, 0 ); | ||
47 | sm->setMapping(a, 1 ); | ||
48 | connect(a, SIGNAL(activated() ), | ||
49 | sm, SLOT(map() ) ); | ||
50 | a->addTo( menu ); | ||
51 | |||
52 | a = new QAction( tr("Show Details Small"), Resource::loadPixmap("zoom"), | ||
53 | QString::null, 0, this, 0 ); | ||
54 | sm->setMapping(a, 2 ); | ||
55 | connect(a, SIGNAL(activated() ), | ||
56 | sm, SLOT(map() ) ); | ||
57 | a->addTo( menu ); | ||
58 | |||
59 | a = new QAction( tr("Show Details More"), Resource::loadPixmap("zoom"), | ||
60 | QString::null, 0, this, 0 ); | ||
61 | sm->setMapping(a, 3 ); | ||
62 | connect(a, SIGNAL(activated() ), | ||
63 | sm, SLOT(map() ) ); | ||
64 | a->addTo( menu ); | ||
65 | |||
66 | a = new QAction( tr("Show Details All"), Resource::loadPixmap("zoom"), | ||
67 | QString::null, 0, this, 0 ); | ||
68 | sm->setMapping(a, 4 ); | ||
69 | connect(a, SIGNAL(activated() ), | ||
70 | sm, SLOT(map() ) ); | ||
71 | |||
72 | bar->insertItem( tr("Actions"), menu ); | ||
73 | |||
74 | /* now the gui */ | ||
75 | |||
76 | /* first widget, main widget */ | ||
77 | QWidget * wid = new QWidget( m_stack ); | ||
78 | QGridLayout *grid = new QGridLayout(wid, 2, 2 ); | ||
79 | |||
80 | QPushButton *btn = new QPushButton( tr("Show Details Small"), wid, "details1" ); | ||
81 | sm->setMapping(btn, 2 ); | ||
82 | connect(btn, SIGNAL(clicked()), sm, SLOT(map() ) ); | ||
83 | grid->addWidget( btn, 0, 0 ); | ||
84 | |||
85 | btn = new QPushButton( tr("Show Details Medium"), wid, "details2"); | ||
86 | sm->setMapping(btn, 3 ); | ||
87 | connect(btn, SIGNAL(clicked()), sm, SLOT(map() ) ); | ||
88 | grid->addWidget( btn, 0, 1 ); | ||
89 | |||
90 | btn = new QPushButton( tr("Show Details All"), wid, "details3"); | ||
91 | sm->setMapping(btn, 4 ); | ||
92 | connect(btn, SIGNAL(clicked()), sm, SLOT(map() ) ); | ||
93 | grid->addWidget( btn, 1, 1 ); | ||
94 | |||
95 | m_stack->addWidget( wid, 1 ); | ||
96 | m_main = wid; | ||
97 | |||
98 | QLabel *lbl = new QLabel(m_stack ); | ||
99 | lbl->setText(tr("Only small Details are shown here. Määh") ); | ||
100 | m_stack->addWidget( lbl, 2 ); | ||
101 | |||
102 | lbl = new QLabel( m_stack ); | ||
103 | lbl->setText( tr("Some more details....Wo ist das Schaf?") ); | ||
104 | m_stack->addWidget( lbl, 3 ); | ||
105 | |||
106 | lbl = new QLabel( m_stack ); | ||
107 | 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") ); | ||
108 | m_stack->addWidget( lbl, 4 ); | ||
109 | |||
110 | |||
111 | /* THE signal mapper does all the magic */ | ||
112 | m_stack->raiseWidget( m_main ); | ||
113 | } | ||
114 | |||
115 | |||
116 | StackExample::~StackExample() { | ||
117 | |||
118 | } | ||
119 | |||
120 | |||
121 | |||
122 | void StackExample::closeEvent( QCloseEvent* ev) { | ||
123 | /* if the close even came when we displayed a details */ | ||
124 | if (m_stack->visibleWidget() != m_main ) { | ||
125 | m_stack->raiseWidget( m_main ); | ||
126 | ev->ignore(); | ||
127 | return; | ||
128 | } | ||
129 | |||
130 | ev->accept(); | ||
131 | } | ||
diff --git a/libopie/big-screen/example/owidgetstack_example.h b/libopie/big-screen/example/owidgetstack_example.h deleted file mode 100644 index 7977b48..0000000 --- a/libopie/big-screen/example/owidgetstack_example.h +++ b/dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | /* | ||
2 | * You may use, modify and distribute this example without any limitation | ||
3 | */ | ||
4 | |||
5 | #ifndef O_STACK_EXAMPLE_SIMPLE_H | ||
6 | #define O_STACK_EXAMPLE_SIMPLE_H | ||
7 | |||
8 | #include <qmainwindow.h> | ||
9 | |||
10 | |||
11 | class OWidgetStack; | ||
12 | class StackExample : public QMainWindow { | ||
13 | Q_OBJECT | ||
14 | public: | ||
15 | StackExample( QWidget* paren, const char* name, WFlags fl ); | ||
16 | ~StackExample(); | ||
17 | static QString appName() { return QString::fromLatin1("owidgetstack-example"); } | ||
18 | |||
19 | protected: | ||
20 | void closeEvent( QCloseEvent* e ); | ||
21 | private: | ||
22 | OWidgetStack* m_stack; | ||
23 | QWidget* m_main; | ||
24 | |||
25 | }; | ||
26 | |||
27 | #endif | ||
diff --git a/libopie/big-screen/example/owidgetstack_example.pro b/libopie/big-screen/example/owidgetstack_example.pro deleted file mode 100644 index ad1dc09..0000000 --- a/libopie/big-screen/example/owidgetstack_example.pro +++ b/dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | CONFIG += qt warn_on | ||
2 | TEMPLATE = app | ||
3 | TARGET = owidgetstack-example | ||
4 | |||
5 | SOURCES = ../owidgetstack.cpp owidgetstack_example.cpp | ||
6 | HEADERS = ../owidgetstack.h owidgetstack_example.h | ||
7 | |||
8 | INCLUDEPATH += $(OPIEDIR)/include | ||
9 | DEPENDSPATH += $(OPIEDIR)/include | ||
10 | |||
11 | LIBS += -lqpe | ||
12 | |||
13 | include ( $(OPIEDIR)/include.pro ) | ||