summaryrefslogtreecommitdiffabout
path: root/korganizer/timespanview.cpp
Unidiff
Diffstat (limited to 'korganizer/timespanview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/timespanview.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/korganizer/timespanview.cpp b/korganizer/timespanview.cpp
index f8314e7..67a3811 100644
--- a/korganizer/timespanview.cpp
+++ b/korganizer/timespanview.cpp
@@ -1,67 +1,66 @@
1 1
2#ifndef DESKTOP_VERSION 2#ifndef DESKTOP_VERSION
3#include <qksplitter.h> 3#include <qksplitter.h>
4#else 4#else
5#include <qsplitter.h> 5#include <qsplitter.h>
6#endif 6#endif
7#include <qlistview.h> 7#include <qlistview.h>
8#include <qlayout.h> 8#include <qlayout.h>
9#include <qheader.h> 9#include <qheader.h>
10#include <qpushbutton.h> 10#include <qpushbutton.h>
11 11
12#include <klocale.h> 12#include <klocale.h>
13#include <kdebug.h> 13#include <kdebug.h>
14 14
15#include "lineview.h" 15#include "lineview.h"
16#include "timeline.h" 16#include "timeline.h"
17 17
18#include "timespanview.h" 18#include "timespanview.h"
19#include "timespanview.moc"
20 19
21 20
22TimeSpanView::TimeSpanView( QWidget *parent, const char *name ) : 21TimeSpanView::TimeSpanView( QWidget *parent, const char *name ) :
23 QWidget( parent, name ) 22 QWidget( parent, name )
24{ 23{
25 QBoxLayout *topLayout = new QVBoxLayout( this ); 24 QBoxLayout *topLayout = new QVBoxLayout( this );
26#ifndef DESKTOP_VERSION 25#ifndef DESKTOP_VERSION
27 mSplitter = new QKSplitter( this ); 26 mSplitter = new QKSplitter( this );
28#else 27#else
29 mSplitter = new QSplitter( this ); 28 mSplitter = new QSplitter( this );
30#endif 29#endif
31 topLayout->addWidget( mSplitter ); 30 topLayout->addWidget( mSplitter );
32 31
33 mList = new QListView( mSplitter ); 32 mList = new QListView( mSplitter );
34 mList->addColumn( i18n("Summary") ); 33 mList->addColumn( i18n("Summary") );
35 34
36 QWidget *rightPane = new QWidget( mSplitter ); 35 QWidget *rightPane = new QWidget( mSplitter );
37 QBoxLayout *rightPaneLayout = new QVBoxLayout( rightPane ); 36 QBoxLayout *rightPaneLayout = new QVBoxLayout( rightPane );
38 37
39 mTimeLine = new TimeLine( rightPane ); 38 mTimeLine = new TimeLine( rightPane );
40 mTimeLine->setFixedHeight( mList->header()->height() ); 39 mTimeLine->setFixedHeight( mList->header()->height() );
41 rightPaneLayout->addWidget( mTimeLine ); 40 rightPaneLayout->addWidget( mTimeLine );
42 41
43 mLineView = new LineView( rightPane ); 42 mLineView = new LineView( rightPane );
44 rightPaneLayout->addWidget( mLineView ); 43 rightPaneLayout->addWidget( mLineView );
45 44
46 QBoxLayout *buttonLayout = new QHBoxLayout( rightPaneLayout ); 45 QBoxLayout *buttonLayout = new QHBoxLayout( rightPaneLayout );
47 46
48 QPushButton *zoomInButton = new QPushButton( i18n("Zoom In"), rightPane ); 47 QPushButton *zoomInButton = new QPushButton( i18n("Zoom In"), rightPane );
49 connect( zoomInButton, SIGNAL( clicked() ), SLOT( zoomIn() ) ); 48 connect( zoomInButton, SIGNAL( clicked() ), SLOT( zoomIn() ) );
50 buttonLayout->addWidget( zoomInButton ); 49 buttonLayout->addWidget( zoomInButton );
51 50
52 QPushButton *zoomOutButton = new QPushButton( i18n("Zoom Out"), rightPane ); 51 QPushButton *zoomOutButton = new QPushButton( i18n("Zoom Out"), rightPane );
53 connect( zoomOutButton, SIGNAL( clicked() ), SLOT( zoomOut() ) ); 52 connect( zoomOutButton, SIGNAL( clicked() ), SLOT( zoomOut() ) );
54 buttonLayout->addWidget( zoomOutButton ); 53 buttonLayout->addWidget( zoomOutButton );
55 54
56 QPushButton *centerButton = new QPushButton( i18n("Center View"), rightPane ); 55 QPushButton *centerButton = new QPushButton( i18n("Center View"), rightPane );
57 connect( centerButton, SIGNAL( clicked() ), SLOT( centerView() ) ); 56 connect( centerButton, SIGNAL( clicked() ), SLOT( centerView() ) );
58 buttonLayout->addWidget( centerButton ); 57 buttonLayout->addWidget( centerButton );
59 58
60 connect(mLineView->horizontalScrollBar(),SIGNAL(valueChanged(int)), 59 connect(mLineView->horizontalScrollBar(),SIGNAL(valueChanged(int)),
61 mTimeLine,SLOT(setContentsPos(int))); 60 mTimeLine,SLOT(setContentsPos(int)));
62} 61}
63 62
64TimeSpanView::~TimeSpanView() 63TimeSpanView::~TimeSpanView()
65{ 64{
66} 65}
67 66