summaryrefslogtreecommitdiff
path: root/examples/opieui/osplitter_example/osplitter_example.cpp
blob: 07c7e51ae24a27b83d029c59d864a0fe9501b7e6 (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
#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::Ui;
using namespace Opie::Core;

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") );
    
}