Diffstat (limited to 'libopie2/examples/opieui/osplitter_example/osplitter_mail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/examples/opieui/osplitter_example/osplitter_mail.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
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 @@ | |||
1 | 1 | ||
2 | #include <qstring.h> | 2 | #include <qstring.h> |
3 | #include <qlabel.h> | 3 | #include <qlabel.h> |
4 | #include <qheader.h> | 4 | #include <qheader.h> |
5 | #include <qlayout.h> | 5 | #include <qlayout.h> |
6 | 6 | ||
7 | #include <qpe/qpeapplication.h> | 7 | #include <qpe/qpeapplication.h> |
8 | 8 | ||
9 | #include <opie2/oapplicationfactory.h> | 9 | #include <opie2/oapplicationfactory.h> |
10 | #include "osplitter_mail.h" | 10 | #include "osplitter_mail.h" |
11 | 11 | ||
12 | using namespace Opie::Ui; | ||
13 | |||
12 | OPIE_EXPORT_APP( OApplicationFactory<ListViews> ) | 14 | OPIE_EXPORT_APP( OApplicationFactory<ListViews> ) |
13 | 15 | ||
14 | class Folder { | 16 | class Folder { |
15 | int dummy; | 17 | int dummy; |
16 | }; | 18 | }; |
17 | 19 | ||
18 | // ----------------------------------------------------------------- | 20 | // ----------------------------------------------------------------- |
19 | 21 | ||
20 | ListViews::ListViews( QWidget* p, const char* name, WFlags fl ) | 22 | ListViews::ListViews( QWidget* p, const char* name, WFlags fl ) |
21 | : QWidget( p, name, fl ) { | 23 | : QWidget( p, name, fl ) { |
22 | qApp->installEventFilter( this ); | 24 | qApp->installEventFilter( this ); |
23 | m_lstFolders.setAutoDelete( true ); | 25 | m_lstFolders.setAutoDelete( true ); |
24 | QHBoxLayout *lay = new QHBoxLayout(this); | 26 | QHBoxLayout *lay = new QHBoxLayout(this); |
25 | 27 | ||
26 | m_splitter = new OSplitter( Horizontal, this, "SPlitter 1" ); | 28 | m_splitter = new OSplitter( Horizontal, this, "SPlitter 1" ); |
27 | lay->addWidget( m_splitter ); | 29 | lay->addWidget( m_splitter ); |
28 | connect(m_splitter, SIGNAL(sizeChange(bool,const QSize&) ), | 30 | connect(m_splitter, SIGNAL(sizeChanged(bool,Orientation) ), |
29 | this, SLOT(slotSizeChange(bool,const QSize&) ) ); | 31 | this, SLOT(slotSizeChange(bool,Orientation) ) ); |
30 | 32 | ||
31 | m_overview = new QListView( m_splitter ); | 33 | m_overview = new QListView( m_splitter ); |
32 | m_overview->header()->setClickEnabled( FALSE ); | 34 | m_overview->header()->setClickEnabled( FALSE ); |
33 | m_overview->addColumn( tr("Folder") ); | 35 | m_overview->addColumn( tr("Folder") ); |
34 | m_overview->setMaximumWidth( 200 ); | 36 | // m_overview->setMaximumWidth( 200 ); |
35 | m_splitter->addWidget( m_overview, "zoom", tr("Folder Overview") ); | 37 | m_splitter->addWidget( m_overview, "zoom", tr("Folder Overview") ); |
36 | m_splitter->setSizeChange( 300 ); | 38 | m_splitter->setSizeChange( 300 ); |
37 | 39 | ||
38 | /* OSplitter starts with the small mode */ | 40 | /* OSplitter starts with the small mode */ |
39 | m_messages = 0; | 41 | m_messages = 0; |
40 | m_message = m_attach = 0; | 42 | m_message = m_attach = 0; |
41 | 43 | ||
42 | splitti = new OSplitter( Vertical, m_splitter, "Splitti2" ); | 44 | splitti = new OSplitter( Vertical, m_splitter, "Splitti2" ); |
43 | splitti->setSizeChange( 300 ); | 45 | splitti->setSizeChange( 300 ); |
44 | splitti->setSizePolicy( QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding ) ); | 46 | splitti->setSizePolicy( QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding ) ); |
45 | 47 | ||
46 | QLabel *lbl = new QLabel(splitti); | 48 | QLabel *lbl = new QLabel(splitti); |
47 | lbl->setTextFormat ( Qt::RichText ); | 49 | lbl->setTextFormat ( Qt::RichText ); |
48 | lbl->setText("<br><br><b>Test Test Test</b><br><br><p>Fooooo hjhh</p>"); | 50 | lbl->setText("<br><br><b>Test Test Test</b><br><br><p>Fooooo hjhh</p>"); |
49 | 51 | ||
50 | m_messages = new QListView( splitti ); | 52 | m_messages = new QListView( splitti ); |
51 | m_messages->addColumn(" Messages "); | 53 | m_messages->addColumn(" Messages "); |
52 | 54 | ||
53 | folder1 = new QListView( splitti ); | 55 | folder1 = new QListView( splitti ); |
54 | folder1->addColumn( "Messages 2 " ); | 56 | folder1->addColumn( "Messages 2 " ); |
55 | 57 | ||
56 | splitti->addWidget(m_messages, "mail", tr("Mails") ); | 58 | splitti->addWidget(m_messages, "mail", tr("Mails") ); |
57 | splitti->addWidget(folder1, "folder", tr("Folder") ); | 59 | splitti->addWidget(folder1, "folder", tr("Folder") ); |
58 | splitti->addWidget( lbl, "logo", tr("Label") ); | 60 | splitti->addWidget( lbl, "logo", tr("Label") ); |