summaryrefslogtreecommitdiff
path: root/libopie/big-screen/example/osplitter_mail.cpp
blob: 91442c8e640cf7ca11c5abecd41975d27064aef1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70

#include <qstring.h>
#include <qlabel.h>
#include <qheader.h>
#include <qlayout.h>

#include <qpe/qpeapplication.h>
#include <opie/oapplicationfactory.h>

#include "../osplitter.h"

#include "osplitter_mail.h"


OPIE_EXPORT_APP( OApplicationFactory<ListViews> )

class Folder {
    int dummy;
};

// -----------------------------------------------------------------

ListViews::ListViews( QWidget* p, const char* name, WFlags fl )
    : QWidget( p, name, fl ) {
    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& ) ) );

    m_overview = new QListView( m_splitter );
    m_overview->header()->setClickEnabled( FALSE );
    m_overview->addColumn( tr("Folder") );
    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") );
    m_message = lbl;

    m_splitter->addWidget( splitti );

}


ListViews::~ListViews() {

}