summaryrefslogtreecommitdiffabout
path: root/korganizer/koeventeditor.cpp
Unidiff
Diffstat (limited to 'korganizer/koeventeditor.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeventeditor.cpp43
1 files changed, 24 insertions, 19 deletions
diff --git a/korganizer/koeventeditor.cpp b/korganizer/koeventeditor.cpp
index 3e87197..62ad250 100644
--- a/korganizer/koeventeditor.cpp
+++ b/korganizer/koeventeditor.cpp
@@ -22,14 +22,19 @@
22*/ 22*/
23 23
24#include <qtooltip.h> 24#include <qtooltip.h>
25#include <qframe.h> 25#include <q3frame.h>
26#include <qpixmap.h> 26#include <qpixmap.h>
27#include <qhbox.h> 27#include <q3hbox.h>
28#include <qtimer.h> 28#include <qtimer.h>
29#include <qdir.h> 29#include <qdir.h>
30#include <qlayout.h> 30#include <qlayout.h>
31#include <qwidgetstack.h> 31#include <q3widgetstack.h>
32#include <qapplication.h> 32#include <qapplication.h>
33#include <QDesktopWidget>
34//Added by qt3to4:
35#include <Q3HBoxLayout>
36#include <Q3PtrList>
37#include <Q3VBoxLayout>
33 38
34#include <kiconloader.h> 39#include <kiconloader.h>
35#include <kstandarddirs.h> 40#include <kstandarddirs.h>
@@ -105,8 +110,8 @@ void KOEventEditor::setupGeneral()
105 connect ( mGeneral, SIGNAL ( allAccepted() ), this, SLOT ( slotOk () ) ); 110 connect ( mGeneral, SIGNAL ( allAccepted() ), this, SLOT ( slotOk () ) );
106 111
107 if( KOPrefs::instance()->mCompactDialogs ) { 112 if( KOPrefs::instance()->mCompactDialogs ) {
108 QFrame *topFrame = addPage(i18n("General")); 113 Q3Frame *topFrame = addPage(i18n("General"));
109 QBoxLayout *topLayout = new QVBoxLayout(topFrame); 114 Q3BoxLayout *topLayout = new Q3VBoxLayout(topFrame);
110 topLayout->setSpacing(spacingHint()-1); 115 topLayout->setSpacing(spacingHint()-1);
111 topLayout->setMargin(marginHint()-1); 116 topLayout->setMargin(marginHint()-1);
112 topLayout->addStretch ( 1 ); 117 topLayout->addStretch ( 1 );
@@ -119,13 +124,13 @@ void KOEventEditor::setupGeneral()
119 topLayout->addStretch ( 1 ); 124 topLayout->addStretch ( 1 );
120 mGeneral->enableAlarm( false ); 125 mGeneral->enableAlarm( false );
121 126
122 QBoxLayout *buttonLayout; 127 Q3BoxLayout *buttonLayout;
123 if ( QApplication::desktop()->width() < 500 && QApplication::desktop()->height() > 240 ) 128 if ( QApplication::desktop()->width() < 500 && QApplication::desktop()->height() > 240 )
124 buttonLayout = new QVBoxLayout( topLayout ); 129 buttonLayout = new Q3VBoxLayout( topLayout );
125 else 130 else
126 buttonLayout = new QHBoxLayout( topLayout ); 131 buttonLayout = new Q3HBoxLayout( topLayout );
127 QHBox* buttonWidget = new QHBox (topFrame); 132 Q3HBox* buttonWidget = new Q3HBox (topFrame);
128 QIconSet icon; 133 QIcon icon;
129 if ( QApplication::desktop()->width() < 321 ) 134 if ( QApplication::desktop()->width() < 321 )
130 icon = SmallIcon("fileexport16"); 135 icon = SmallIcon("fileexport16");
131 else 136 else
@@ -146,9 +151,9 @@ void KOEventEditor::setupGeneral()
146 151
147 topLayout->addStretch( 1 ); 152 topLayout->addStretch( 1 );
148 153
149 QFrame *topFrame2 = addPage(i18n("Details")); 154 Q3Frame *topFrame2 = addPage(i18n("Details"));
150 155
151 QBoxLayout *topLayout2 = new QVBoxLayout(topFrame2); 156 Q3BoxLayout *topLayout2 = new Q3VBoxLayout(topFrame2);
152 topLayout2->setSpacing(spacingHint()-1); 157 topLayout2->setSpacing(spacingHint()-1);
153 topLayout2->setMargin(marginHint()-1); 158 topLayout2->setMargin(marginHint()-1);
154 topLayout2->setSpacing(spacingHint()); 159 topLayout2->setSpacing(spacingHint());
@@ -160,18 +165,18 @@ void KOEventEditor::setupGeneral()
160 connect( saveTemplate, SIGNAL( clicked() ), this , SLOT( slotSaveTemplate() ) ); 165 connect( saveTemplate, SIGNAL( clicked() ), this , SLOT( slotSaveTemplate() ) );
161 connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( slotLoadTemplate() ) ); 166 connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( slotLoadTemplate() ) );
162 } else { 167 } else {
163 QFrame *topFrame = addPage(i18n("General")); 168 Q3Frame *topFrame = addPage(i18n("General"));
164 169
165 QBoxLayout *topLayout = new QVBoxLayout(topFrame); 170 Q3BoxLayout *topLayout = new Q3VBoxLayout(topFrame);
166 topLayout->setSpacing(spacingHint()); 171 topLayout->setSpacing(spacingHint());
167 172
168 mGeneral->initHeader(topFrame,topLayout); 173 mGeneral->initHeader(topFrame,topLayout);
169 mGeneral->initTime(topFrame,topLayout); 174 mGeneral->initTime(topFrame,topLayout);
170 QBoxLayout *alarmLineLayout = new QHBoxLayout(topLayout); 175 Q3BoxLayout *alarmLineLayout = new Q3HBoxLayout(topLayout);
171 mGeneral->initAlarm(topFrame,alarmLineLayout); 176 mGeneral->initAlarm(topFrame,alarmLineLayout);
172 mGeneral->initClass(topFrame,alarmLineLayout); 177 mGeneral->initClass(topFrame,alarmLineLayout);
173 mGeneral->initDescription(topFrame,topLayout); 178 mGeneral->initDescription(topFrame,topLayout);
174 QBoxLayout *detailsLayout = new QHBoxLayout(topLayout); 179 Q3BoxLayout *detailsLayout = new Q3HBoxLayout(topLayout);
175 mGeneral->initCategories( topFrame, detailsLayout ); 180 mGeneral->initCategories( topFrame, detailsLayout );
176 mGeneral->initSecrecy( topFrame, detailsLayout ); 181 mGeneral->initSecrecy( topFrame, detailsLayout );
177 } 182 }
@@ -182,8 +187,8 @@ void KOEventEditor::setupGeneral()
182 187
183void KOEventEditor::setupRecurrence() 188void KOEventEditor::setupRecurrence()
184{ 189{
185 QFrame *topFrame = addPage( i18n("Recurrence") ); 190 Q3Frame *topFrame = addPage( i18n("Recurrence") );
186 QBoxLayout *topLayout = new QVBoxLayout( topFrame ); 191 Q3BoxLayout *topLayout = new Q3VBoxLayout( topFrame );
187 192
188 mRecurrence = new KOEditorRecurrence( topFrame ); 193 mRecurrence = new KOEditorRecurrence( topFrame );
189 topLayout->addWidget( mRecurrence ); 194 topLayout->addWidget( mRecurrence );
@@ -356,7 +361,7 @@ void KOEventEditor::slotLoadTemplate()
356 .arg( fileName ) ); 361 .arg( fileName ) );
357 return ; 362 return ;
358 } 363 }
359 QPtrList<Event> events = cal.events(); 364 Q3PtrList<Event> events = cal.events();
360 Event* event = events.first(); 365 Event* event = events.first();
361 if ( !event ) { 366 if ( !event ) {
362 KMessageBox::error( this, 367 KMessageBox::error( this,