summaryrefslogtreecommitdiffabout
path: root/korganizer/koeventeditor.cpp
authorMichael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
committer Michael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
commita08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (side-by-side diff)
tree8ee90d686081c52e7c69b5ce946e9b1a7d690001 /korganizer/koeventeditor.cpp
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2
initial public commit of qt4 portp1
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
@@ -19,20 +19,25 @@
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#include <qtooltip.h>
-#include <qframe.h>
+#include <q3frame.h>
#include <qpixmap.h>
-#include <qhbox.h>
+#include <q3hbox.h>
#include <qtimer.h>
#include <qdir.h>
#include <qlayout.h>
-#include <qwidgetstack.h>
+#include <q3widgetstack.h>
#include <qapplication.h>
+#include <QDesktopWidget>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
+#include <Q3PtrList>
+#include <Q3VBoxLayout>
#include <kiconloader.h>
#include <kstandarddirs.h>
#include <kdebug.h>
#include <klocale.h>
#include <kfiledialog.h>
@@ -102,33 +107,33 @@ void KOEventEditor::setCategories( QString s )
void KOEventEditor::setupGeneral()
{
mGeneral = new KOEditorGeneralEvent( this, "KOEditorGeneralEvent" );
connect ( mGeneral, SIGNAL ( allAccepted() ), this, SLOT ( slotOk () ) );
if( KOPrefs::instance()->mCompactDialogs ) {
- QFrame *topFrame = addPage(i18n("General"));
- QBoxLayout *topLayout = new QVBoxLayout(topFrame);
+ Q3Frame *topFrame = addPage(i18n("General"));
+ Q3BoxLayout *topLayout = new Q3VBoxLayout(topFrame);
topLayout->setSpacing(spacingHint()-1);
topLayout->setMargin(marginHint()-1);
topLayout->addStretch ( 1 );
mGeneral->initHeader(topFrame,topLayout);
topLayout->addStretch ( 1 );
mGeneral->initTime(topFrame,topLayout);
topLayout->addStretch ( 1 );
// QBoxLayout *alarmLineLayout = new QHBoxLayout(topLayout);
mGeneral->initAlarm(topFrame,topLayout);
topLayout->addStretch ( 1 );
mGeneral->enableAlarm( false );
- QBoxLayout *buttonLayout;
+ Q3BoxLayout *buttonLayout;
if ( QApplication::desktop()->width() < 500 && QApplication::desktop()->height() > 240 )
- buttonLayout = new QVBoxLayout( topLayout );
+ buttonLayout = new Q3VBoxLayout( topLayout );
else
- buttonLayout = new QHBoxLayout( topLayout );
- QHBox* buttonWidget = new QHBox (topFrame);
- QIconSet icon;
+ buttonLayout = new Q3HBoxLayout( topLayout );
+ Q3HBox* buttonWidget = new Q3HBox (topFrame);
+ QIcon icon;
if ( QApplication::desktop()->width() < 321 )
icon = SmallIcon("fileexport16");
else
icon = SmallIcon("fileexport");
QPushButton * loadTemplate = new QPushButton( buttonWidget);
QPushButton * saveTemplate = new QPushButton( buttonWidget);
@@ -143,50 +148,50 @@ void KOEventEditor::setupGeneral()
loadTemplate->setFixedSize( size, size );
buttonLayout->addWidget( buttonWidget );
mGeneral->initCategories( topFrame, buttonLayout );
topLayout->addStretch( 1 );
- QFrame *topFrame2 = addPage(i18n("Details"));
+ Q3Frame *topFrame2 = addPage(i18n("Details"));
- QBoxLayout *topLayout2 = new QVBoxLayout(topFrame2);
+ Q3BoxLayout *topLayout2 = new Q3VBoxLayout(topFrame2);
topLayout2->setSpacing(spacingHint()-1);
topLayout2->setMargin(marginHint()-1);
topLayout2->setSpacing(spacingHint());
mGeneral->initClass(topFrame2,topLayout2);
mGeneral->initSecrecy( topFrame2, topLayout2 );
mGeneral->initDescription(topFrame2,topLayout2);
connect( saveTemplate, SIGNAL( clicked() ), this , SLOT( slotSaveTemplate() ) );
connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( slotLoadTemplate() ) );
} else {
- QFrame *topFrame = addPage(i18n("General"));
+ Q3Frame *topFrame = addPage(i18n("General"));
- QBoxLayout *topLayout = new QVBoxLayout(topFrame);
+ Q3BoxLayout *topLayout = new Q3VBoxLayout(topFrame);
topLayout->setSpacing(spacingHint());
mGeneral->initHeader(topFrame,topLayout);
mGeneral->initTime(topFrame,topLayout);
- QBoxLayout *alarmLineLayout = new QHBoxLayout(topLayout);
+ Q3BoxLayout *alarmLineLayout = new Q3HBoxLayout(topLayout);
mGeneral->initAlarm(topFrame,alarmLineLayout);
mGeneral->initClass(topFrame,alarmLineLayout);
mGeneral->initDescription(topFrame,topLayout);
- QBoxLayout *detailsLayout = new QHBoxLayout(topLayout);
+ Q3BoxLayout *detailsLayout = new Q3HBoxLayout(topLayout);
mGeneral->initCategories( topFrame, detailsLayout );
mGeneral->initSecrecy( topFrame, detailsLayout );
}
mGeneral->finishSetup();
}
void KOEventEditor::setupRecurrence()
{
- QFrame *topFrame = addPage( i18n("Recurrence") );
- QBoxLayout *topLayout = new QVBoxLayout( topFrame );
+ Q3Frame *topFrame = addPage( i18n("Recurrence") );
+ Q3BoxLayout *topLayout = new Q3VBoxLayout( topFrame );
mRecurrence = new KOEditorRecurrence( topFrame );
topLayout->addWidget( mRecurrence );
}
void KOEventEditor::editEvent(Event *event, bool showDescription)
@@ -353,13 +358,13 @@ void KOEventEditor::slotLoadTemplate()
ICalFormat format;
if ( !format.load( &cal, fileName ) ) {
KMessageBox::error( this, i18n("Error loading template file\n '%1'.")
.arg( fileName ) );
return ;
}
- QPtrList<Event> events = cal.events();
+ Q3PtrList<Event> events = cal.events();
Event* event = events.first();
if ( !event ) {
KMessageBox::error( this,
i18n("Template does not contain\na valid Event."));
} else {
kdDebug() << "KOEventEditor::slotLoadTemplate(): readTemplate" << endl;