author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /korganizer/timespanview.cpp | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
-rw-r--r-- | korganizer/timespanview.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/korganizer/timespanview.cpp b/korganizer/timespanview.cpp index df8ff88..0908056 100644 --- a/korganizer/timespanview.cpp +++ b/korganizer/timespanview.cpp | |||
@@ -4,10 +4,14 @@ | |||
4 | #else | 4 | #else |
5 | #include <qsplitter.h> | 5 | #include <qsplitter.h> |
6 | #endif | 6 | #endif |
7 | #include <qlistview.h> | 7 | #include <q3listview.h> |
8 | #include <qlayout.h> | 8 | #include <qlayout.h> |
9 | #include <qheader.h> | 9 | #include <q3header.h> |
10 | #include <qpushbutton.h> | 10 | #include <qpushbutton.h> |
11 | //Added by qt3to4: | ||
12 | #include <Q3HBoxLayout> | ||
13 | #include <Q3VBoxLayout> | ||
14 | #include <Q3ValueList> | ||
11 | 15 | ||
12 | #include <klocale.h> | 16 | #include <klocale.h> |
13 | #include <kdebug.h> | 17 | #include <kdebug.h> |
@@ -21,7 +25,7 @@ | |||
21 | TimeSpanView::TimeSpanView( QWidget *parent, const char *name ) : | 25 | TimeSpanView::TimeSpanView( QWidget *parent, const char *name ) : |
22 | QWidget( parent, name ) | 26 | QWidget( parent, name ) |
23 | { | 27 | { |
24 | QBoxLayout *topLayout = new QVBoxLayout( this ); | 28 | Q3BoxLayout *topLayout = new Q3VBoxLayout( this ); |
25 | #ifndef DESKTOP_VERSION | 29 | #ifndef DESKTOP_VERSION |
26 | mSplitter = new QKSplitter( this ); | 30 | mSplitter = new QKSplitter( this ); |
27 | #else | 31 | #else |
@@ -29,11 +33,11 @@ TimeSpanView::TimeSpanView( QWidget *parent, const char *name ) : | |||
29 | #endif | 33 | #endif |
30 | topLayout->addWidget( mSplitter ); | 34 | topLayout->addWidget( mSplitter ); |
31 | 35 | ||
32 | mList = new QListView( mSplitter ); | 36 | mList = new Q3ListView( mSplitter ); |
33 | mList->addColumn( i18n("Summary") ); | 37 | mList->addColumn( i18n("Summary") ); |
34 | 38 | ||
35 | QWidget *rightPane = new QWidget( mSplitter ); | 39 | QWidget *rightPane = new QWidget( mSplitter ); |
36 | QBoxLayout *rightPaneLayout = new QVBoxLayout( rightPane ); | 40 | Q3BoxLayout *rightPaneLayout = new Q3VBoxLayout( rightPane ); |
37 | 41 | ||
38 | mTimeLine = new TimeLine( rightPane ); | 42 | mTimeLine = new TimeLine( rightPane ); |
39 | mTimeLine->setFixedHeight( mList->header()->height() ); | 43 | mTimeLine->setFixedHeight( mList->header()->height() ); |
@@ -42,7 +46,7 @@ TimeSpanView::TimeSpanView( QWidget *parent, const char *name ) : | |||
42 | mLineView = new LineView( rightPane ); | 46 | mLineView = new LineView( rightPane ); |
43 | rightPaneLayout->addWidget( mLineView ); | 47 | rightPaneLayout->addWidget( mLineView ); |
44 | 48 | ||
45 | QBoxLayout *buttonLayout = new QHBoxLayout( rightPaneLayout ); | 49 | Q3BoxLayout *buttonLayout = new Q3HBoxLayout( rightPaneLayout ); |
46 | 50 | ||
47 | QPushButton *zoomInButton = new QPushButton( i18n("Zoom In"), rightPane ); | 51 | QPushButton *zoomInButton = new QPushButton( i18n("Zoom In"), rightPane ); |
48 | connect( zoomInButton, SIGNAL( clicked() ), SLOT( zoomIn() ) ); | 52 | connect( zoomInButton, SIGNAL( clicked() ), SLOT( zoomIn() ) ); |
@@ -64,19 +68,19 @@ TimeSpanView::~TimeSpanView() | |||
64 | { | 68 | { |
65 | } | 69 | } |
66 | 70 | ||
67 | QValueList<int> TimeSpanView::splitterSizes() | 71 | Q3ValueList<int> TimeSpanView::splitterSizes() |
68 | { | 72 | { |
69 | return mSplitter->sizes(); | 73 | return mSplitter->sizes(); |
70 | } | 74 | } |
71 | 75 | ||
72 | void TimeSpanView::setSplitterSizes( QValueList<int> sizes ) | 76 | void TimeSpanView::setSplitterSizes( Q3ValueList<int> sizes ) |
73 | { | 77 | { |
74 | mSplitter->setSizes( sizes ); | 78 | mSplitter->setSizes( sizes ); |
75 | } | 79 | } |
76 | 80 | ||
77 | void TimeSpanView::addItem( KCal::Event *event ) | 81 | void TimeSpanView::addItem( KCal::Event *event ) |
78 | { | 82 | { |
79 | new QListViewItem( mList, event->summary() ); | 83 | new Q3ListViewItem( mList, event->summary() ); |
80 | 84 | ||
81 | QDateTime startDt = event->dtStart(); | 85 | QDateTime startDt = event->dtStart(); |
82 | QDateTime endDt = event->dtEnd(); | 86 | QDateTime endDt = event->dtEnd(); |