summaryrefslogtreecommitdiffabout
path: root/korganizer
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
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2
initial public commit of qt4 portp1
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp148
-rw-r--r--korganizer/calendarview.h32
-rw-r--r--korganizer/calprintbase.cpp102
-rw-r--r--korganizer/calprinter.cpp23
-rw-r--r--korganizer/calprinter.h18
-rw-r--r--korganizer/calprintplugins.cpp4
-rw-r--r--korganizer/cellitem.cpp14
-rw-r--r--korganizer/cellitem.h4
-rw-r--r--korganizer/datenavigatorcontainer.cpp2
-rw-r--r--korganizer/datenavigatorcontainer.h5
-rw-r--r--korganizer/filteredit_base.cpp40
-rw-r--r--korganizer/filteredit_base.h42
-rw-r--r--korganizer/filtereditdialog.cpp11
-rw-r--r--korganizer/filtereditdialog.h6
-rw-r--r--korganizer/incomingdialog.cpp30
-rw-r--r--korganizer/incomingdialog.h10
-rw-r--r--korganizer/incomingdialog_base.cpp14
-rw-r--r--korganizer/incomingdialog_base.h22
-rw-r--r--korganizer/interfaces/korganizer/baseview.h8
-rw-r--r--korganizer/interfaces/korganizer/calendarviewbase.h4
-rw-r--r--korganizer/journalentry.cpp39
-rw-r--r--korganizer/journalentry.h9
-rw-r--r--korganizer/kdatenavigator.cpp20
-rw-r--r--korganizer/kdatenavigator.h11
-rw-r--r--korganizer/koagenda.cpp169
-rw-r--r--korganizer/koagenda.h43
-rw-r--r--korganizer/koagendaitem.cpp70
-rw-r--r--korganizer/koagendaitem.h17
-rw-r--r--korganizer/koagendaview.cpp78
-rw-r--r--korganizer/koagendaview.h52
-rw-r--r--korganizer/kocounterdialog.h2
-rw-r--r--korganizer/kodaymatrix.cpp47
-rw-r--r--korganizer/kodaymatrix.h14
-rw-r--r--korganizer/kodialogmanager.cpp8
-rw-r--r--korganizer/kodialogmanager.h4
-rw-r--r--korganizer/koeditordetails.cpp38
-rw-r--r--korganizer/koeditordetails.h12
-rw-r--r--korganizer/koeditorgeneral.cpp39
-rw-r--r--korganizer/koeditorgeneral.h21
-rw-r--r--korganizer/koeditorgeneralevent.cpp32
-rw-r--r--korganizer/koeditorgeneralevent.h12
-rw-r--r--korganizer/koeditorgeneraltodo.cpp39
-rw-r--r--korganizer/koeditorgeneraltodo.h16
-rw-r--r--korganizer/koeditorrecurrence.cpp94
-rw-r--r--korganizer/koeditorrecurrence.h30
-rw-r--r--korganizer/koeventeditor.cpp43
-rw-r--r--korganizer/koeventpopupmenu.cpp17
-rw-r--r--korganizer/koeventpopupmenu.h16
-rw-r--r--korganizer/koeventview.cpp4
-rw-r--r--korganizer/koeventview.h4
-rw-r--r--korganizer/koeventviewer.cpp37
-rw-r--r--korganizer/koeventviewer.h17
-rw-r--r--korganizer/koeventviewerdialog.cpp5
-rw-r--r--korganizer/koeventviewerdialog.h5
-rw-r--r--korganizer/kofilterview.cpp48
-rw-r--r--korganizer/kofilterview.h36
-rw-r--r--korganizer/koimportoldialog.cpp30
-rw-r--r--korganizer/koimportoldialog.h4
-rw-r--r--korganizer/koincidenceeditor.cpp10
-rw-r--r--korganizer/kojournalview.cpp36
-rw-r--r--korganizer/kojournalview.h15
-rw-r--r--korganizer/kolistview.cpp193
-rw-r--r--korganizer/kolistview.h42
-rw-r--r--korganizer/komonthview.cpp218
-rw-r--r--korganizer/komonthview.h57
-rw-r--r--korganizer/koprefs.cpp8
-rw-r--r--korganizer/koprefs.h11
-rw-r--r--korganizer/koprefsdialog.cpp138
-rw-r--r--korganizer/koprefsdialog.h12
-rw-r--r--korganizer/korganizer.pro57
-rw-r--r--korganizer/korganizerE.pro6
-rw-r--r--korganizer/kotimespanview.cpp20
-rw-r--r--korganizer/kotimespanview.h6
-rw-r--r--korganizer/kotodoeditor.cpp43
-rw-r--r--korganizer/kotodoview.cpp198
-rw-r--r--korganizer/kotodoview.h58
-rw-r--r--korganizer/kotodoviewitem.cpp42
-rw-r--r--korganizer/kotodoviewitem.h14
-rw-r--r--korganizer/koviewmanager.cpp8
-rw-r--r--korganizer/kowhatsnextview.cpp38
-rw-r--r--korganizer/kowhatsnextview.h20
-rw-r--r--korganizer/ktimeedit.cpp89
-rw-r--r--korganizer/ktimeedit.h7
-rw-r--r--korganizer/lineview.cpp2
-rw-r--r--korganizer/lineview.h8
-rw-r--r--korganizer/main.cpp10
-rw-r--r--korganizer/mainwindow.cpp316
-rw-r--r--korganizer/mainwindow.h68
-rw-r--r--korganizer/navigatorbar.cpp29
-rw-r--r--korganizer/navigatorbar.h7
-rw-r--r--korganizer/outgoingdialog.cpp28
-rw-r--r--korganizer/outgoingdialog.h10
-rw-r--r--korganizer/outgoingdialog_base.cpp18
-rw-r--r--korganizer/outgoingdialog_base.h22
-rw-r--r--korganizer/publishdialog.cpp18
-rw-r--r--korganizer/publishdialog.h4
-rw-r--r--korganizer/publishdialog_base.cpp27
-rw-r--r--korganizer/publishdialog_base.h28
-rw-r--r--korganizer/savetemplatedialog.cpp7
-rw-r--r--korganizer/searchdialog.cpp43
-rw-r--r--korganizer/searchdialog.h16
-rw-r--r--korganizer/statusdialog.cpp9
-rw-r--r--korganizer/timeline.cpp6
-rw-r--r--korganizer/timeline.h4
-rw-r--r--korganizer/timespanview.cpp22
-rw-r--r--korganizer/timespanview.h10
106 files changed, 2091 insertions, 1688 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 8385bcc..c1a2f76 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -29,28 +29,34 @@
*/
#include <stdlib.h>
#include <qapplication.h>
#include <qradiobutton.h>
-#include <qbuttongroup.h>
+#include <q3buttongroup.h>
#include <qlayout.h>
#include <qclipboard.h>
#include <qcursor.h>
#include <qmessagebox.h>
-#include <qprogressbar.h>
-#include <qmultilineedit.h>
+#include <q3progressbar.h>
+#include <q3multilineedit.h>
#include <qtimer.h>
-#include <qwidgetstack.h>
-#include <qptrlist.h>
+#include <q3widgetstack.h>
+#include <q3ptrlist.h>
#include <qregexp.h>
-#include <qgroupbox.h>
+#include <q3groupbox.h>
#include <qfile.h>
#include <qdir.h>
#ifndef KORG_NOSPLITTER
#include <qsplitter.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
+#include <QKeyEvent>
+#include <Q3Frame>
+#include <QLabel>
+#include <Q3ValueList>
#endif
#include <kglobal.h>
#include <kdebug.h>
#include <kstandarddirs.h>
#include <kfiledialog.h>
@@ -125,25 +131,25 @@
#endif
#ifndef _WIN32_
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#else
-#include <qprocess.h>
+#include <q3process.h>
#endif
#ifdef DESKTOP_VERSION
#include <kabc/stdaddressbook.h>
#endif
using namespace KOrg;
using namespace KCal;
extern int globalFlagBlockAgenda;
extern int globalFlagBlockStartup;
-MissedAlarmTextBrowser::MissedAlarmTextBrowser(QWidget *parent, QPtrList<Incidence> alarms,QDateTime start ) : QTextBrowser(parent)
+MissedAlarmTextBrowser::MissedAlarmTextBrowser(QWidget *parent, Q3PtrList<Incidence> alarms,QDateTime start ) : Q3TextBrowser(parent)
{
mAlarms = alarms;
viewport()->setBackgroundColor( QColor( 255, 255, 255 ) );
QString mText = "<table width=\"100%\">\n";
//mText += "<tr bgcolor=\"#3679AD\"><td><h2>";
@@ -274,19 +280,19 @@ class KOBeamPrefs : public QDialog
{
public:
KOBeamPrefs( QWidget *parent=0, const char *name=0 ) :
QDialog( parent, name, true )
{
setCaption( i18n("Beam Options") );
- QVBoxLayout* lay = new QVBoxLayout( this );
+ Q3VBoxLayout* lay = new Q3VBoxLayout( this );
lay->setSpacing( 3 );
lay->setMargin( 3 );
- QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("File format"), this );
+ Q3ButtonGroup* format = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("File format"), this );
lay->addWidget( format );
format->setExclusive ( true ) ;
- QButtonGroup* time = new QButtonGroup(1, Horizontal, i18n("Time format"), this );
+ Q3ButtonGroup* time = new Q3ButtonGroup(1, Qt::Horizontal, i18n("Time format"), this );
lay->addWidget( time ); time->setExclusive ( true ) ;
vcal = new QRadioButton(" vCalendar ", format );
ical = new QRadioButton(" iCalendar ", format );
vcal->setChecked( true );
tz = new QRadioButton(i18n(" With timezone "), time );
local = new QRadioButton(i18n(" Local time "), time );
@@ -309,18 +315,18 @@ class KOCatPrefs : public QDialog
{
public:
KOCatPrefs( QWidget *parent=0, const char *name=0 ) :
QDialog( parent, name, true )
{
setCaption( i18n("Manage new Categories") );
- QVBoxLayout* lay = new QVBoxLayout( this );
+ Q3VBoxLayout* lay = new Q3VBoxLayout( this );
lay->setSpacing( 3 );
lay->setMargin( 3 );
QLabel * lab = new QLabel( i18n("After importing/loading/syncing there may be new categories in events or todos which are not added automatically to the category list. Please choose what to do <b>now</b>:"), this );
lay->addWidget( lab );
- QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this );
+ Q3ButtonGroup* format = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("New categories not in list:"), this );
lay->addWidget( format );
format->setExclusive ( true ) ;
addCatBut = new QRadioButton(i18n("Add to category list"), format );
new QRadioButton(i18n("Remove from Events/Todos"), format );
addCatBut->setChecked( true );
QPushButton * ok = new QPushButton( i18n("Change category list now!"), this );
@@ -370,13 +376,13 @@ void CalendarView::init()
flag_blockConflict = false;
flag_blockScrollBar = false;
flag_checkFileFirsttime = true;
flag_clearallviewsEventDisplay = false;
flag_clearallviewsupdateView = false;
mNextAlarmDateTime = QDateTime::currentDateTime();
- setFocusPolicy (NoFocus );
+ setFocusPolicy (Qt::NoFocus );
mViewerCallerIsSearchDialog = false;
mBlockShowDates = false;
mConflictingEvent = 0;
mDatePickerMode = 0;
mCurrentSyncDevice = "";
mViewManager = new KOViewManager( this );
@@ -391,13 +397,13 @@ void CalendarView::init()
mCalendar->registerObserver( this );
// TODO: Make sure that view is updated, when calendar is changed.
mStorage = new FileStorage( mCalendar );
mNavigator = new DateNavigator( this, "datevav", mViewManager );
- QBoxLayout *topLayout = (QBoxLayout*)layout();
+ Q3BoxLayout *topLayout = (Q3BoxLayout*)layout();
#ifndef KORG_NOSPLITTER
// create the main layout frames.
mPanner = new QSplitter(QSplitter::Horizontal,this,"CalendarView::Panner");
topLayout->addWidget(mPanner);
mLeftSplitter = new QSplitter(QSplitter::Vertical,mPanner,
@@ -422,15 +428,15 @@ void CalendarView::init()
SLOT( updateView() ) );
} else {
mResourceView = 0;
}
#endif
QWidget *rightBox = new QWidget( mPanner );
- QBoxLayout *rightLayout = new QVBoxLayout( rightBox );
+ Q3BoxLayout *rightLayout = new Q3VBoxLayout( rightBox );
- mRightFrame = new QWidgetStack( rightBox );
+ mRightFrame = new Q3WidgetStack( rightBox );
rightLayout->addWidget( mRightFrame, 1 );
mLeftFrame = mLeftSplitter;
#else
//QWidget *mainBox = new QWidget( this );
//QWidget *leftFrame = new QWidget( mainBox );
@@ -451,13 +457,13 @@ void CalendarView::init()
mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up );
}
mMainFrame->setSizePolicy( QSizePolicy (QSizePolicy::Expanding,QSizePolicy::Expanding) );
//QBoxLayout * leftFrameLayout;
topLayout->addWidget( mMainFrame );
#ifdef DESKTOP_VERSION
- mDateScrollBar = new QScrollBar ( 1, 365, 1,30, 200,QScrollBar::Horizontal, this );
+ mDateScrollBar = new QScrollBar ( 1, 365, 1,30, 200,Qt::Horizontal, this );
topLayout->addWidget( mDateScrollBar );
connect( mDateScrollBar, SIGNAL( valueChanged ( int ) ),this, SLOT( scrollBarValue( int )) );
if ( QApplication::desktop()->width() < 800 )
mDateScrollBar->hide();
#endif
//mainBoxLayout->addWidget (mLeftFrame);
@@ -498,14 +504,14 @@ void CalendarView::init()
}
#endif
mFilterView->hide();
mCalEditView->hide();
QWidget *rightBox = new QWidget( mMainFrame );
//mainBoxLayout->addWidget ( rightBox, 10 );
- QBoxLayout *rightLayout = new QVBoxLayout( rightBox );
- mRightFrame = new QWidgetStack( rightBox );
+ Q3BoxLayout *rightLayout = new Q3VBoxLayout( rightBox );
+ mRightFrame = new Q3WidgetStack( rightBox );
rightLayout->addWidget( mRightFrame, 10 );
//mLeftFrame = (QWidget *)leftFrame;
if ( KOPrefs::instance()->mVerticalScreen ) {
//mDateNavigator->setFixedHeight( mDateNavigator->sizeHint().height() );
//mDateNavigator->setMinimumWidth( mDateNavigator->sizeHint().width() );
@@ -613,15 +619,15 @@ void CalendarView::init()
connect( mTodoList,SIGNAL( incidenceSelected( Incidence * ) ),
SLOT( processTodoListSelection( Incidence * ) ) );
connect(mTodoList,SIGNAL(isModified(bool)),SLOT(setModified(bool)));
// kdDebug() << "CalendarView::CalendarView() done" << endl;
- mDateFrame = new QVBox(0,0,WType_Popup);
+ mDateFrame = new Q3VBox(0,0,Qt::WType_Popup);
//mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised);
- mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised );
+ mDateFrame->setFrameStyle( Q3Frame::WinPanel |Q3Frame::Raised );
mDateFrame->setLineWidth(3);
mDateFrame->hide();
mDateFrame->setCaption( i18n( "Pick a date to display"));
mDatePicker = new KDatePicker ( mDateFrame , QDate::currentDate() );
connect(mDatePicker,SIGNAL(dateSelected(QDate)),SLOT(slotSelectPickerDate(QDate)));
@@ -666,13 +672,13 @@ CalendarView::~CalendarView()
void CalendarView::nextConflict( bool all, bool allday )
{
if ( flag_blockConflict ) return;
flag_blockConflict = true;
- QPtrList<Event> testlist = mCalendar->events();
+ Q3PtrList<Event> testlist = mCalendar->events();
Event * test = testlist.first();
while ( test ) {
test->setTagged( false );
test = testlist.next();
}
QTime st ( 0,0,0);
@@ -682,13 +688,13 @@ void CalendarView::nextConflict( bool all, bool allday )
QDateTime startDT = QDateTime (mNavigator->selectedDates().first(),st);
QDateTime conflict;
QDateTime retVal;
bool found = false;
Event * cE = 0;
Event * cE2 = 0;
- QPtrList<Event> testlist2 = testlist;
+ Q3PtrList<Event> testlist2 = testlist;
test = testlist.first();
bool skip = false;
topLevelWidget()->setCaption( i18n("Checking conflicts ... please wait") );
//QTime tm;
//tm.start();
while ( test ) {
@@ -832,13 +838,13 @@ void CalendarView::updateView(const QDate &start, const QDate &end)
void CalendarView::checkFiles()
{
QString message;
- QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
+ Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
KopiCalendarFile * cal = calendars.first();
while ( cal ) {
if ( cal->mErrorOnLoad ) {
message += cal->mName +"\n"+KGlobal::formatMessage ( "(" +i18n( "Filepath: ")+ cal->mFileName+")" ,0 )+"\n";
}
cal = calendars.next();
@@ -854,24 +860,24 @@ void CalendarView::checkFiles()
}
void CalendarView::checkAlarms()
{
KConfig *config = KOGlobals::config();
config->setGroup( "AppRun" );
QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) );
- int daysto = dt.daysTo( QDate::currentDate() );
+ int daysto = dt.daysTo( (QDateTime)QDate::currentDate() );
int days = config->readNumEntry( "LatestProgramStopDays" , daysto);
dt = dt.addDays( days );
int secto = dt.secsTo( QDateTime::currentDateTime() );
int secs = config->readNumEntry( "LatestProgramStopSecs" , secto) - 30;
//qDebug("KO: Reading program stop %d ", secs);
//secs -= ( 3600 * 24*3 ); // debug only
QDateTime latest = dt.addSecs ( secs );
qDebug("KO: Last termination on %s ", latest.toString().latin1());
//qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() );
- QPtrList<Incidence> el = mCalendar->rawIncidences();
- QPtrList<Incidence> al;
+ Q3PtrList<Incidence> el = mCalendar->rawIncidences();
+ Q3PtrList<Incidence> al;
Incidence* inL = el.first();
QDateTime cur = QDateTime::currentDateTime().addSecs(-59);
qDebug("KO: Checking alarm until %s ", cur.toString().latin1());
while ( inL ) {
bool ok = false;
int offset = 0;
@@ -883,15 +889,15 @@ void CalendarView::checkAlarms()
//qDebug("found missed alarm: %s ", inL->summary().latin1() );
}
}
inL = el.next();
}
if ( al.count() ) {
- QDialog* dia = new QDialog( this, "huhu", false, WDestructiveClose | WStyle_StaysOnTop );
+ QDialog* dia = new QDialog( this, "huhu", false, Qt::WDestructiveClose | Qt::WStyle_StaysOnTop );
dia->setCaption( i18n("KO/Pi: Missing alarms!") );
- QVBoxLayout* lay = new QVBoxLayout( dia );
+ Q3VBoxLayout* lay = new Q3VBoxLayout( dia );
lay->setSpacing( 0 );
lay->setMargin( 0 );
MissedAlarmTextBrowser* matb = new MissedAlarmTextBrowser ( dia, al, latest );
connect( matb, SIGNAL( showIncidence( QString ) ),SLOT( showIncidence( QString ) ));
lay->addWidget( matb );
if ( QApplication::desktop()->width() == 480 || QApplication::desktop()->width() == 640 ) {
@@ -1213,13 +1219,13 @@ void CalendarView::computeAlarm( QString msg )
#ifndef _WIN32_
if ( vfork () == 0 ) {
execl ( tempfilename.latin1(), 0 );
return;
}
#else
- QProcess* p = new QProcess();
+ Q3Process* p = new Q3Process();
p->addArgument( tempfilename.latin1() );
p->start();
return;
#endif
return;
@@ -1263,16 +1269,16 @@ void CalendarView::addSuspendAlarm(const QDateTime &qdt, const QString &noti )
#ifdef DESKTOP_VERSION
if ( QApplication::desktop()->width() < 1024 ) {
QString mess = qdt.toString( "yyyy-MM-dd hh:mm:ss" ) + "\n" + noti;
//qDebug("nextsuspendalarm = \n%s ",mess.latin1() );
QString fn = QDir::homeDirPath() + "/.kopi_suspend_alarm";
QFile file( fn );
- if (!file.open( IO_WriteOnly ) ) {
+ if (!file.open( QIODevice::WriteOnly ) ) {
qDebug("KO: Error writing next suspend alarm file %s\nContent: \n%s ", fn.latin1(), mess.latin1());
} else {
- QTextStream ts( &file );
+ Q3TextStream ts( &file );
ts << mess;
file.close();
}
}
#endif
@@ -1291,16 +1297,16 @@ void CalendarView::addAlarm(const QDateTime &qdt, const QString &noti )
#ifdef DESKTOP_VERSION
if ( QApplication::desktop()->width() < 1024 ) {
QString mess = qdt.toString( "yyyy-MM-dd hh:mm:ss" ) + "\n" + noti;
//qDebug("nextalarm = \n%s ",mess.latin1() );
QString fn = QDir::homeDirPath() + "/.kopi_next_alarm";
QFile file( fn );
- if (!file.open( IO_WriteOnly ) ) {
+ if (!file.open( QIODevice::WriteOnly ) ) {
qDebug("KO: Error writing next alarm file %s\nContent: \n%s ", fn.latin1(), mess.latin1());
} else {
- QTextStream ts( &file );
+ Q3TextStream ts( &file );
ts << mess;
file.close();
}
}
#endif
int maxSec;
@@ -1567,13 +1573,13 @@ Event* CalendarView::getLastSyncEvent()
return lse;
}
// we check, if the to delete event has a id for a profile
// if yes, we set this id in the profile to delete
-void CalendarView::checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete )
+void CalendarView::checkExternSyncEvent( Q3PtrList<Event> lastSync , Incidence* toDelete )
{
if ( lastSync.count() == 0 ) {
//qDebug(" lastSync.count() == 0");
return;
}
if ( toDelete->typeID() == journalID )
@@ -1597,13 +1603,13 @@ void CalendarView::checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* t
eve = lastSync.next();
}
}
void CalendarView::checkExternalId( Incidence * inc )
{
- QPtrList<Event> lastSync = mCalendar->getExternLastSyncEvents() ;
+ Q3PtrList<Event> lastSync = mCalendar->getExternLastSyncEvents() ;
checkExternSyncEvent( lastSync, inc );
}
// SSSSSSSSSSSSSSSSSSSSSS
bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int mode )
{
@@ -1621,14 +1627,14 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
Event* eventR;
QString uid;
int take;
Event* eventRSync;
Event* eventLSync;
clearAllViews();
- QPtrList<Event> eventRSyncSharp = remote->getExternLastSyncEvents();
- QPtrList<Event> eventLSyncSharp = local->getExternLastSyncEvents();
+ Q3PtrList<Event> eventRSyncSharp = remote->getExternLastSyncEvents();
+ Q3PtrList<Event> eventLSyncSharp = local->getExternLastSyncEvents();
bool fullDateRange = false;
local->resetTempSyncStat();
mLastCalendarSync = QDateTime::currentDateTime();
if ( mSyncManager->syncWithDesktop() ) {
remote->resetPilotStat(1);
if ( KSyncManager::mRequestedSyncEvent.isValid() ) {
@@ -1681,16 +1687,16 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
if ( mCurrentSyncDevice == "deleteaftersync" ) {
mLastCalendarSync = loadedFileVersion;
//qDebug("setting mLastCalendarSync ");
}
//qDebug("*************************** ");
qDebug("KO: mLastCalendarSync %s .Full: %d",mLastCalendarSync.toString().latin1(), fullDateRange);
- QPtrList<Incidence> er = remote->rawIncidences();
+ Q3PtrList<Incidence> er = remote->rawIncidences();
Incidence* inR = er.first();
Incidence* inL;
- QProgressBar bar( er.count(),0 );
+ Q3ProgressBar bar( er.count(),0 );
bar.setCaption (i18n("Syncing - close to abort!") );
// ************** setting up filter *************
CalFilter *filterIN = 0;
CalFilter *filterOUT = 0;
CalFilter *filter = mFilters.first();
@@ -1828,13 +1834,13 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
++filteredIN;
}
}
}
inR = er.next();
}
- QPtrList<Incidence> el = local->rawIncidences();
+ Q3PtrList<Incidence> el = local->rawIncidences();
inL = el.first();
modulo = (el.count()/10)+1;
bar.setCaption (i18n("Add / remove events") );
bar.setTotalSteps ( el.count() ) ;
bar.show();
incCounter = 0;
@@ -2045,13 +2051,13 @@ void CalendarView::syncExternal( int mode )
syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs );
getEventViewerDialog()->setSyncMode( false );
qApp->processEvents();
if ( syncOK ) {
if ( mSyncManager->mWriteBackFile )
{
- QPtrList<Incidence> iL = mCalendar->rawIncidences();
+ Q3PtrList<Incidence> iL = mCalendar->rawIncidences();
Incidence* inc = iL.first();
if ( phoneFormat ) {
while ( inc ) {
inc->removeID(mCurrentSyncDevice);
inc = iL.next();
}
@@ -2112,13 +2118,13 @@ bool CalendarView::importBday()
KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true );
KABC::AddressBook::Iterator it;
int count = 0;
for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) {
++count;
}
- QProgressBar bar(count,0 );
+ Q3ProgressBar bar(count,0 );
int w = 300;
if ( QApplication::desktop()->width() < 320 )
w = 220;
int h = bar.sizeHint().height() ;
int dw = QApplication::desktop()->width();
int dh = QApplication::desktop()->height();
@@ -2183,13 +2189,13 @@ void CalendarView::insertBirthdays(const QString& uid, const QStringList& birthd
int count = birthdayList.count();
int addCount = 0;
KCal::Attendee* a = 0;
//qDebug("CalView 1 %i", count);
- QProgressBar bar(count,0 );
+ Q3ProgressBar bar(count,0 );
int w = 300;
if ( QApplication::desktop()->width() < 320 )
w = 220;
int h = bar.sizeHint().height() ;
int dw = QApplication::desktop()->width();
int dh = QApplication::desktop()->height();
@@ -2347,13 +2353,13 @@ void CalendarView::setSyncEventsReadOnly()
{
mCalendar->setSyncEventsReadOnly();
}
bool CalendarView::loadCalendars()
{
- QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
+ Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
KopiCalendarFile * cal = calendars.first();
mCalendar->setDefaultCalendar( 1 );
openCalendar( MainWindow::defaultFileName(), false );
cal = calendars.next();
while ( cal ) {
addCalendar( cal );
@@ -2361,13 +2367,13 @@ bool CalendarView::loadCalendars()
}
restoreCalendarSettings();
return true;
}
bool CalendarView::restoreCalendarSettings()
{
- QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
+ Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
KopiCalendarFile * cal = calendars.first();
while ( cal ) {
mCalendar->setCalendarEnabled( cal->mCalNumber,cal->isEnabled );
mCalendar->setAlarmEnabled( cal->mCalNumber, cal->isAlarmEnabled );
mCalendar->setReadOnly( cal->mCalNumber, cal->isReadOnly );
if ( cal->isStandard )
@@ -2526,13 +2532,13 @@ void CalendarView::watchSavedFile()
return;
}
loadedFileVersion = dt;
}
bool CalendarView::checkAllFileVersions()
{
- QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
+ Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
KopiCalendarFile * cal = calendars.first();
mCalendar->setDefaultCalendar( 1 );
mCalendar->setDefaultCalendarEnabledOnly();
if ( !cal->isReadOnly && !cal->mErrorOnLoad ) {
if ( !checkFileVersion(MainWindow::defaultFileName())) {
restoreCalendarSettings();
@@ -2588,13 +2594,13 @@ bool CalendarView::checkFileVersion(QString fn)
if ( e )
mCalendar->deleteEvent( e );
return true;
}
bool CalendarView::saveCalendars()
{
- QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
+ Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
KopiCalendarFile * cal = calendars.first();
mCalendar->setDefaultCalendar( 1 );
mCalendar->setDefaultCalendarEnabledOnly();
QString saveError;
if ( !saveCalendar( MainWindow::defaultFileName() ) )
saveError = cal->mName +"\n";
@@ -2692,13 +2698,13 @@ void CalendarView::readSettings()
// read settings from the KConfig, supplying reasonable
// defaults where none are to be found
KConfig *config = KOGlobals::config();
#ifndef KORG_NOSPLITTER
config->setGroup("KOrganizer Geometry");
- QValueList<int> sizes = config->readIntListEntry("Separator1");
+ Q3ValueList<int> sizes = config->readIntListEntry("Separator1");
if (sizes.count() != 2) {
sizes << mDateNavigator->minimumSizeHint().width();
sizes << 300;
}
mPanner->setSizes(sizes);
@@ -2760,13 +2766,13 @@ void CalendarView::readSettings()
getEventViewerDialog()->setGeometry(x,y,w,h);
}
#endif
config->setGroup( "Views" );
int dateCount = config->readNumEntry( "ShownDatesCount", 7 );
- QValueList<int> sizes = config->readIntListEntry("Left Splitter Frame");
+ Q3ValueList<int> sizes = config->readIntListEntry("Left Splitter Frame");
int resetval = 0;
int maxVal = 0;
if (sizes.count() != 3) {
if ( KOPrefs::instance()->mVerticalScreen ) {
resetval = mDateNavigator->sizeHint().width()+2;
@@ -2839,13 +2845,13 @@ void CalendarView::writeSettings()
//KOPrefs::instance()->usrWriteConfig();
KOPrefs::instance()->writeConfig();
writeFilterSettings(config);
config->setGroup( "AppRun" );
QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) );
- int days = dt.daysTo( QDate::currentDate() );
+ int days = dt.daysTo( (QDateTime)QDate::currentDate() );
dt = dt.addDays( days );
int secs = dt.secsTo( QDateTime::currentDateTime() );
config->writeEntry( "LatestProgramStopDays", days );
config->writeEntry( "LatestProgramStopSecs", secs );
//qDebug("KO: Writing stop time: %d ", secs);
//qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() );
@@ -2866,15 +2872,15 @@ void CalendarView::writeSettings()
qDebug("dt daylight_wrong %s ",dt_daylight_wrong.toString().latin1() );
qDebug("Computed secsTo %d . in minutes: %d . in hours: %d ", secsto, secsto/60, secsto/3600);
qDebug("********************* testcode end");
#endif
- QValueList<int> listINT = mLeftFrame->sizes();
+ Q3ValueList<int> listINT = mLeftFrame->sizes();
config->writeEntry("Left Splitter Frame",listINT);
- QValueList<int> listINT2 = mMainFrame->sizes();
+ Q3ValueList<int> listINT2 = mMainFrame->sizes();
config->writeEntry("Main Splitter Frame",listINT2);
#ifdef DESKTOP_VERSION
config->setGroup("WidgetLayout");
QStringList list ;//= config->readListEntry("MainLayout");
int x,y,w,h;
QWidget* wid;
@@ -3163,13 +3169,13 @@ void CalendarView::checkConflictForEvent()
}
if ( filterIN ) {
if ( !filterIN->filterCalendarItem( conflictingEvent ) ) {
return;
}
}
- QPtrList<Event> testlist = mCalendar->events();
+ Q3PtrList<Event> testlist = mCalendar->events();
Event * test = testlist.first();
QDateTime conflict;
QDateTime retVal;
bool found = false;
Event * cE = 0;
bool chAD = KOPrefs::instance()->mCheckConflictsAllDayAllDay;
@@ -3425,13 +3431,13 @@ void CalendarView::slotSelectPickerDate( QDate d)
mMoveIncidence->setRevision( mMoveIncidence->revision()+1 );
}
}
void CalendarView::removeCategories()
{
- QPtrList<Incidence> incList = mCalendar->rawIncidences();
+ Q3PtrList<Incidence> incList = mCalendar->rawIncidences();
QStringList catList = KOPrefs::instance()->mCustomCategories;
QStringList catIncList;
QStringList newCatList;
Incidence* inc = incList.first();
uint i;
while ( inc ) {
@@ -3446,13 +3452,13 @@ void CalendarView::removeCategories()
inc = incList.next();
}
}
int CalendarView::addCategories()
{
- QPtrList<Incidence> incList = mCalendar->rawIncidences();
+ Q3PtrList<Incidence> incList = mCalendar->rawIncidences();
QStringList catList = KOPrefs::instance()->mCustomCategories;
QStringList catIncList;
Incidence* inc = incList.first();
uint i;
int count = 0;
while ( inc ) {
@@ -3504,29 +3510,29 @@ void CalendarView::manageCategories()
}
delete cp;
}
void CalendarView::beamIncidence(Incidence * Inc)
{
- QPtrList<Incidence> delSel ;
+ Q3PtrList<Incidence> delSel ;
delSel.append(Inc);
beamIncidenceList( delSel );
}
void CalendarView::beamCalendar()
{
- QPtrList<Incidence> delSel = mCalendar->rawIncidences();
+ Q3PtrList<Incidence> delSel = mCalendar->rawIncidences();
//qDebug("beamCalendar() ");
beamIncidenceList( delSel );
}
void CalendarView::beamFilteredCalendar()
{
- QPtrList<Incidence> delSel = mCalendar->incidences();
+ Q3PtrList<Incidence> delSel = mCalendar->incidences();
//qDebug("beamFilteredCalendar() ");
beamIncidenceList( delSel );
}
-void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel )
+void CalendarView::beamIncidenceList(Q3PtrList<Incidence> delSel )
{
KOBeamPrefs beamDialog;
if ( beamDialog.exec () == QDialog::Rejected )
return;
#ifdef DESKTOP_VERSION
@@ -4312,13 +4318,13 @@ void CalendarView::schedule_publish(Incidence *incidence)
KMessageBox::sorry(this,i18n("No event selected."));
return;
}
PublishDialog *publishdlg = new PublishDialog();
if (incidence->attendeeCount()>0) {
- QPtrList<Attendee> attendees = incidence->attendees();
+ Q3PtrList<Attendee> attendees = incidence->attendees();
attendees.first();
while ( attendees.current()!=0 ) {
publishdlg->addAttendee(attendees.current());
attendees.next();
}
}
@@ -4721,13 +4727,13 @@ void CalendarView::showDates(const DateList &selectedDates)
}
}
topLevelWidget()->setCaption( i18n("Dates: ") + selDates );
}
-QPtrList<CalFilter> CalendarView::filters()
+Q3PtrList<CalFilter> CalendarView::filters()
{
return mFilters;
}
void CalendarView::editFilters()
{
@@ -4762,13 +4768,13 @@ void CalendarView::selectFilter( int fil )
void CalendarView::showFilter(bool visible)
{
#if 1
if (visible) {
mCalEditView->readConfig();
mCalEditView->show();
- QValueList<int> sizes;
+ Q3ValueList<int> sizes;
sizes = mLeftFrame->sizes();
if ( sizes.count() == 4 && sizes[3] < 20 ) {
sizes.clear();
sizes << 100;
sizes << 0;
sizes << 0;
@@ -4843,27 +4849,27 @@ void CalendarView::takeOverEvent()
void CalendarView::takeOverCalendar()
{
// TODO: Create Calendar::allIncidences() function and use it here
clearAllViews();
- QPtrList<Event> events = mCalendar->events();
+ Q3PtrList<Event> events = mCalendar->events();
for(uint i=0; i<events.count(); ++i) {
events.at(i)->setOrganizer(KOPrefs::instance()->email());
events.at(i)->recreate();
events.at(i)->setReadOnly(false);
}
- QPtrList<Todo> todos = mCalendar->todos();
+ Q3PtrList<Todo> todos = mCalendar->todos();
for(uint i=0; i<todos.count(); ++i) {
todos.at(i)->setOrganizer(KOPrefs::instance()->email());
todos.at(i)->recreate();
todos.at(i)->setReadOnly(false);
}
- QPtrList<Journal> journals = mCalendar->journals();
+ Q3PtrList<Journal> journals = mCalendar->journals();
for(uint i=0; i<journals.count(); ++i) {
journals.at(i)->setOrganizer(KOPrefs::instance()->email());
journals.at(i)->recreate();
journals.at(i)->setReadOnly(false);
}
@@ -4872,13 +4878,13 @@ void CalendarView::takeOverCalendar()
void CalendarView::showIntro()
{
kdDebug() << "To be implemented." << endl;
}
-QWidgetStack *CalendarView::viewStack()
+Q3WidgetStack *CalendarView::viewStack()
{
return mRightFrame;
}
QWidget *CalendarView::leftFrame()
{
@@ -5057,13 +5063,13 @@ void CalendarView::lookForIncomingMessages()
icd->retrieve();
}
bool CalendarView::removeCompletedSubTodos( Todo* t )
{
bool deleteTodo = true;
- QPtrList<Incidence> subTodos;
+ Q3PtrList<Incidence> subTodos;
Incidence *aTodo;
subTodos = t->relations();
for (aTodo = subTodos.first(); aTodo; aTodo = subTodos.next()) {
if (! removeCompletedSubTodos( (Todo*) aTodo ))
deleteTodo = false;
}
@@ -5083,14 +5089,14 @@ void CalendarView::purgeCompleted()
{
int result = KMessageBox::warningContinueCancel(this,
i18n("Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)"),i18n("Purge Todos"),i18n("Purge"));
if (result == KMessageBox::Continue) {
- QPtrList<Todo> todoCal;
- QPtrList<Todo> rootTodos;
+ Q3PtrList<Todo> todoCal;
+ Q3PtrList<Todo> rootTodos;
//QPtrList<Incidence> rel;
Todo *aTodo;
todoCal = calendar()->todos();
for (aTodo = todoCal.first(); aTodo; aTodo = todoCal.next()) {
if ( !aTodo->relatedTo() )
rootTodos.append( aTodo );
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index 60b1276..b4eada7 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -21,19 +21,21 @@
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#ifndef CALENDARVIEW_H
#define CALENDARVIEW_H
-#include <qframe.h>
+#include <q3frame.h>
#include <qlayout.h>
#include <qwidget.h>
-#include <qptrlist.h>
-#include <qvbox.h>
+#include <q3ptrlist.h>
+#include <q3vbox.h>
#include <qmap.h>
#include <qscrollbar.h>
+//Added by qt3to4:
+#include <QKeyEvent>
#ifndef DESKTOP_VERSION
#include <qtopia/ir.h>
#else
#define Ir char
#endif
#include <libkcal/calendar.h>
@@ -44,13 +46,13 @@
#include <korganizer/calendarviewbase.h>
#include <ksyncmanager.h>
//#include <koprefs.h>
-class QWidgetStack;
+class Q3WidgetStack;
class QSplitter;
class KopiCalendarFile;
class CalPrinter;
class KOFilterView;
class KOCalEditView;
class KOViewManager;
@@ -81,25 +83,25 @@ using namespace KCal;
event editor, search dialog etc.
@short main calendar view widget
@author Cornelius Schumacher
*/
-#include <qtextbrowser.h>
+#include <q3textbrowser.h>
#include <qtextcodec.h>
-class MissedAlarmTextBrowser : public QTextBrowser {
+class MissedAlarmTextBrowser : public Q3TextBrowser {
Q_OBJECT
public:
- MissedAlarmTextBrowser(QWidget *parent, QPtrList<Incidence> alarms ,QDateTime start);
+ MissedAlarmTextBrowser(QWidget *parent, Q3PtrList<Incidence> alarms ,QDateTime start);
~MissedAlarmTextBrowser();
void setSource(const QString & n);
private:
Incidence * getNextInc(QDateTime start );
- QPtrList<Incidence> mAlarms;
+ Q3PtrList<Incidence> mAlarms;
signals:
void showIncidence( QString uid);
};
class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Observer, public KSyncInterface
@@ -124,13 +126,13 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
KOViewManager *viewManager();
KODialogManager *dialogManager();
QDate startDate();
QDate endDate();
- QWidgetStack *viewStack();
+ Q3WidgetStack *viewStack();
QWidget *leftFrame();
DateNavigator *dateNavigator();
KDateNavigator *dateNavigatorWidget();
void addView(KOrg::BaseView *);
@@ -438,13 +440,13 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
void schedule_publish_freebusy(int daysToPublish = 30);
void openAddressbook();
void editFilters();
void toggleFilerEnabled();
- QPtrList<CalFilter> filters();
+ Q3PtrList<CalFilter> filters();
void toggleFilter();
void showFilter(bool visible);
void updateFilter();
void filterEdited();
void selectFilter( int );
KOFilterView *filterView();
@@ -492,13 +494,13 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
void showDatePicker() ;
void showDatePickerPopup() ;
void moveIncidence(Incidence *) ;
void beamIncidence(Incidence *) ;
void beamCalendar() ;
void beamFilteredCalendar() ;
- void beamIncidenceList(QPtrList<Incidence>) ;
+ void beamIncidenceList(Q3PtrList<Incidence>) ;
void manageCategories();
void editCategories();
int addCategories();
void removeCategories();
void setSyncDevice( QString );
void setSyncName( QString );
@@ -572,13 +574,13 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
QTimer* mRecheckAlarmTimer;
void computeAlarm( QString );
void startAlarm( QString, QString );
void setSyncEventsReadOnly();
QDateTime loadedFileVersion;
- void checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete );
+ void checkExternSyncEvent( Q3PtrList<Event> lastSync , Incidence* toDelete );
void checkExternalId( Incidence * inc );
int mGlobalSyncMode;
QString mCurrentSyncDevice;
QString mCurrentSyncName;
void init();
int mDatePickerMode;
@@ -590,16 +592,16 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
CalPrinter *mCalPrinter;
QSplitter *mPanner;
QSplitter *mLeftSplitter;
KDGanttMinimizeSplitter *mLeftFrame, *mMainFrame;
- QWidgetStack *mRightFrame;
+ Q3WidgetStack *mRightFrame;
KDatePicker* mDatePicker;
- QVBox* mDateFrame;
+ Q3VBox* mDateFrame;
DateNavigatorContainer *mDateNavigator; // widget showing small month view.
KOFilterView *mFilterView;
KOCalEditView *mCalEditView;
@@ -615,13 +617,13 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
DateNavigator *mNavigator;
KOViewManager *mViewManager;
KODialogManager *mDialogManager;
// Calendar filters
- QPtrList<CalFilter> mFilters;
+ Q3PtrList<CalFilter> mFilters;
// various housekeeping variables.
bool mModified; // flag indicating if calendar is modified
bool mReadOnly; // flag indicating if calendar is read-only
QDate mSaveSingleDate;
diff --git a/korganizer/calprintbase.cpp b/korganizer/calprintbase.cpp
index 7b7d54c..ecb9e03 100644
--- a/korganizer/calprintbase.cpp
+++ b/korganizer/calprintbase.cpp
@@ -22,17 +22,19 @@
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#include <qpainter.h>
#include <qlayout.h>
-#include <qframe.h>
+#include <q3frame.h>
#include <qlabel.h>
-#include <qptrlist.h>
-#include <qintdict.h>
+#include <q3ptrlist.h>
+#include <q3intdict.h>
#include <qfontmetrics.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
#include <kglobal.h>
#include <klocale.h>
#include <kdebug.h>
#include <kconfig.h>
#include <kcalendarsystem.h>
@@ -142,14 +144,14 @@ CalPrintBase::~CalPrintBase()
}
QWidget *CalPrintBase::configWidget( QWidget *w )
{
- QFrame *wdg = new QFrame( w );
- QVBoxLayout *layout = new QVBoxLayout( wdg );
+ Q3Frame *wdg = new Q3Frame( w );
+ Q3VBoxLayout *layout = new Q3VBoxLayout( wdg );
QLabel *title = new QLabel( description(), wdg );
QFont titleFont( title->font() );
titleFont.setPointSize( 20 );
titleFont.setBold( true );
title->setFont( titleFont );
@@ -282,13 +284,13 @@ void CalPrintBase::drawSmallMonth(QPainter &p, const QDate &qd,
int month = monthDate.month();
// draw the title
p.setFont(QFont("helvetica", 7, QFont::Bold));
// int lineSpacing = p.fontMetrics().lineSpacing();
const KCalendarSystem *calSys = KOGlobals::self()->calendarSystem();
- p.drawText(x, y, width, height/4, AlignCenter, calSys->monthName( qd ) );
+ p.drawText(x, y, width, height/4, Qt::AlignCenter, calSys->monthName( qd ) );
int cellWidth = width/7;
int cellHeight = height/8;
QString tmpStr;
// correct begin of week
@@ -298,13 +300,13 @@ void CalPrintBase::drawSmallMonth(QPainter &p, const QDate &qd,
// draw days of week
p.setFont(QFont("helvetica", 7, QFont::Bold));
for (int col = 0; col < 7; col++) {
// tmpStr.sprintf("%c",(const char*)monthDate2.dayName(monthDate2.dayOfWeek()));
tmpStr=calSys->weekDayName( monthDate2 )[0].upper();
p.drawText(x+col*cellWidth, y+height/4, cellWidth, cellHeight,
- AlignCenter, tmpStr);
+ Qt::AlignCenter, tmpStr);
monthDate2 = monthDate2.addDays(1);
}
// draw separator line
p.drawLine(x, y+height/4+cellHeight, x+width, y+height/4+cellHeight);
@@ -315,13 +317,13 @@ void CalPrintBase::drawSmallMonth(QPainter &p, const QDate &qd,
if (firstCol) {
firstCol = true;
col = weekdayColumn( monthDate.dayOfWeek() );
}
p.drawText( x+col*cellWidth,
y+height/4+cellHeight+(row*cellHeight),
- cellWidth, cellHeight, AlignCenter,
+ cellWidth, cellHeight, Qt::AlignCenter,
tmpStr.setNum(monthDate.day()) );
monthDate = monthDate.addDays(1);
}
}
}
@@ -355,13 +357,13 @@ void CalPrintBase::drawDaysOfWeekBox(QPainter &p, const QDate &qd,
p.setFont( QFont( "helvetica", 10, QFont::Bold ) );
p.drawRect( x, y, width, height );
// p.fillRect( x+1, y+1,
// width-2, height-2,
// QBrush( Dense7Pattern ) );
- p.drawText( x+5, y, width-10, height, AlignCenter | AlignVCenter,
+ p.drawText( x+5, y, width-10, height, Qt::AlignCenter | Qt::AlignVCenter,
calSys->weekDayName( qd ) );
}
void CalPrintBase::drawTimeLine(QPainter &p,
const QTime &fromTime, const QTime &toTime,
@@ -398,22 +400,22 @@ void CalPrintBase::drawTimeLine(QPainter &p,
if (cellHeight > 30) {
p.setFont(QFont("helvetica", 16, QFont::Bold));
} else {
p.setFont(QFont("helvetica", 12, QFont::Bold));
}
p.drawText(x+2, (int)currY+2, width/2-2, (int)cellHeight,
- AlignTop|AlignRight, numStr);
+ Qt::AlignTop|Qt::AlignRight, numStr);
p.setFont(QFont("helvetica", 10, QFont::Normal));
p.drawText(x+width/2, (int)currY+2, width/2+2, (int)(cellHeight/2)-3,
- AlignTop | AlignLeft, "00");
+ Qt::AlignTop | Qt::AlignLeft, "00");
} else {
QTime time( curTime.hour(), 0 );
numStr = KGlobal::locale()->formatTime( time );
p.setFont(QFont("helvetica", 14, QFont::Bold));
p.drawText(x+2, (int)currY+2, width-4, (int)cellHeight/2-3,
- AlignTop|AlignLeft, numStr);
+ Qt::AlignTop|Qt::AlignLeft, numStr);
}
currY+=cellHeight;
} // enough space for half-hour line and time
if (curTime.secsTo(endTime)>3600)
curTime=curTime.addSecs(3600);
else curTime=endTime;
@@ -469,13 +471,13 @@ void CalPrintBase::drawAllDayBox(QPainter &p, Event::List &eventList,
if (mUseColors)
setCategoryColors(p, currEvent);
p.drawRect( x, offset, width, height );
p.drawText( x+5, offset+5, width-10, height-10,
- AlignCenter | AlignVCenter | AlignJustify | WordBreak,
+ Qt::AlignCenter | Qt::AlignVCenter | Qt::AlignJustify | Qt::WordBreak,
text );
// reset the colors
p.setBrush( oldBrush );
p.setPen( oldPen );
p.setBackgroundColor(oldBgColor);
@@ -490,13 +492,13 @@ void CalPrintBase::drawAllDayBox(QPainter &p, Event::List &eventList,
if (!expandable) {
p.drawRect(x, offset, width, height);
if (!multiDayStr.isEmpty()) {
// p.fillRect(x+1, offset+1, width-2, height-2, QBrush(Dense5Pattern) );
p.drawText( x+5, offset+5, width-10, height-10,
- AlignLeft | AlignTop | AlignJustify ,
+ Qt::AlignLeft | Qt::AlignTop | Qt::AlignJustify ,
multiDayStr);
}
} else {
height=offset-y;
}
}
@@ -557,21 +559,21 @@ void CalPrintBase::drawAgendaDayBox( QPainter &p, Event::List &events,
QDateTime startPrintDate = QDateTime( qd, fromTime );
QDateTime endPrintDate = QDateTime( qd, toTime );
// Calculate horizontal positions and widths of events taking into account
// overlapping events
- QPtrList<KOrg::CellItem> cells;
+ Q3PtrList<KOrg::CellItem> cells;
cells.setAutoDelete( true );
Event::List::ConstIterator itEvents;
for( itEvents = events.begin(); itEvents != events.end(); ++itEvents ) {
cells.append( new PrintCellItem( *itEvents, qd ) );
}
- QPtrListIterator<KOrg::CellItem> it1( cells );
+ Q3PtrListIterator<KOrg::CellItem> it1( cells );
for( it1.toFirst(); it1.current(); ++it1 ) {
KOrg::CellItem *placeItem = it1.current();
KOrg::CellItem::placeItem( cells, placeItem );
}
@@ -590,13 +592,13 @@ void CalPrintBase::drawAgendaDayBox( QPainter &p, Event::List &events,
p.setBrush( oldBrush );
p.setPen( oldPen );
p.setBackgroundColor( oldBgColor );
}
- p.setBrush( QBrush( NoBrush ) );
+ p.setBrush( QBrush( Qt::NoBrush ) );
}
void CalPrintBase::drawAgendaItem( PrintCellItem *item, QPainter &p,
const QDate &qd,
const QDateTime &startPrintDate,
@@ -632,13 +634,13 @@ void CalPrintBase::drawAgendaItem( PrintCellItem *item, QPainter &p,
// p.save();
QPen pe = p.pen();
pe.setWidth( 2 );
p.setPen( pe );
p.drawRect( currentX, currentyPos+1, currentWidth+1, eventLength+1 );
p.drawText( currentX+3, currentyPos+2, currentWidth-5, eventLength-3,
- AlignLeft | AlignTop | AlignJustify | WordBreak,
+ Qt::AlignLeft | Qt::AlignTop | Qt::AlignJustify | Qt::TextWordWrap,
text);
// p.restore();
}
}
void CalPrintBase::drawDayBox(QPainter &p, const QDate &qd,
@@ -667,23 +669,23 @@ void CalPrintBase::drawDayBox(QPainter &p, const QDate &qd,
hstring=KOCore::self()->holiday(qd);
#endif
if (!hstring.isEmpty()) {
p.setFont( QFont( "helvetica", 8, QFont::Bold, true ) );
- p.drawText( x+5, y, width-25, mSubHeaderHeight, AlignLeft | AlignVCenter,
+ p.drawText( x+5, y, width-25, mSubHeaderHeight, Qt::AlignLeft | Qt::AlignVCenter,
hstring );
}
p.setFont(QFont("helvetica", 10, QFont::Bold));
if ( fullDate) {
// use short date format, if long date is too long
QFontMetrics fm ( p.font() );
if ( fm.width( dayNumStr ) > width -10 )
dayNumStr = local->formatDate(qd, true);
}
- p.drawText(x+5, y, width-10, mSubHeaderHeight, AlignRight | AlignVCenter,
+ p.drawText(x+5, y, width-10, mSubHeaderHeight, Qt::AlignRight | Qt::AlignVCenter,
dayNumStr);
Event::List eventList;
eventList.fill( mCalendar->events( qd, true ));
Todo::List todos;
todos.fill( mCalendar->todos( qd ));
QString outStr;
@@ -721,13 +723,13 @@ void CalPrintBase::drawDayBox(QPainter &p, const QDate &qd,
outStr += " " + currEvent->summary();
}
} // doesFloat
p.drawText(x+5, y+textY, width-10, lineSpacing,
- AlignLeft|AlignBottom, outStr);
+ Qt::AlignLeft|Qt::AlignBottom, outStr);
textY+=lineSpacing;
}
if ( textY<height ) {
Todo::List::ConstIterator it2;
@@ -740,13 +742,13 @@ void CalPrintBase::drawDayBox(QPainter &p, const QDate &qd,
text += " ";
}
}
text += i18n("To-Do: %1").arg(todo->summary());
p.drawText(x+5, y+textY, width-10, lineSpacing,
- AlignLeft|AlignBottom, text);
+ Qt::AlignLeft|Qt::AlignBottom, text);
textY+=lineSpacing;
}
}
}
@@ -846,13 +848,13 @@ void CalPrintBase::drawMonth(QPainter &p, const QDate &qd, bool weeknumbers,
p.setFont(newFont);
xoffset += 18;
QDate weekDate(monthDate);
for (int row = 0; row<rows; row++) {
int calWeek = weekDate.weekNumber();
QRect rc(x, y+yoffset+cellHeight*row, xoffset-1, cellHeight);
- p.drawText( rc, AlignRight|AlignVCenter, QString::number(calWeek) );
+ p.drawText( rc, Qt::AlignRight|Qt::AlignVCenter, QString::number(calWeek) );
weekDate = weekDate.addDays(7);
}
p.setFont(oldFont);
}
drawDaysOfWeek( p, monthDate, monthDate.addDays(6), x+xoffset, y, width-xoffset, mSubHeaderHeight );
@@ -894,31 +896,31 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
int posdue=posDueDt;
if (posdue<0) posdue=x+width;
QRect rect;
TodoParentStart startpt;
// This list keeps all starting points of the parent todos so the connection
// lines of the tree can easily be drawn (needed if a new page is started)
- static QPtrList<TodoParentStart> startPoints;
+ static Q3PtrList<TodoParentStart> startPoints;
if (level<1) {
startPoints.clear();
}
// size of item
outStr=item->summary();
if ( ! item->location().isEmpty() )
outStr += " ("+item->location()+")";
if ( item->hasDueDate() && posDueDt>=0 ) {
outStr += " [" +local->formatDate(item->dtDue().date(),true)+"]";
}
int left = possummary+(level*10);
- rect = p.boundingRect(left, y, (posdue-left-5),-1, WordBreak, outStr);
+ rect = p.boundingRect(left, y, (posdue-left-5),-1, Qt::WordBreak, outStr);
//qDebug("bottom1 %d ", rect.bottom() );
if ( !item->description().isEmpty() && desc ) {
outStr = item->description();
rect = p.boundingRect( left+20, rect.bottom()+5, width-(left+10-x), -1,
- WordBreak, outStr );
+ Qt::WordBreak, outStr );
}
//qDebug("bottom2 %d y+h %d y %d ph %d", rect.bottom(), y+height, y , pageHeight );
// if too big make new page
if ( rect.bottom() > y+height) {
// first draw the connection lines from parent todos:
if (level > 0 && connectSubTodos) {
@@ -930,14 +932,13 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
// draw either from start point of parent or from top of the page
if (rct->mSamePage)
start = rct->mRect.bottom() + 1;
else
start = p.viewport().top();
- p.moveTo( center, start );
- p.lineTo( center, to );
+ p.drawLine( center, start, center, to );
rct->mSamePage=false;
}
}
y=0;
height=pageHeight-y;
mPrinter->newPage();
@@ -948,26 +949,26 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
if (r && pospriority >= 0 ) {
pospriority = r->mRect.right() + 1;
}
// Priority
outStr.setNum(priority);
- rect = p.boundingRect(pospriority, y + 10, 5, -1, AlignCenter, outStr);
+ rect = p.boundingRect(pospriority, y + 10, 5, -1, Qt::AlignCenter, outStr);
// Make it a more reasonable size
rect.setWidth(19);
rect.setHeight(19);
if ( priority > 0 && pospriority>=0 ) {
- p.drawText(rect, AlignCenter, outStr);
+ p.drawText(rect, Qt::AlignCenter, outStr);
p.drawRect(rect);
// cross out the rectangle for completed items
if ( item->isCompleted() ) {
p.drawLine( rect.topLeft(), rect.bottomRight() );
p.drawLine( rect.topRight(), rect.bottomLeft() );
} else if (item->cancelled() ) {
QPen pen = p.pen();
- p.setPen ( QPen ( black, 2) );
+ p.setPen ( QPen ( Qt::black, 2) );
p.drawLine( rect.left()+2,rect.top()+rect.height()/2, rect.right()-2, +rect.top()+rect.height()/2 );
p.setPen( pen );
}
}
startpt.mRect = rect; //save for later
@@ -978,15 +979,14 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
if (r->mSamePage )
bottom = r->mRect.bottom();//lutz + 1;
else
bottom = 0;
int to( rect.top() + (rect.height()/2)+1 );
int endx( rect.left() );
- p.moveTo(center, bottom);
- p.lineTo(center, to);
- p.lineTo(endx, to);
+ p.drawLine(center,bottom, center,to);
+ p.drawLine(center,to, endx,to);
}
// if completed, use strike out font
// LR does not work - font is underlined, not striked out
//QFont ft=p.font();
//ft.setStrikeOut( item->isCompleted() );
@@ -996,15 +996,15 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
if ( ! item->location().isEmpty() )
outStr += " ("+item->location()+")";
if ( item->hasDueDate() && posDueDt>=0 ) {
outStr += " [" +item->dtDueStr(true)+"]";
}
rect = p.boundingRect( left, rect.top(), (posdue-(left + rect.width() + 5)),
- -1, WordBreak, outStr);
+ -1, Qt::WordBreak, outStr);
QRect newrect;
- p.drawText( rect, WordBreak, outStr, -1, &newrect );
+ p.drawText( rect, Qt::WordBreak, outStr, -1, &newrect );
//ft.setStrikeOut(false);
// p.setFont(ft);
// due
// if ( item->hasDueDate() && posDueDt>=0 ) {
// outStr = local->formatDate(item->dtDue().date(),true);
@@ -1013,14 +1013,14 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
// }
if ( !item->description().isEmpty() && desc ) {
y=newrect.bottom() + 5;
outStr = item->description();
rect = p.boundingRect( left+20, y, x+width-(left+10), -1,
- WordBreak, outStr );
- p.drawText( rect, WordBreak, outStr, -1, &newrect );
+ Qt::WordBreak, outStr );
+ p.drawText( rect, Qt::WordBreak, outStr, -1, &newrect );
}
// Set the new line position
y=newrect.bottom() + 10; //set the line position
// If the item has subitems, we need to call ourselves recursively
@@ -1135,14 +1135,14 @@ void CalPrintBase::drawSplitHeaderRight( QPainter &p, const QDate &fd,
int width, int )
{
int tempStore = mSubHeaderHeight;
mSubHeaderHeight+= mSubHeaderHeight;
KLocale *local = KGlobal::locale();
QFont font("helvetica", 18, QFont::Bold);
- QPen penA( black,0);
- QPen penB( black,3);
+ QPen penA( Qt::black,0);
+ QPen penB( Qt::black,3);
p.setFont(font);
int lineSpacing = p.fontMetrics().lineSpacing();
QString title;
QString myOwner(mCalendar->getOwner());
if ( fd.month() == td.month() ) {
title = local->monthName(fd.month(), false) + ' ' + QString::number(fd.day()) + ' '
@@ -1158,23 +1158,23 @@ void CalPrintBase::drawSplitHeaderRight( QPainter &p, const QDate &fd,
// serifFont.setWeight(87);
// serifFont.setItalic(true);
p.setFont(serifFont);
QFontInfo info(p.font());
lineSpacing = p.fontMetrics().lineSpacing();
- p.drawText(0, lineSpacing * 0, width, lineSpacing, AlignRight |AlignTop, title );
+ p.drawText(0, lineSpacing * 0, width, lineSpacing, Qt::AlignRight |Qt::AlignTop, title );
title.truncate(0);
p.setPen(penB );
p.drawLine(200, lineSpacing * 1, width, lineSpacing * 1);
p.setPen(penA );
p.setFont(QFont("Helvetica", 20, QFont::Bold, TRUE));
title += QString::number(fd.year());
- p.drawText(0, lineSpacing * 1, width, lineSpacing, AlignRight |AlignTop, title );
+ p.drawText(0, lineSpacing * 1, width, lineSpacing, Qt::AlignRight |Qt::AlignTop, title );
mSubHeaderHeight = tempStore ;
}
void CalPrintBase::drawSplitDay( QPainter &p, const QDate &qd, int width,
int height, int offsetLeft )
{
@@ -1194,13 +1194,13 @@ void CalPrintBase::drawSplitDay( QPainter &p, const QDate &qd, int width,
// width+1 to make sure there's a continuous, black bar across the top.
p.setPen( QPen(Qt::black,2));
p.drawRect(offsetLeft, mHeaderHeight + 5, width +1, mSubHeaderHeight);
p.setPen( Qt::black);
p.setFont(QFont("helvetica", 12, QFont::Bold, true));
p.drawText(offsetLeft, mHeaderHeight + 5,
- width, mSubHeaderHeight, AlignHCenter | AlignVCenter,
+ width, mSubHeaderHeight, Qt::AlignHCenter | Qt::AlignVCenter,
dayName);
p.setPen( QPen(Qt::black,2));
p.setFont(QFont("helvetica", 12));
p.setBrush(Qt::white);
it = eventList.begin();
@@ -1251,16 +1251,16 @@ void CalPrintBase::drawSplitDay( QPainter &p, const QDate &qd, int width,
int endMinuteOff = (int) (minuteInc * currEvent->dtEnd().time().minute());
int cheight = (int) (minuteInc *
currEvent->dtStart().secsTo(currEvent->dtEnd()) / 60 );
p.drawRect(offsetLeft+2, 1+offset+startMinuteOff+startTime*cellHeight,
width-4, cheight);
p.drawText(offsetLeft+12, offset+startMinuteOff+startTime*cellHeight+5, width-24,
- cheight-10, AlignHCenter | AlignTop, text);
+ cheight-10, Qt::AlignHCenter | Qt::AlignTop, text);
}
}
- p.setBrush(QBrush(NoBrush));
+ p.setBrush(QBrush(Qt::NoBrush));
mSubHeaderHeight = tempStore ;
}
void CalPrintBase::drawSplitTimes( QPainter &p, int width, int timeWidth,
int height )
{
@@ -1271,36 +1271,36 @@ void CalPrintBase::drawSplitTimes( QPainter &p, int width, int timeWidth,
int offset = mHeaderHeight + mSubHeaderHeight + 10;
int hours = endHour - startHour;
int cellHeight = (height-offset) / hours; // hour increments.
QString numStr;
for (int i = 0; i < hours; i++) {
- p.setPen(QPen(black,1));
+ p.setPen(QPen(Qt::black,1));
p.drawLine(0, offset+i*cellHeight, width, offset+i*cellHeight);
- p.setPen(QPen(gray,0));
+ p.setPen(QPen(Qt::gray,0));
p.drawLine(37, offset+i*cellHeight+(cellHeight/2),
width, offset+i*cellHeight+(cellHeight/2));
- p.setPen(QPen(black,0));
+ p.setPen(QPen(Qt::black,0));
if ( !KGlobal::locale()->use12Clock() ) {
numStr.setNum(i+startHour);
if (cellHeight > 40) {
p.setFont(QFont("helvetica", 16, QFont::Bold));
} else {
p.setFont(QFont("helvetica", 14, QFont::Bold));
}
p.drawText(0, offset+i*cellHeight, 33, cellHeight/2,
- AlignTop|AlignRight, numStr);
+ Qt::AlignTop|Qt::AlignRight, numStr);
p.setFont(QFont("helvetica", 12, QFont::Bold));
p.drawText(37, offset+i*cellHeight, 45, cellHeight/2,
- AlignTop | AlignLeft, "00");
+ Qt::AlignTop | Qt::AlignLeft, "00");
} else {
QTime time( i + startHour, 0 );
numStr = KGlobal::locale()->formatTime( time );
p.setFont(QFont("helvetica", 12, QFont::Bold));
p.drawText(4, offset+i*cellHeight, 70, cellHeight/2,
- AlignTop|AlignLeft, numStr);
+ Qt::AlignTop|Qt::AlignLeft, numStr);
}
} mSubHeaderHeight = tempStore ;
}
#endif
diff --git a/korganizer/calprinter.cpp b/korganizer/calprinter.cpp
index 0cdf28e..d4bf988 100644
--- a/korganizer/calprinter.cpp
+++ b/korganizer/calprinter.cpp
@@ -18,21 +18,24 @@
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 <qvbuttongroup.h>
-#include <qwidgetstack.h>
+// #include <qvbuttongroup.h>
+#include <q3widgetstack.h>
#include <qradiobutton.h>
#include <qlayout.h>
#include <qpushbutton.h>
#include <qcombobox.h>
#include <qlabel.h>
-#include <qvbox.h>
+#include <q3vbox.h>
#include <qsplitter.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
+#include <Q3PtrList>
#include <kprinter.h>
#include <kglobal.h>
#include <ksimpleconfig.h>
#include <kmessagebox.h>
#include <kdebug.h>
@@ -171,43 +174,43 @@ void CalPrinter::updateConfig()
{
}
/****************************************************************************/
-CalPrintDialog::CalPrintDialog( QPtrList<CalPrintBase> plugins, KPrinter *p,
+CalPrintDialog::CalPrintDialog( Q3PtrList<CalPrintBase> plugins, KPrinter *p,
QWidget *parent, const char *name )
: KDialogBase( parent, name, /*modal*/true, i18n("Print"), Ok | Cancel ),
mPrinter( p ), mPrintPlugins( plugins )
{
- QVBox *page = new QVBox(this);//makeVBoxMainWidget();
+ Q3VBox *page = new Q3VBox(this);//makeVBoxMainWidget();
setMainWidget( page );
- QHBox *printerLayout = new QHBox( page );
+ Q3HBox *printerLayout = new Q3HBox( page );
mPrinterLabel = new QLabel( printerLayout );
QPushButton *setupButton = new QPushButton( i18n("&Setup Printer..."),
printerLayout );
setupButton->setSizePolicy( QSizePolicy(
(QSizePolicy::SizeType)4, (QSizePolicy::SizeType)0,
0, 0, setupButton->sizePolicy().hasHeightForWidth() ) );
QSplitter *splitter = new QSplitter( page );
- splitter->setOrientation( QSplitter::Horizontal );
+ splitter->setOrientation( Qt::Horizontal );
- mTypeGroup = new QVButtonGroup( i18n("View Type"), splitter, "buttonGroup" );
+ mTypeGroup = new Q3VButtonGroup( i18n("View Type"), splitter, "buttonGroup" );
// use the minimal width possible = max width of the radio buttons, not extensible
/* mTypeGroup->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4,
(QSizePolicy::SizeType)5, 0, 0,
mTypeGroup->sizePolicy().hasHeightForWidth() ) );*/
QWidget *splitterRight = new QWidget( splitter, "splitterRight" );
- QGridLayout *splitterRightLayout = new QGridLayout( splitterRight );
+ Q3GridLayout *splitterRightLayout = new Q3GridLayout( splitterRight );
splitterRightLayout->setMargin( marginHint() );
splitterRightLayout->setSpacing( spacingHint() );
- mConfigArea = new QWidgetStack( splitterRight, "configWidgetStack" );
+ mConfigArea = new Q3WidgetStack( splitterRight, "configWidgetStack" );
splitterRightLayout->addMultiCellWidget( mConfigArea, 0,0, 0,1 );
QLabel *orientationLabel = new QLabel( i18n("Page &orientation:"),
splitterRight, "orientationLabel" );
splitterRightLayout->addWidget( orientationLabel, 1, 0 );
diff --git a/korganizer/calprinter.h b/korganizer/calprinter.h
index 7b58f4f..e065779 100644
--- a/korganizer/calprinter.h
+++ b/korganizer/calprinter.h
@@ -1,6 +1,8 @@
+//Added by qt3to4:
+#include <QLabel>
/*
This file is part of KOrganizer.
Copyright (c) 1998 Preston Brown
This program is free software; you can redistribute it and/or modify
@@ -25,24 +27,24 @@
#define _CALPRINTER_H
// #define KORG_NOPRINTER
#ifndef KORG_NOPRINTER
-#include <qptrlist.h>
+#include <q3ptrlist.h>
#include <kdialogbase.h>
#include <korganizer/baseview.h>
#include "calprintbase.h"
using namespace KCal;
-class QVButtonGroup;
-class QWidgetStack;
+class Q3VButtonGroup;
+class Q3WidgetStack;
class KPrinter;
class CalPrintDialog;
class KConfig;
class QComboBox;
class QLabel;
@@ -91,13 +93,13 @@ class CalPrinter : public QObject, public KOrg::CalPrinterBase
public:
void preview( PrintType type, const QDate &fd, const QDate &td );
void print( PrintType type, const QDate &fd, const QDate &td );
protected:
- QPtrList<CalPrintBase> mPrintPlugins;
+ Q3PtrList<CalPrintBase> mPrintPlugins;
private:
KPrinter *mPrinter;
Calendar *mCalendar;
QWidget *mParent;
KConfig *mConfig;
@@ -106,13 +108,13 @@ class CalPrinter : public QObject, public KOrg::CalPrinterBase
};
class CalPrintDialog : public KDialogBase
{
Q_OBJECT
public:
- CalPrintDialog( QPtrList<CalPrintBase> plugins, KPrinter *p,
+ CalPrintDialog( Q3PtrList<CalPrintBase> plugins, KPrinter *p,
QWidget *parent = 0, const char *name = 0 );
virtual ~CalPrintDialog();
CalPrintBase *selectedPlugin();
CalPrinter::ePrintOrientation orientation() { return mOrientation; }
public slots:
@@ -124,15 +126,15 @@ class CalPrintDialog : public KDialogBase
void setupPrinter();
void setPrinterLabel();
signals:
void okClicked();
private:
KPrinter *mPrinter;
- QVButtonGroup *mTypeGroup;
- QWidgetStack *mConfigArea;
- QPtrList<CalPrintBase> mPrintPlugins;
+ Q3VButtonGroup *mTypeGroup;
+ Q3WidgetStack *mConfigArea;
+ Q3PtrList<CalPrintBase> mPrintPlugins;
QLabel *mPrinterLabel;
QString mPreviewText;
QComboBox *mOrientationSelection;
CalPrinter::ePrintOrientation mOrientation;
};
diff --git a/korganizer/calprintplugins.cpp b/korganizer/calprintplugins.cpp
index bc35ca4..9b6dc6e 100644
--- a/korganizer/calprintplugins.cpp
+++ b/korganizer/calprintplugins.cpp
@@ -22,17 +22,17 @@
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 <qpainter.h>
-#include <qdatetimeedit.h>
+#include <q3datetimeedit.h>
#include <qdatetime.h>
#include <qcheckbox.h>
#include <qlineedit.h>
-#include <qbuttongroup.h>
+#include <q3buttongroup.h>
#include <kglobal.h>
#include <klocale.h>
#include <kdebug.h>
#include <kprinter.h>
#include <kconfig.h>
diff --git a/korganizer/cellitem.cpp b/korganizer/cellitem.cpp
index 61d06ac..1fd703c 100644
--- a/korganizer/cellitem.cpp
+++ b/korganizer/cellitem.cpp
@@ -24,32 +24,34 @@
#include "cellitem.h"
#include <klocale.h>
#include <kdebug.h>
-#include <qintdict.h>
+#include <q3intdict.h>
+//Added by qt3to4:
+#include <Q3PtrList>
using namespace KOrg;
QString CellItem::label() const
{
return i18n("<undefined>");
}
-QPtrList<CellItem> CellItem::placeItem( QPtrList<CellItem> cells,
+Q3PtrList<CellItem> CellItem::placeItem( Q3PtrList<CellItem> cells,
CellItem *placeItem )
{
kdDebug(5855) << "Placing " << placeItem->label() << endl;
- QPtrList<KOrg::CellItem> conflictItems;
+ Q3PtrList<KOrg::CellItem> conflictItems;
int maxSubCells = 0;
- QIntDict<KOrg::CellItem> subCellDict;
+ Q3IntDict<KOrg::CellItem> subCellDict;
// Find all items which are in same cell
- QPtrListIterator<KOrg::CellItem> it2( cells );
+ Q3PtrListIterator<KOrg::CellItem> it2( cells );
for( it2.toFirst(); it2.current(); ++it2 ) {
KOrg::CellItem *item = it2.current();
if ( item == placeItem ) continue;
if ( item->overlaps( placeItem ) ) {
kdDebug(5855) << " Overlaps: " << item->label() << endl;
@@ -80,13 +82,13 @@ QPtrList<CellItem> CellItem::placeItem( QPtrList<CellItem> cells,
kdDebug(5855) << " Sub cells: " << maxSubCells << endl;
// Write results to item to be placed
conflictItems.append( placeItem );
placeItem->setSubCells( maxSubCells );
- QPtrListIterator<KOrg::CellItem> it3( conflictItems );
+ Q3PtrListIterator<KOrg::CellItem> it3( conflictItems );
for( it3.toFirst(); it3.current(); ++it3 ) {
(*it3)->setSubCells( maxSubCells );
}
// Todo: Adapt subCells of items conflicting with conflicting items
} else {
kdDebug(5855) << " no conflicts" << endl;
diff --git a/korganizer/cellitem.h b/korganizer/cellitem.h
index 72773d0..b917bd5 100644
--- a/korganizer/cellitem.h
+++ b/korganizer/cellitem.h
@@ -22,13 +22,13 @@
without including the source code for Qt in the source distribution.
*/
#ifndef KORG_CELLITEM_H
#define KORG_CELLITEM_H
#include <qstring.h>
-#include <qptrlist.h>
+#include <q3ptrlist.h>
namespace KOrg {
class CellItem
{
public:
@@ -50,13 +50,13 @@ class CellItem
/**
Place item \arg placeItem into stripe containing items \arg cells in a
way that items don't overlap.
\return Placed items
*/
- static QPtrList<CellItem> placeItem( QPtrList<CellItem> cells,
+ static Q3PtrList<CellItem> placeItem( Q3PtrList<CellItem> cells,
CellItem *placeItem );
private:
int mSubCells;
int mSubCell;
};
diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp
index ea510f1..53507d3 100644
--- a/korganizer/datenavigatorcontainer.cpp
+++ b/korganizer/datenavigatorcontainer.cpp
@@ -31,12 +31,14 @@
#include "kdatenavigator.h"
#include <kcalendarsystem.h>
#include "datenavigatorcontainer.h"
#include "koprefs.h"
+//Added by qt3to4:
+#include <QResizeEvent>
DateNavigatorContainer::DateNavigatorContainer( QWidget *parent,
const char *name )
: QWidget( parent, name ), mCalendar( 0 ),
mHorizontalCount( 1 ), mVerticalCount( 1 )
{
diff --git a/korganizer/datenavigatorcontainer.h b/korganizer/datenavigatorcontainer.h
index 87cc59f..75d387c 100644
--- a/korganizer/datenavigatorcontainer.h
+++ b/korganizer/datenavigatorcontainer.h
@@ -1,6 +1,9 @@
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <Q3PtrList>
/*
This file is part of KOrganizer.
Copyright (c) 2004 Cornelius Schumacher <schumacher@kde.org>
Copyright (C) 2004 Reinhold Kainhofer <reinhold@kainhofer.com>
@@ -97,13 +100,13 @@ class DateNavigatorContainer: public QWidget
QDate mFirstSelectedDate;
int mSelectedDateCount;
KDateNavigator *mNavigatorView;
KCal::Calendar *mCalendar;
- QPtrList<KDateNavigator> mExtraViews;
+ Q3PtrList<KDateNavigator> mExtraViews;
int mHorizontalCount;
int mVerticalCount;
};
#endif
diff --git a/korganizer/filteredit_base.cpp b/korganizer/filteredit_base.cpp
index 505edf6..9425963 100644
--- a/korganizer/filteredit_base.cpp
+++ b/korganizer/filteredit_base.cpp
@@ -8,78 +8,83 @@
****************************************************************************/
#include "filteredit_base.h"
#include <qvariant.h>
#include <qpushbutton.h>
-#include <qframe.h>
-#include <qbuttongroup.h>
+#include <q3frame.h>
+#include <q3buttongroup.h>
#include <qapplication.h>
+#include <QDesktopWidget>
#include <qradiobutton.h>
-#include <qlistbox.h>
+#include <q3listbox.h>
#include <qlabel.h>
#include <qcheckbox.h>
#include <qlayout.h>
#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <q3whatsthis.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
+#include <Q3HBoxLayout>
+#include <Q3VBoxLayout>
#include "tr.h"
/*
* Constructs a FilterEdit_base as a child of 'parent', with the
* name 'name' and widget flags set to 'f'.
*/
-FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl )
+FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, Qt::WFlags fl )
: QWidget( parent, name, fl )
{
if ( !name )
setName( "FilterEdit_base" );
- FilterEdit_baseLayout = new QVBoxLayout( this, 0, 0, "FilterEdit_baseLayout");
+ FilterEdit_baseLayout = new Q3VBoxLayout( this, 0, 0, "FilterEdit_baseLayout");
- mCriteriaFrame = new QFrame( this, "mCriteriaFrame" );
- mCriteriaFrame->setFrameShape( QFrame::StyledPanel );
- mCriteriaFrame->setFrameShadow( QFrame::Raised );
- mCriteriaFrameLayout = new QVBoxLayout( mCriteriaFrame, 3, 2, "mCriteriaFrameLayout");
+ mCriteriaFrame = new Q3Frame( this, "mCriteriaFrame" );
+ mCriteriaFrame->setFrameShape( Q3Frame::StyledPanel );
+ mCriteriaFrame->setFrameShadow( Q3Frame::Raised );
+ mCriteriaFrameLayout = new Q3VBoxLayout( mCriteriaFrame, 3, 2, "mCriteriaFrameLayout");
- ButtonGroup1 = new QButtonGroup( mCriteriaFrame, "ButtonGroup1" );
+ ButtonGroup1 = new Q3ButtonGroup( mCriteriaFrame, "ButtonGroup1" );
ButtonGroup1->setColumnLayout(0, Qt::Vertical );
ButtonGroup1->layout()->setSpacing( 6 );
ButtonGroup1->layout()->setMargin( 6 );
- ButtonGroup1Layout = new QGridLayout( ButtonGroup1->layout() );
+ ButtonGroup1Layout = new Q3GridLayout( ButtonGroup1->layout() );
ButtonGroup1Layout->setAlignment( Qt::AlignTop );
- layout4 = new QHBoxLayout( 0, 0, 6, "layout4");
+ layout4 = new Q3HBoxLayout( 0, 0, 6, "layout4");
mCatShowCheck = new QRadioButton( ButtonGroup1, "mCatShowCheck" );
layout4->addWidget( mCatShowCheck );
mCatHideCheck = new QRadioButton( ButtonGroup1, "mCatHideCheck" );
layout4->addWidget( mCatHideCheck );
mCatEditButton = new QPushButton( ButtonGroup1, "mCatEditButton" );
layout4->addWidget( mCatEditButton );
ButtonGroup1Layout->addLayout( layout4, 0, 0 );
- mCatList = new QListBox( ButtonGroup1, "mCatList" );
+ mCatList = new Q3ListBox( ButtonGroup1, "mCatList" );
ButtonGroup1Layout->addWidget( mCatList, 1, 0 );
mCriteriaFrameLayout->addWidget( ButtonGroup1 );
- layout7 = new QHBoxLayout( 0, 0, 6, "layout7");
+ layout7 = new Q3HBoxLayout( 0, 0, 6, "layout7");
textLabel1 = new QLabel( mCriteriaFrame, "textLabel1" );
layout7->addWidget( textLabel1 );
mRecurringCheck = new QCheckBox( mCriteriaFrame, "mRecurringCheck" );
layout7->addWidget( mRecurringCheck );
mCompletedCheck = new QCheckBox( mCriteriaFrame, "mCompletedCheck" );
layout7->addWidget( mCompletedCheck );
mCriteriaFrameLayout->addLayout( layout7 );
- layout9 = new QHBoxLayout( 0, 0, 6, "layout9");
+ layout9 = new Q3HBoxLayout( 0, 0, 6, "layout9");
textLabel1_2 = new QLabel( mCriteriaFrame, "textLabel1_2" );
layout9->addWidget( textLabel1_2 );
mEventCheck = new QCheckBox( mCriteriaFrame, "mEventCheck" );
layout9->addWidget( mEventCheck );
@@ -88,13 +93,13 @@ FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl )
layout9->addWidget( mTodoCheck );
mJournalCheck = new QCheckBox( mCriteriaFrame, "mJournalCheck" );
layout9->addWidget( mJournalCheck );
mCriteriaFrameLayout->addLayout( layout9 );
- layout2 = new QHBoxLayout( 0, 0, 0, "layout2");
+ layout2 = new Q3HBoxLayout( 0, 0, 0, "layout2");
textLabel2 = new QLabel( mCriteriaFrame, "textLabel2" );
layout2->addWidget( textLabel2 );
mPublicCheck = new QCheckBox( mCriteriaFrame, "mPublicCheck" );
layout2->addWidget( mPublicCheck );
@@ -106,13 +111,12 @@ FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl )
mConfidentialCheck->setChecked( FALSE );
layout2->addWidget( mConfidentialCheck );
mCriteriaFrameLayout->addLayout( layout2 );
FilterEdit_baseLayout->addWidget( mCriteriaFrame );
languageChange();
resize( QSize(300, 200).expandedTo(minimumSizeHint()) );
- clearWState( WState_Polished );
}
/*
* Destroys the object and frees any allocated resources
*/
FilterEdit_base::~FilterEdit_base()
diff --git a/korganizer/filteredit_base.h b/korganizer/filteredit_base.h
index 13a02c3..135f6fa 100644
--- a/korganizer/filteredit_base.h
+++ b/korganizer/filteredit_base.h
@@ -9,40 +9,46 @@
#ifndef FILTEREDIT_BASE_H
#define FILTEREDIT_BASE_H
#include <qvariant.h>
#include <qwidget.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
+#include <Q3Frame>
+#include <Q3GridLayout>
+#include <Q3HBoxLayout>
+#include <QLabel>
-class QVBoxLayout;
-class QHBoxLayout;
-class QGridLayout;
+class Q3VBoxLayout;
+class Q3HBoxLayout;
+class Q3GridLayout;
class QSpacerItem;
-class QFrame;
-class QButtonGroup;
+class Q3Frame;
+class Q3ButtonGroup;
class QRadioButton;
class QPushButton;
-class QListBox;
-class QListBoxItem;
+class Q3ListBox;
+class Q3ListBoxItem;
class QLabel;
class QCheckBox;
class FilterEdit_base : public QWidget
{
Q_OBJECT
public:
- FilterEdit_base( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ FilterEdit_base( QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = 0 );
~FilterEdit_base();
- QFrame* mCriteriaFrame;
- QButtonGroup* ButtonGroup1;
+ Q3Frame* mCriteriaFrame;
+ Q3ButtonGroup* ButtonGroup1;
QRadioButton* mCatShowCheck;
QRadioButton* mCatHideCheck;
QPushButton* mCatEditButton;
- QListBox* mCatList;
+ Q3ListBox* mCatList;
QLabel* textLabel1;
QCheckBox* mRecurringCheck;
QCheckBox* mCompletedCheck;
QLabel* textLabel1_2;
QCheckBox* mEventCheck;
QCheckBox* mTodoCheck;
@@ -50,19 +56,19 @@ public:
QLabel* textLabel2;
QCheckBox* mPublicCheck;
QCheckBox* mPrivateCheck;
QCheckBox* mConfidentialCheck;
protected:
- QVBoxLayout* FilterEdit_baseLayout;
- QVBoxLayout* mCriteriaFrameLayout;
- QGridLayout* ButtonGroup1Layout;
- QHBoxLayout* layout4;
- QHBoxLayout* layout7;
- QHBoxLayout* layout9;
- QHBoxLayout* layout2;
+ Q3VBoxLayout* FilterEdit_baseLayout;
+ Q3VBoxLayout* mCriteriaFrameLayout;
+ Q3GridLayout* ButtonGroup1Layout;
+ Q3HBoxLayout* layout4;
+ Q3HBoxLayout* layout7;
+ Q3HBoxLayout* layout9;
+ Q3HBoxLayout* layout2;
protected slots:
virtual void languageChange();
};
diff --git a/korganizer/filtereditdialog.cpp b/korganizer/filtereditdialog.cpp
index df84911..a3cff49 100644
--- a/korganizer/filtereditdialog.cpp
+++ b/korganizer/filtereditdialog.cpp
@@ -23,14 +23,19 @@
#include <qlayout.h>
#include <qpushbutton.h>
#include <qcombobox.h>
#include <qcheckbox.h>
#include <qradiobutton.h>
-#include <qlistbox.h>
+#include <q3listbox.h>
#include <qapplication.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
+#include <Q3PtrList>
+
+#include <QDesktopWidget>
#include <kdebug.h>
#include <klocale.h>
#include <klineeditdlg.h>
#include <kmessagebox.h>
@@ -50,13 +55,13 @@ public:
ComboFilterBox( QWidget *parent=0, const char *name=0) :
QComboBox( parent,name ) { }
void popupBox() { popup(); }
};
-FilterEditDialog::FilterEditDialog(QPtrList<CalFilter> *filters,QWidget *parent,
+FilterEditDialog::FilterEditDialog(Q3PtrList<CalFilter> *filters,QWidget *parent,
const char *name) :
KDialogBase(parent,name,true,i18n("Edit Calendar Filters"),
Ok|Apply|Cancel)
{
mFilters = filters;
@@ -77,13 +82,13 @@ FilterEditDialog::FilterEditDialog(QPtrList<CalFilter> *filters,QWidget *parent,
upButton->setMaximumSize( upButton->sizeHint());
connect(upButton,SIGNAL(clicked()),SLOT(slotUp()));
mEditor = new FilterEdit_base(mainWidget);
- QGridLayout *topLayout = new QGridLayout(mainWidget,2,2);
+ Q3GridLayout *topLayout = new Q3GridLayout(mainWidget,2,2);
topLayout->setSpacing(spacingHint());
topLayout->addWidget(mSelectionCombo,0,0);
topLayout->addWidget(upButton,0,1);
topLayout->addWidget(addButton,0,2);
topLayout->addWidget(mRemoveButton,0,3);
topLayout->addMultiCellWidget(mEditor,1,1,0,3);
diff --git a/korganizer/filtereditdialog.h b/korganizer/filtereditdialog.h
index 42aa3da..c1a52ed 100644
--- a/korganizer/filtereditdialog.h
+++ b/korganizer/filtereditdialog.h
@@ -20,13 +20,13 @@
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#ifndef _FILTEREDITDIALOG_H
#define _FILTEREDITDIALOG_H
-#include <qptrlist.h>
+#include <q3ptrlist.h>
#include <kdialogbase.h>
#include <libkcal/calfilter.h>
class QComboBox;
@@ -43,13 +43,13 @@ using namespace KCal;
@author Cornelius Schumacher
*/
class FilterEditDialog : public KDialogBase
{
Q_OBJECT
public:
- FilterEditDialog(QPtrList<CalFilter> *,QWidget *parent=0, const char *name=0);
+ FilterEditDialog(Q3PtrList<CalFilter> *,QWidget *parent=0, const char *name=0);
virtual ~FilterEditDialog();
public slots:
void updateFilterList();
signals:
@@ -71,13 +71,13 @@ class FilterEditDialog : public KDialogBase
protected:
void readFilter(CalFilter *);
void writeFilter(CalFilter *);
private:
- QPtrList<CalFilter> *mFilters;
+ Q3PtrList<CalFilter> *mFilters;
ComboFilterBox *mSelectionCombo;
QPushButton *mRemoveButton;
FilterEdit_base *mEditor;
QStringList mCategories;
diff --git a/korganizer/incomingdialog.cpp b/korganizer/incomingdialog.cpp
index fe78356..c2402d4 100644
--- a/korganizer/incomingdialog.cpp
+++ b/korganizer/incomingdialog.cpp
@@ -14,16 +14,18 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include <qlistview.h>
+#include <q3listview.h>
#include <qfile.h>
#include <qdir.h>
#include <qmap.h>
+//Added by qt3to4:
+#include <Q3PtrList>
#include <kglobal.h>
#include <klocale.h>
#include <kdebug.h>
#include <kstandarddirs.h>
#include <kmessagebox.h>
@@ -53,15 +55,15 @@
#define KORG_NOKABC
//#include <kabc/stdaddressbook.h>
#define size count
#endif
-ScheduleItemIn::ScheduleItemIn(QListView *parent,IncidenceBase *ev,
+ScheduleItemIn::ScheduleItemIn(Q3ListView *parent,IncidenceBase *ev,
Scheduler::Method method,ScheduleMessage::Status status)
- : QListViewItem(parent)
+ : Q3ListViewItem(parent)
{
mIncidence = ev;
mMethod = method;
mStatus = status;
setText(6,Scheduler::translatedMethodName(mMethod)+" ");
setText(7,ScheduleMessage::statusName(status));
@@ -132,28 +134,28 @@ bool ScheduleItemVisitor::visit(Journal *)
* name 'name' and widget flags set to 'f'
*
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
IncomingDialog::IncomingDialog(Calendar *calendar,OutgoingDialog *outgoing,
- QWidget* parent,const char* name,bool modal,WFlags fl) :
+ QWidget* parent,const char* name,bool modal,Qt::WFlags fl) :
IncomingDialog_base(parent,name,modal,fl)
{
mCalendar = calendar;
mOutgoing = outgoing;
#ifndef KORG_NOMAIL
mScheduler = new MailScheduler(mCalendar);
#else
mScheduler = new DummyScheduler(mCalendar);
#endif
- mMessageListView->setColumnAlignment(1,AlignHCenter);
- mMessageListView->setColumnAlignment(2,AlignHCenter);
- mMessageListView->setColumnAlignment(3,AlignHCenter);
- mMessageListView->setColumnAlignment(4,AlignHCenter);
- QObject::connect(mMessageListView,SIGNAL(doubleClicked(QListViewItem *)),
- this,SLOT(showEvent(QListViewItem *)));
+ mMessageListView->setColumnAlignment(1,Qt::AlignHCenter);
+ mMessageListView->setColumnAlignment(2,Qt::AlignHCenter);
+ mMessageListView->setColumnAlignment(3,Qt::AlignHCenter);
+ mMessageListView->setColumnAlignment(4,Qt::AlignHCenter);
+ QObject::connect(mMessageListView,SIGNAL(doubleClicked(Q3ListViewItem *)),
+ this,SLOT(showEvent(Q3ListViewItem *)));
retrieve();
}
/*
* Destroys the object and frees any allocated resources
*/
@@ -166,13 +168,13 @@ void IncomingDialog::setOutgoingDialog(OutgoingDialog *outgoing)
{
mOutgoing = outgoing;
}
void IncomingDialog::retrieve()
{
- QPtrList <ScheduleMessage> messages = mScheduler->retrieveTransactions();
+ Q3PtrList <ScheduleMessage> messages = mScheduler->retrieveTransactions();
ScheduleMessage *message;
for(message = messages.first();message;message = messages.next()) {
IncidenceBase *inc = message->event();
Scheduler::Method method = (Scheduler::Method)message->method();
ScheduleMessage::Status status = message->status();
@@ -249,13 +251,13 @@ void IncomingDialog::rejectMessage()
mScheduler->deleteTransaction(item->event());
delete item;
emit numMessagesChanged(mMessageListView->childCount());
}
}
-void IncomingDialog::showEvent(QListViewItem *item)
+void IncomingDialog::showEvent(Q3ListViewItem *item)
{
IncidenceBase *incidence = ((ScheduleItemIn *)item)->event();
if( incidence && incidence->typeID() == eventID ) {
Event *event = static_cast<Event *>(incidence);
KOEventViewerDialog *eventViewer = new KOEventViewerDialog(this);
eventViewer->setEvent(event);
@@ -266,13 +268,13 @@ void IncomingDialog::showEvent(QListViewItem *item)
bool IncomingDialog::incomeRefresh(ScheduleItemIn *item)
{
Event *ev = mCalendar->event(item->event()->uid());
if (ev) {
//user interaction before??
Attendee *att;
- QPtrList<Attendee> attlist = ev->attendees();
+ Q3PtrList<Attendee> attlist = ev->attendees();
for (att=attlist.first(); att; att=attlist.next()) {
Event *event = new Event(*ev);
mOutgoing->addMessage(event,Scheduler::Request,att->email());
delete(event);
}
mScheduler->deleteTransaction(item->event());
@@ -511,13 +513,13 @@ bool IncomingDialog::checkOrganizerInAddressbook(QString organizer)
bool IncomingDialog::checkAttendeesInAddressbook(IncidenceBase *inc)
{
bool inBook = false;
#ifndef KORG_NOKABC
KABC::AddressBook *add_book = KABC::StdAddressBook::self();
KABC::Addressee::List addressList;
- QPtrList <Attendee> attendees;
+ Q3PtrList <Attendee> attendees;
Attendee *att;
attendees = inc->attendees();
for (att=attendees.first();att;att=attendees.next()) {
addressList = add_book->findByEmail(att->email());
if (addressList.size()>0 ) inBook = true;
}
diff --git a/korganizer/incomingdialog.h b/korganizer/incomingdialog.h
index 413ce6a..e002b25 100644
--- a/korganizer/incomingdialog.h
+++ b/korganizer/incomingdialog.h
@@ -16,26 +16,26 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef INCOMINGDIALOG_H
#define INCOMINGDIALOG_H
-#include <qlistview.h>
+#include <q3listview.h>
#include <libkcal/calendar.h>
#include <libkcal/scheduler.h>
#include "incomingdialog_base.h"
#include "outgoingdialog.h"
using namespace KCal;
-class ScheduleItemIn : public QListViewItem
+class ScheduleItemIn : public Q3ListViewItem
{
public:
- ScheduleItemIn(QListView *parent,IncidenceBase *ev,Scheduler::Method method,
+ ScheduleItemIn(Q3ListView *parent,IncidenceBase *ev,Scheduler::Method method,
ScheduleMessage::Status status);
virtual ~ScheduleItemIn() {}
IncidenceBase *event() { return mIncidence; }
Scheduler::Method method() { return mMethod; }
ScheduleMessage::Status status() { return mStatus; }
@@ -69,13 +69,13 @@ class ScheduleItemVisitor : public Incidence::Visitor
class IncomingDialog : public IncomingDialog_base
{
Q_OBJECT
public:
IncomingDialog(Calendar *calendar,OutgoingDialog *outgoing,
- QWidget* parent=0,const char* name=0,bool modal=false,WFlags fl=0);
+ QWidget* parent=0,const char* name=0,bool modal=false,Qt::WFlags fl=0);
~IncomingDialog();
void setOutgoingDialog(OutgoingDialog *outgoing);
signals:
void calendarUpdated();
@@ -84,13 +84,13 @@ class IncomingDialog : public IncomingDialog_base
void retrieve();
protected slots:
void acceptAllMessages();
void acceptMessage();
void rejectMessage();
- void showEvent(QListViewItem *);
+ void showEvent(Q3ListViewItem *);
protected:
bool acceptMessage(ScheduleItemIn *item);
bool incomeRefresh(ScheduleItemIn *item);
bool incomeCounter(ScheduleItemIn *item);
bool incomeDeclineCounter(ScheduleItemIn *item);
diff --git a/korganizer/incomingdialog_base.cpp b/korganizer/incomingdialog_base.cpp
index 8589803..5c5ace4 100644
--- a/korganizer/incomingdialog_base.cpp
+++ b/korganizer/incomingdialog_base.cpp
@@ -8,44 +8,46 @@
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "incomingdialog_base.h"
#include <qvariant.h>
-#include <qheader.h>
-#include <qlistview.h>
+#include <q3header.h>
+#include <q3listview.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <q3whatsthis.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
/*
* Constructs a IncomingDialog_base as a child of 'parent', with the
* name 'name' and widget flags set to 'f'.
*
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
-IncomingDialog_base::IncomingDialog_base( QWidget* parent, const char* name, bool modal, WFlags fl )
+IncomingDialog_base::IncomingDialog_base( QWidget* parent, const char* name, bool modal, Qt::WFlags fl )
: QDialog( parent, name, modal, fl )
{
if ( !name )
setName( "IncomingDialog_base" );
- IncomingDialog_baseLayout = new QGridLayout( this, 1, 1, 11, 6, "IncomingDialog_baseLayout");
+ IncomingDialog_baseLayout = new Q3GridLayout( this, 1, 1, 11, 6, "IncomingDialog_baseLayout");
PushButton4 = new QPushButton( this, "PushButton4" );
IncomingDialog_baseLayout->addWidget( PushButton4, 0, 1 );
PushButton7 = new QPushButton( this, "PushButton7" );
PushButton7->setDefault( TRUE );
IncomingDialog_baseLayout->addWidget( PushButton7, 5, 1 );
- mMessageListView = new QListView( this, "mMessageListView" );
+ mMessageListView = new Q3ListView( this, "mMessageListView" );
mMessageListView->addColumn( tr2i18n( "Summary" ) );
mMessageListView->addColumn( tr2i18n( "Start Date" ) );
mMessageListView->addColumn( tr2i18n( "Start Time" ) );
mMessageListView->addColumn( tr2i18n( "End Date" ) );
mMessageListView->addColumn( tr2i18n( "End Time" ) );
mMessageListView->addColumn( tr2i18n( "Organizer" ) );
diff --git a/korganizer/incomingdialog_base.h b/korganizer/incomingdialog_base.h
index 7732384..537ef86 100644
--- a/korganizer/incomingdialog_base.h
+++ b/korganizer/incomingdialog_base.h
@@ -9,37 +9,41 @@
#ifndef INCOMINGDIALOG_BASE_H
#define INCOMINGDIALOG_BASE_H
#include <qvariant.h>
#include <qdialog.h>
-
-class QVBoxLayout;
-class QHBoxLayout;
-class QGridLayout;
-class QListView;
-class QListViewItem;
+//Added by qt3to4:
+#include <Q3VBoxLayout>
+#include <Q3GridLayout>
+#include <Q3HBoxLayout>
+
+class Q3VBoxLayout;
+class Q3HBoxLayout;
+class Q3GridLayout;
+class Q3ListView;
+class Q3ListViewItem;
class QPushButton;
class IncomingDialog_base : public QDialog
{
Q_OBJECT
public:
- IncomingDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ IncomingDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
~IncomingDialog_base();
QPushButton* PushButton4;
QPushButton* PushButton7;
- QListView* mMessageListView;
+ Q3ListView* mMessageListView;
QPushButton* PushButton7_2;
QPushButton* PushButton8;
QPushButton* PushButton9;
protected:
- QGridLayout* IncomingDialog_baseLayout;
+ Q3GridLayout* IncomingDialog_baseLayout;
protected slots:
virtual void languageChange();
virtual void acceptAllMessages();
virtual void acceptMessage();
diff --git a/korganizer/interfaces/korganizer/baseview.h b/korganizer/interfaces/korganizer/baseview.h
index 2ac9de1..c828573 100644
--- a/korganizer/interfaces/korganizer/baseview.h
+++ b/korganizer/interfaces/korganizer/baseview.h
@@ -21,14 +21,14 @@
#ifndef KORG_BASEVIEW_H
#define KORG_BASEVIEW_H
// $Id$
// KOBaseView is the abstract base class of all calendar views.
#include <qwidget.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
+#include <q3ptrlist.h>
+#include <q3valuelist.h>
#include <klocale.h>
#include <kdebug.h>
#include <kmessagebox.h>
#include <libkcal/event.h>
@@ -85,13 +85,13 @@ class BaseView : public QWidget
/**
@return a list of selected events. Most views can probably only
select a single event at a time, but some may be able to select
more than one.
*/
- virtual QPtrList<Incidence> selectedIncidences() = 0;
+ virtual Q3PtrList<Incidence> selectedIncidences() = 0;
/**
@return a list of the dates of selected events. Most views can probably only
select a single event at a time, but some may be able to select
more than one.
*/
@@ -150,13 +150,13 @@ class BaseView : public QWidget
/**
Show given events. Depending on the actual view it might not be possible to
show all given events.
@param eventList a list of events to show.
*/
- virtual void showEvents(QPtrList<Event> eventList) = 0;
+ virtual void showEvents(Q3PtrList<Event> eventList) = 0;
/**
Updates the current display to reflect changes that may have happened
in the calendar since the last display refresh.
*/
virtual void updateView() = 0;
diff --git a/korganizer/interfaces/korganizer/calendarviewbase.h b/korganizer/interfaces/korganizer/calendarviewbase.h
index 3c715b1..1f49357 100644
--- a/korganizer/interfaces/korganizer/calendarviewbase.h
+++ b/korganizer/interfaces/korganizer/calendarviewbase.h
@@ -20,12 +20,14 @@
#ifndef KORG_CALENDARVIEWBASE_H
#define KORG_CALENDARVIEWBASE_H
// $Id$
#include <qwidget.h>
#include <qlayout.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
#include <libkcal/calendar.h>
#include <korganizer/baseview.h>
@@ -37,13 +39,13 @@ namespace KOrg {
*/
class CalendarViewBase : public QWidget
{
Q_OBJECT
public:
CalendarViewBase(QWidget *parent, const char *name) :
- QWidget(parent,name) {new QVBoxLayout(this);}
+ QWidget(parent,name) {new Q3VBoxLayout(this);}
virtual ~CalendarViewBase() {};
virtual KCal::Calendar *calendar() = 0;
virtual QDate startDate() = 0;
virtual QDate endDate() = 0;
diff --git a/korganizer/journalentry.cpp b/korganizer/journalentry.cpp
index 5269af7..2814c61 100644
--- a/korganizer/journalentry.cpp
+++ b/korganizer/journalentry.cpp
@@ -23,20 +23,27 @@
//
// Journal Entry
#include <qlabel.h>
#include <qlayout.h>
-#include <qvbox.h>
+#include <q3vbox.h>
#include <qfile.h>
#include <qdir.h>
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <qtextcodec.h>
#include <qpixmap.h>
#include <qpushbutton.h>
#include <qapplication.h>
+#include <QDesktopWidget>
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <Q3Frame>
+#include <QKeyEvent>
+#include <QEvent>
+#include <Q3VBoxLayout>
#include <kdebug.h>
#include <kglobal.h>
#include <klocale.h>
#include <ktextedit.h>
#include <kfiledialog.h>
@@ -54,26 +61,26 @@
#include "journalentry.h"
//#include "journalentry.moc"
#ifndef DESKTOP_VERSION
#include <qpe/qpeapplication.h>
#endif
JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) :
- QFrame(parent)
+ Q3Frame(parent)
{
int fac = 5;
heiHint = QApplication::desktop()->height();
if ( heiHint > 800 )
fac += 2;
heiHint = heiHint / fac;
showOnlyMode = false;
mCalendar = calendar;
mJournal = 0;
visibleMode = true;
- QHBox * vb = new QHBox ( this );
+ Q3HBox * vb = new Q3HBox ( this );
QPixmap iconp;
vb->setMargin ( KDialog::marginHint()-1 );
QPushButton * toggleJournal = new QPushButton( vb );
iconp = SmallIcon("1updownarrow");
toggleJournal->setPixmap (iconp ) ;
QLabel* textLabel = new QLabel(" "+i18n("Title: "),vb);
@@ -126,19 +133,19 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) :
} else {
mTitle->setMaximumWidth( (maxwid/4)*3);
mCalendarBox->setMaximumWidth( maxwid/2 );
}
//mCalendarBox->setMaximumWidth( maxwid/2 -20 );
mEditor->setWordWrap( KTextEdit::WidgetWidth );
- QBoxLayout *topLayout = new QVBoxLayout(this);
+ Q3BoxLayout *topLayout = new Q3VBoxLayout(this);
topLayout->addWidget(vb);
topLayout->addWidget(mEditor);
mEditor->installEventFilter(this);
installEventFilter(this);
mTitle->installEventFilter(this);
- setFocusPolicy (QWidget::NoFocus);
+ setFocusPolicy (Qt::NoFocus);
connect( saveTemplate, SIGNAL( clicked() ), this , SLOT( slotSaveTemplate() ) );
connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( slotLoadTemplate() ) );
connect( toggleJournal, SIGNAL( clicked() ), this , SLOT( toggleShowJournal() ) );
mTitle->load( KOLocationBox::SUMMARYJOURNAL );
mTitle->lineEdit ()->setText("");
@@ -165,13 +172,13 @@ void JournalEntry::resizeEvent(QResizeEvent* e )
}
//mCalendarBox->setMaximumWidth( maxwid/2 -20 );
}
//setMaximumWidth( QApplication::desktop()->width() );
//qDebug("MAXXX %d ", QApplication::desktop()->width());
#endif
- QFrame::resizeEvent( e );
+ Q3Frame::resizeEvent( e );
}
QSize JournalEntry::sizeHint() const
{
return QSize ( 240, heiHint );
}
void JournalEntry::slotSaveTemplate()
@@ -183,19 +190,19 @@ void JournalEntry::slotSaveTemplate()
fileName += "/journal";
fileName = KFileDialog::getSaveFileName( fileName , i18n("Save as Journal template"), this );
if ( fileName.length() == 0 )
return;
QFile fileIn( fileName );
- if (!fileIn.open( IO_WriteOnly ) ) {
+ if (!fileIn.open( QIODevice::WriteOnly ) ) {
KMessageBox::error( this, i18n("Error saving template file\n '%1'.")
.arg( fileName ) );
return;
}
// QString text;
- QTextStream tsIn( &fileIn );
+ Q3TextStream tsIn( &fileIn );
tsIn.setCodec( QTextCodec::codecForName("utf8") );
tsIn << mEditor->text();
fileIn.close();
}
void JournalEntry::slotLoadTemplate()
{
@@ -205,18 +212,18 @@ void JournalEntry::slotLoadTemplate()
t_dir.mkdir ( fileName );
fileName += "/journal";
fileName = KFileDialog::getOpenFileName( fileName , i18n("Insert Journal template"), this );
if ( fileName.length() == 0 )
return;
QFile fileIn( fileName );
- if (!fileIn.open( IO_ReadOnly ) ) {
+ if (!fileIn.open( QIODevice::ReadOnly ) ) {
KMessageBox::error( this, i18n("Error loading template file\n '%1'.")
.arg( fileName ) );
return;
}
- QTextStream tsIn( &fileIn );
+ Q3TextStream tsIn( &fileIn );
tsIn.setCodec( QTextCodec::codecForName("utf8") );
QString text = tsIn.read();
fileIn.close();
int line, col;
mEditor->getCursorPosition (& line, & col );
mEditor-> insertAt ( text, line, col, true );
@@ -313,17 +320,17 @@ void JournalEntry::clear()
}
bool JournalEntry::eventFilter( QObject *o, QEvent *e )
{
// kdDebug() << "JournalEntry::event received " << e->type() << endl;
if ( isVisible() ) {
- mEditor->setFocusPolicy (QWidget::StrongFocus);
- mTitle->setFocusPolicy (QWidget::StrongFocus);
+ mEditor->setFocusPolicy (Qt::StrongFocus);
+ mTitle->setFocusPolicy (Qt::StrongFocus);
} else {
- mEditor->setFocusPolicy (QWidget::NoFocus);
- mTitle->setFocusPolicy (QWidget::NoFocus);
+ mEditor->setFocusPolicy (Qt::NoFocus);
+ mTitle->setFocusPolicy (Qt::NoFocus);
}
if ( e->type() == QEvent::FocusOut ) {
writeJournal();
}
if ( e->type() == QEvent::KeyPress ) {
QKeyEvent * k = (QKeyEvent *) e;
@@ -332,13 +339,13 @@ bool JournalEntry::eventFilter( QObject *o, QEvent *e )
if ( k->state() == Qt::ControlButton ) {
k->ignore();
//return true;
}
}
- return QFrame::eventFilter( o, e ); // standard event processing
+ return Q3Frame::eventFilter( o, e ); // standard event processing
}
void JournalEntry::writeJournal()
{
if ( !visibleMode ) return;
if ( !mTitle->isEnabled() ) return;
diff --git a/korganizer/journalentry.h b/korganizer/journalentry.h
index ee17da8..0adebe9 100644
--- a/korganizer/journalentry.h
+++ b/korganizer/journalentry.h
@@ -22,25 +22,30 @@
*/
#ifndef JOURNALENTRY_H
#define JOURNALENTRY_H
//
// Widget showing one Journal entry
-#include <qframe.h>
+#include <q3frame.h>
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <QEvent>
+#include <QLabel>
+#include <QKeyEvent>
#include <libkcal/calendar.h>
class QLabel;
class KTextEdit;
class QComboBox;
class KLineEdit;
class KOLocationBox;
using namespace KCal;
-class JournalEntry : public QFrame {
+class JournalEntry : public Q3Frame {
Q_OBJECT
public:
JournalEntry(Calendar *,QWidget *parent);
virtual ~JournalEntry();
void setJournal(Journal *, bool saveJournal = true );
diff --git a/korganizer/kdatenavigator.cpp b/korganizer/kdatenavigator.cpp
index 6697602..ecc7a2f 100644
--- a/korganizer/kdatenavigator.cpp
+++ b/korganizer/kdatenavigator.cpp
@@ -19,18 +19,22 @@
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 <qstring.h>
-#include <qkeycode.h>
+#include <qnamespace.h>
#include <qlayout.h>
#include <qtimer.h>
-#include <qframe.h>
+#include <q3frame.h>
#include <qlabel.h>
#include <qapplication.h>
+//Added by qt3to4:
+#include <QWheelEvent>
+#include <Q3GridLayout>
+#include <QEvent>
#include <kdebug.h>
#include <klocale.h>
#include <kglobal.h>
#include "koglobals.h"
@@ -43,18 +47,18 @@
#include "navigatorbar.h"
#include "kdatenavigator.h"
KDateNavigator::KDateNavigator( QWidget *parent, const char *name )
- : QFrame(parent, name),
+ : Q3Frame(parent, name),
updateTimer(0L)
{
- setFrameStyle(QFrame::NoFrame);
+ setFrameStyle(Q3Frame::NoFrame);
QDate startDate = QDate::currentDate();
- QGridLayout *topLayout = new QGridLayout(this,8,8);
+ Q3GridLayout *topLayout = new Q3GridLayout(this,8,8);
if (! startDate.isValid()) {
qDebug("KDateNavigator::invalid startdate ");
startDate = QDate::currentDate();
}
mMonthSignalOffset = 0;
@@ -78,33 +82,33 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name )
int i;
// Set up the heading fields.
for( i = 0; i < 7; i++ ) {
headings[i] = new QLabel("",this);
//headings[i]->setFont(QFont("Arial", 10, QFont::Bold));
- headings[i]->setAlignment(AlignCenter);
+ headings[i]->setAlignment(Qt::AlignCenter);
headings[i]->installEventFilter(this);
topLayout->addWidget(headings[i],1,i+1);
}
// Create the weeknumber labels
for( i = 0; i < 6; i++ ) {
weeknos[i] = new QLabel(this);
- weeknos[i]->setAlignment(AlignCenter );
+ weeknos[i]->setAlignment(Qt::AlignCenter );
//weeknos[i]->setFont(QFont("Arial", 10));
if(!m_bShowWeekNums) {
weeknos[i]->hide();
}
weeknos[i]->installEventFilter(this);
topLayout->addWidget(weeknos[i],i+2,0);
}
daymatrix = new KODayMatrix( this, "KDateNavigator::DayMatrix");
- daymatrix->setFrameStyle(QFrame::Panel|QFrame::Sunken);
+ daymatrix->setFrameStyle(Q3Frame::Panel|Q3Frame::Sunken);
daymatrix->setLineWidth(1);
connect( daymatrix, SIGNAL( selected( const KCal::DateList & ) ),
SIGNAL( datesSelected( const KCal::DateList & ) ) );
connect( daymatrix, SIGNAL( eventDropped( Event * ) ),
diff --git a/korganizer/kdatenavigator.h b/korganizer/kdatenavigator.h
index 780ebb8..2cbca76 100644
--- a/korganizer/kdatenavigator.h
+++ b/korganizer/kdatenavigator.h
@@ -20,28 +20,31 @@
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#ifndef KDATENAVIGATOR_H
#define KDATENAVIGATOR_H
-#include <qframe.h>
+#include <q3frame.h>
#include <qdatetime.h>
#include <qlabel.h>
+//Added by qt3to4:
+#include <QWheelEvent>
+#include <QEvent>
#include <libkcal/calendar.h>
#include "kodaymatrix.h"
class QPushButton;
class QTimer;
class KCalendarSystem;
class NavigatorBar;
-class KDateNavigator: public QFrame
+class KDateNavigator: public Q3Frame
{
Q_OBJECT
public:
KDateNavigator( QWidget *parent = 0,const char *name = 0 );
~KDateNavigator();
@@ -130,14 +133,14 @@ class KDateNavigator: public QFrame
QSize mySizeHint;
QSize myFullSizeHint;
bool mFontChanged;
int mMonthSignalOffset;
NavigatorBar *mNavigatorBar;
- QFrame *headingSep;
- QFrame *weeknumSep;
+ Q3Frame *headingSep;
+ Q3Frame *weeknumSep;
QLabel *headings[7];
QLabel *weeknos[7];
KODayMatrix *daymatrix;
KCal::DateList mSelectedDates;
QDate m_MthYr;
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index 1d4d6de..fe59787 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -26,18 +26,29 @@
#ifndef _WIN32_
#define protected public
#include <qwidget.h>
#undef protected
#endif
-#include <qintdict.h>
+#include <q3intdict.h>
#include <qdatetime.h>
#include <qapplication.h>
-#include <qpopupmenu.h>
+#include <q3popupmenu.h>
#include <qcursor.h>
#include <qpainter.h>
+#include <QDesktopWidget>
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <QLabel>
+#include <QPixmap>
+#include <QMouseEvent>
+#include <QKeyEvent>
+#include <Q3MemArray>
+#include <QEvent>
+#include <Q3Frame>
+#include <Q3PtrList>
#include <kdebug.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kglobal.h>
@@ -60,13 +71,13 @@ extern int globalFlagBlockAgendaItemPaint;
extern int globalFlagBlockAgendaItemUpdate;
extern int globalFlagBlockStartup;
////////////////////////////////////////////////////////////////////////////
MarcusBains::MarcusBains(KOAgenda *_agenda,const char *name)
- : QFrame(_agenda->viewport(),name), agenda(_agenda)
+ : Q3Frame(_agenda->viewport(),name), agenda(_agenda)
{
setLineWidth(0);
setMargin(0);
setBackgroundColor(Qt::red);
minutes = new QTimer(this);
connect(minutes, SIGNAL(timeout()), this, SLOT(updateLoc()));
@@ -166,14 +177,14 @@ void MarcusBains::updateLocation(bool recalculate)
/*
Create an agenda widget with rows rows and columns columns.
*/
KOAgenda::KOAgenda(int columns,int rows,int rowSize,QWidget *parent,
- const char *name,WFlags f) :
- QScrollView(parent,name,f)
+ const char *name,Qt::WFlags f) :
+ Q3ScrollView(parent,name,f)
{
mAllAgendaPopup = 0;
mColumns = columns;
mRows = rows;
mGridSpacingY = rowSize;
@@ -187,14 +198,14 @@ KOAgenda::KOAgenda(int columns,int rows,int rowSize,QWidget *parent,
}
/*
Create an agenda widget with columns columns and one row. This is used for
all-day events.
*/
-KOAgenda::KOAgenda(int columns,QWidget *parent,const char *name,WFlags f) :
- QScrollView(parent,name,f)
+KOAgenda::KOAgenda(int columns,QWidget *parent,const char *name,Qt::WFlags f) :
+ Q3ScrollView(parent,name,f)
{
mAllAgendaPopup = 0;
blockResize = false;
mColumns = columns;
mRows = 1;
//qDebug("aaaaaaaaaaaaaaaaaaldays %d ", KOPrefs::instance()->mAllDaySize);
@@ -228,45 +239,45 @@ QDate KOAgenda::selectedIncidenceDate() const
void KOAgenda::init()
{
mPopupTimer = new QTimer(this);
connect(mPopupTimer , SIGNAL(timeout()), this, SLOT(popupMenu()));
- mNewItemPopup = new QPopupMenu( this );
+ mNewItemPopup = new Q3PopupMenu( this );
connect ( mNewItemPopup, SIGNAL (activated ( int ) ), this, SLOT ( newItem(int)) );
QString pathString = "";
if ( !KOPrefs::instance()->mToolBarMiniIcons ) {
if ( QApplication::desktop()->width() < 480 )
pathString += "icons16/";
} else
pathString += "iconsmini/";
- mNewItemPopup->insertItem ( SmallIcon( pathString +"newevent" ), i18n("New Event..."), 1 );
- mNewItemPopup->insertItem ( SmallIcon( pathString +"newtodo" ), i18n("New Todo..."),2 );
+ mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"newevent" ), i18n("New Event..."), 1 );
+ mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"newtodo" ), i18n("New Todo..."),2 );
mNewItemPopup->insertSeparator ( );
- mNewItemPopup->insertItem ( SmallIcon( pathString +"day" ), i18n("Day view"),3 );
- mNewItemPopup->insertItem ( SmallIcon( pathString +"xdays" ), i18n("Next days"),8 );
- mNewItemPopup->insertItem ( SmallIcon( pathString +"week" ), i18n("Next week"),4 );
- mNewItemPopup->insertItem ( SmallIcon( pathString +"week" ), i18n("Next two weeks"),5 );
- mNewItemPopup->insertItem ( SmallIcon( pathString +"month" ), i18n("This month"),6 );
- mNewItemPopup->insertItem ( SmallIcon( pathString +"journal" ), i18n("Journal view"),7 );
+ mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"day" ), i18n("Day view"),3 );
+ mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"xdays" ), i18n("Next days"),8 );
+ mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"week" ), i18n("Next week"),4 );
+ mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"week" ), i18n("Next two weeks"),5 );
+ mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"month" ), i18n("This month"),6 );
+ mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"journal" ), i18n("Journal view"),7 );
#ifndef _WIN32_
- int wflags = viewport()-> getWFlags() |WRepaintNoErase;//WResizeNoErase
- viewport()->setWFlags ( wflags);
+ Qt::WindowFlags wflags = viewport()-> windowFlags() |Qt::WRepaintNoErase;//WResizeNoErase
+ viewport()->setWindowFlags ( wflags);
#endif
mGridSpacingX = 80;
mResizeBorderWidth = 8;
mScrollBorderWidth = 8;
mScrollDelay = 30;
mScrollOffset = 10;
mPaintPixmap.resize( 20,20);
//enableClipper(true);
// Grab key strokes for keyboard navigation of agenda. Seems to have no
// effect. Has to be fixed.
- setFocusPolicy(WheelFocus);
+ setFocusPolicy(Qt::WheelFocus);
connect(&mScrollUpTimer,SIGNAL(timeout()),SLOT(scrollUp()));
connect(&mScrollDownTimer,SIGNAL(timeout()),SLOT(scrollDown()));
connect(&mResizeTimer,SIGNAL(timeout()),SLOT(finishResize()));
mStartCellX = 0;
@@ -392,17 +403,17 @@ bool KOAgenda::eventFilter ( QObject *object, QEvent *event )
case QEvent::MouseButtonRelease:
case QEvent::MouseMove:
return eventFilter_mouse(object, static_cast<QMouseEvent *>(event));
case (QEvent::Leave):
if (!mActionItem)
- setCursor(arrowCursor);
+ setCursor(Qt::arrowCursor);
return true;
default:
- return QScrollView::eventFilter(object,event);
+ return Q3ScrollView::eventFilter(object,event);
}
}
void KOAgenda::popupMenu()
{
mPopupTimer->stop();
if ( mPopupKind == 1 || mPopupKind == 3 ) {
@@ -502,17 +513,17 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
} else {
viewportPos = me->pos();
}
bool objIsNotViewport = (object != viewport());
bool leftButt = false;
#ifdef DESKTOP_VERSION
- leftButt = (me->button() == LeftButton);
+ leftButt = (me->button() == Qt::LeftButton);
#endif
switch (me->type()) {
case QEvent::MouseButtonPress:
- if (me->button() == LeftButton) {
+ if (me->button() == Qt::LeftButton) {
mPopupTimer->start( 600 );
mLeftMouseDown = true;
}
blockMoving = true;
startX = viewportPos.x();
startY = viewportPos.y();
@@ -575,16 +586,16 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
}
}
}
if ( objIsNotViewport ) {
mPopupItem = (KOAgendaItem *)object;
mPopupKind = 1;
- if (me->button() == RightButton) {
+ if (me->button() == Qt::RightButton) {
mPopupKind = 3;
popupMenu();
- } else if (me->button() == LeftButton) {
+ } else if (me->button() == Qt::LeftButton) {
mActionItem = (KOAgendaItem *)object;
if (mActionItem) {
emit signalClearSelection();
slotClearSelection();
selectItem(mActionItem);
Incidence *incidence = mActionItem->incidence();
@@ -597,62 +608,62 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
}
} else { // ---------- viewport()
mPopupItem = 0;
mPopupKind = 2;
selectItem(0);
mActionItem = 0;
- if (me->button() == RightButton) {
+ if (me->button() == Qt::RightButton) {
int x,y;
viewportToContents(viewportPos.x(),viewportPos.y(),x,y);
int gx,gy;
contentsToGrid(x,y,gx,gy);
mCurrentCellX = gx;
mCurrentCellY = gy;
mStartCellX = gx;
mStartCellY = gy;
mPopupKind = 4;
popupMenu();
- } else if (me->button() == LeftButton) {
- setCursor(arrowCursor);
+ } else if (me->button() == Qt::LeftButton) {
+ setCursor(Qt::arrowCursor);
startSelectAction(viewportPos);
}
}
break;
case QEvent::MouseButtonRelease:
- if (me->button() == LeftButton ) {
+ if (me->button() == Qt::LeftButton ) {
mPopupTimer->stop();
}
if (object != viewport()) {
- if (me->button() == LeftButton && mLeftMouseDown) {
+ if (me->button() == Qt::LeftButton && mLeftMouseDown) {
if (mActionItem) {
QPoint clipperPos = clipper()->mapFromGlobal(viewport()->mapToGlobal(viewportPos));
//qDebug(" %d %d %d ",clipperPos.y(),visibleHeight() , 9 );
if ( mActionType == MOVE && (clipperPos.y() > visibleHeight()-2 ||clipperPos.y() < 0 ) ) {
mScrollUpTimer.stop();
mScrollDownTimer.stop();
mActionItem->resetMove();
placeSubCells( mActionItem );
// emit startDragSignal( mActionItem->incidence() );
- setCursor( arrowCursor );
+ setCursor( Qt::arrowCursor );
mActionItem = 0;
mActionType = NOP;
mItemMoved = 0;
mLeftMouseDown = false;
return true;
}
endItemAction();
}
}
} else { // ---------- viewport()
- if (me->button() == LeftButton && mLeftMouseDown ) { //left click
+ if (me->button() == Qt::LeftButton && mLeftMouseDown ) { //left click
endSelectAction( true ); // emit new event signal
}
}
- if (me->button() == LeftButton)
+ if (me->button() == Qt::LeftButton)
mLeftMouseDown = false;
break;
case QEvent::MouseMove:
//qDebug("mm ");
@@ -847,38 +858,38 @@ void KOAgenda::startItemAction(QPoint viewportPos)
if (mAllDayMode) {
int gridDistanceX = (x - gx * mGridSpacingX);
if ( allowResize && gridDistanceX < mResizeBorderWidth &&
mActionItem->cellX() == mCurrentCellX) {
mActionType = RESIZELEFT;
- setCursor(sizeHorCursor);
+ setCursor(Qt::sizeHorCursor);
} else if ( allowResize && (mGridSpacingX - gridDistanceX) < mResizeBorderWidth &&
mActionItem->cellXWidth() == mCurrentCellX) {
mActionType = RESIZERIGHT;
- setCursor(sizeHorCursor);
+ setCursor(Qt::sizeHorCursor);
} else {
mActionType = MOVE;
mActionItem->startMove();
- setCursor(sizeAllCursor);
+ setCursor(Qt::sizeAllCursor);
}
} else {
int gridDistanceY = (y - gy * mGridSpacingY);
if (allowResize && gridDistanceY < mResizeBorderWidth &&
mActionItem->cellYTop() == mCurrentCellY &&
!mActionItem->firstMultiItem()) {
mActionType = RESIZETOP;
- setCursor(sizeVerCursor);
+ setCursor(Qt::sizeVerCursor);
} else if (allowResize &&(mGridSpacingY - gridDistanceY) < mResizeBorderWidth &&
mActionItem->cellYBottom() == mCurrentCellY &&
!mActionItem->lastMultiItem()) {
mActionType = RESIZEBOTTOM;
- setCursor(sizeVerCursor);
+ setCursor(Qt::sizeVerCursor);
} else {
mActionType = MOVE;
mActionItem->startMove();
- setCursor(sizeAllCursor);
+ setCursor(Qt::sizeAllCursor);
}
}
}
void KOAgenda::performItemAction(QPoint viewportPos)
{
@@ -903,33 +914,33 @@ void KOAgenda::performItemAction(QPoint viewportPos)
if ( mActionType == MOVE ) {
mScrollUpTimer.stop();
mScrollDownTimer.stop();
mActionItem->resetMove();
placeSubCells( mActionItem );
// emit startDragSignal( mActionItem->incidence() );
- setCursor( arrowCursor );
+ setCursor( Qt::arrowCursor );
mActionItem = 0;
mActionType = NOP;
mItemMoved = 0;
return;
}
} else {
switch ( mActionType ) {
case MOVE:
- setCursor( sizeAllCursor );
+ setCursor( Qt::sizeAllCursor );
break;
case RESIZETOP:
case RESIZEBOTTOM:
- setCursor( sizeVerCursor );
+ setCursor( Qt::sizeVerCursor );
break;
case RESIZELEFT:
case RESIZERIGHT:
- setCursor( sizeHorCursor );
+ setCursor( Qt::sizeHorCursor );
break;
default:
- setCursor( arrowCursor );
+ setCursor( Qt::arrowCursor );
}
}
// Scroll if item was moved to upper or lower end of agenda.
if (clipperPos.y() < mScrollBorderWidth) {
mScrollUpTimer.start(mScrollDelay);
@@ -968,13 +979,13 @@ void KOAgenda::performItemAction(QPoint viewportPos)
mActionItem->expandTop(gy - mCurrentCellY);
mActionItem->resize(mActionItem->width(),
mGridSpacingY * mActionItem->cellHeight());
int x,y;
gridToContents(mCurrentCellX,mActionItem->cellYTop(),x,y);
//moveChild(mActionItem,childX(mActionItem),y);
- QScrollView::moveChild( mActionItem,childX(mActionItem),y );
+ Q3ScrollView::moveChild( mActionItem,childX(mActionItem),y );
}
} else if (mActionType == RESIZEBOTTOM) {
if (mCurrentCellY >= mActionItem->cellYTop()) {
mActionItem->expandBottom(gy - mCurrentCellY);
mActionItem->resize(mActionItem->width(),
mGridSpacingY * mActionItem->cellHeight());
@@ -1016,13 +1027,13 @@ void KOAgenda::endItemAction()
}
int type = mActionType;
if ( mAllDayMode )
type = -1;
KOAgendaItem *modifiedItem = placeItem;
//emit itemModified( placeItem, mActionType /*KOGlobals::EVENTEDITED */);
- QPtrList<KOAgendaItem> oldconflictItems ;//= placeItem->conflictItems();
+ Q3PtrList<KOAgendaItem> oldconflictItems ;//= placeItem->conflictItems();
KOAgendaItem *item;
if ( placeItem->incidence()->typeID() == todoID ) {
mSelectedItem = 0;
//qDebug("todo %d %d %d ", mCurrentCellX, modifiedItem->cellX() ,modifiedItem->cellXWidth());
modifiedItem->mLastMoveXPos = mCurrentCellX;
@@ -1107,13 +1118,13 @@ void KOAgenda::endItemAction()
}
if ( mActionItem )
emit incidenceSelected( mActionItem->incidence() );
mScrollUpTimer.stop();
mScrollDownTimer.stop();
- setCursor( arrowCursor );
+ setCursor( Qt::arrowCursor );
mActionItem = 0;
mActionType = NOP;
mItemMoved = 0;
}
@@ -1133,31 +1144,31 @@ void KOAgenda::setNoActionCursor(KOAgendaItem *moveItem,QPoint viewportPos)
// Change cursor to resize cursor if appropriate
if (mAllDayMode) {
int gridDistanceX = (x - gx * mGridSpacingX);
if (gridDistanceX < mResizeBorderWidth &&
moveItem->cellX() == gx) {
- setCursor(sizeHorCursor);
+ setCursor(Qt::sizeHorCursor);
} else if ((mGridSpacingX - gridDistanceX) < mResizeBorderWidth &&
moveItem->cellXWidth() == gx) {
- setCursor(sizeHorCursor);
+ setCursor(Qt::sizeHorCursor);
} else {
- setCursor(arrowCursor);
+ setCursor(Qt::arrowCursor);
}
} else {
int gridDistanceY = (y - gy * mGridSpacingY);
if (gridDistanceY < mResizeBorderWidth &&
moveItem->cellYTop() == gy &&
!moveItem->firstMultiItem()) {
- setCursor(sizeVerCursor);
+ setCursor(Qt::sizeVerCursor);
} else if ((mGridSpacingY - gridDistanceY) < mResizeBorderWidth &&
moveItem->cellYBottom() == gy &&
!moveItem->lastMultiItem()) {
- setCursor(sizeVerCursor);
+ setCursor(Qt::sizeVerCursor);
} else {
- setCursor(arrowCursor);
+ setCursor(Qt::arrowCursor);
}
}
}
/*
@@ -1170,15 +1181,15 @@ void KOAgenda::setNoActionCursor(KOAgendaItem *moveItem,QPoint viewportPos)
cell, where other items are, which do not overlap in Y with the item to place,
the display gets corrupted, although the corruption looks quite nice.
*/
void KOAgenda::placeSubCells(KOAgendaItem *placeItem)
{
- QPtrList<KOAgendaItem> conflictItems;
+ Q3PtrList<KOAgendaItem> conflictItems;
int maxSubCells = 0;
- QIntDict<KOAgendaItem> subCellDict(7);
+ Q3IntDict<KOAgendaItem> subCellDict(7);
KOAgendaItem *item;
for ( item=mItems.first(); item != 0; item=mItems.next() ) {
if (item != placeItem) {
if (placeItem->cellX() <= item->cellXWidth() &&
placeItem->cellXWidth() >= item->cellX()) {
@@ -1237,13 +1248,13 @@ void KOAgenda::placeSubCells(KOAgendaItem *placeItem)
}
// Adjust sub cell geometry of all conflict items of all conflict items
for ( item=conflictItems.first(); item != 0;
item=conflictItems.next() ) {
if ( placeItem != item ) {
KOAgendaItem *item2;
- QPtrList<KOAgendaItem> conflictItems2 = item->conflictItems();
+ Q3PtrList<KOAgendaItem> conflictItems2 = item->conflictItems();
for ( item2=conflictItems2.first(); item2 != 0;
item2=conflictItems2.next() ) {
if ( item2->subCells() != maxSubCells) {
item2->setSubCells(maxSubCells);
int diff = 0;
if (mAllDayMode) {
@@ -1322,15 +1333,15 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
int vxSel, vySel;
contentsToViewport ( selectionX, mSelectionYTop, vxSel,vySel);
int off = mSelectionHeight;
if ( vySel < 0 )
off += vySel;
//qDebug("OFF %d %d %d", off,vySel, vy );
- bitBlt ( pd, vx, vy+off, &mPaintPixmap, cx, cy+off, cw , ch-off ,CopyROP);
+ bitBlt ( pd, vx, vy+off, &mPaintPixmap, cx, cy+off, cw , ch-off ,QPainter::CompositionMode_Source);
} else {
- bitBlt ( pd, vx, vy, &mPaintPixmap, cx, cy, cw, ch ,CopyROP);
+ bitBlt ( pd, vx, vy, &mPaintPixmap, cx, cy, cw, ch ,QPainter::CompositionMode_Source);
}
}
if ( mSelectionHeight > 0 ) {
//qDebug("---- %d %d %d %d ", selectionX, mSelectionYTop, mGridSpacingX, mSelectionHeight );
if ( ( cx + cw ) >= selectionX && cx <= ( selectionX + mGridSpacingX ) &&
( cy + ch ) >= mSelectionYTop && cy <= ( mSelectionYTop + mSelectionHeight ) ) {
@@ -1339,13 +1350,13 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
int hei = mSelectionHeight;
int offset = 0;
while ( hei > 0 ) {
int p_hei = 5;
if ( hei < 5 ) p_hei = hei;
hei -= 5;
- bitBlt ( pd, vx+1, vy+offset, &mHighlightPixmap, 0, 0, mGridSpacingX-1, p_hei ,CopyROP);
+ bitBlt ( pd, vx+1, vy+offset, &mHighlightPixmap, 0, 0, mGridSpacingX-1, p_hei ,QPainter::CompositionMode_Source);
offset += 5;
}
}
}
p->begin( pd );
} else {
@@ -1362,13 +1373,13 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
int selectionX = KOGlobals::self()->reverseLayout() ?
(mColumns - 1 - mSelectionCellX) * mGridSpacingX :
mSelectionCellX * mGridSpacingX;
contentsToViewport ( cx, cy, vx,vy);
// qDebug(" %d %d %d %d ", cx, cy, cw,ch) ;
if ( !(selectionX == cx && cy == mSelectionYTop && cw ==mGridSpacingX && ch == mSelectionHeight ) )
- bitBlt ( pd, vx, vy, &mPaintPixmap, cx, cy, cw, ch ,CopyROP);
+ bitBlt ( pd, vx, vy, &mPaintPixmap, cx, cy, cw, ch ,QPainter::CompositionMode_Source);
if ( mSelectionHeight > 0 ) {
//qDebug("---- %d %d %d %d ", selectionX, mSelectionYTop, mGridSpacingX, mSelectionHeight );
if ( ( cx + cw ) >= selectionX && cx <= ( selectionX + mGridSpacingX ) &&
( cy + ch ) >= mSelectionYTop && cy <= ( mSelectionYTop + mSelectionHeight ) ) {
contentsToViewport ( selectionX, mSelectionYTop, vx,vy);
@@ -1376,13 +1387,13 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
int hei = mSelectionHeight;
int offset = 0;
while ( hei > 0 ) {
int p_hei = 5;
if ( hei < 5 ) p_hei = hei;
hei -= 5;
- bitBlt ( pd, vx+1, vy+offset, &mHighlightPixmap, 0, 0, mGridSpacingX-1, p_hei ,CopyROP);
+ bitBlt ( pd, vx+1, vy+offset, &mHighlightPixmap, 0, 0, mGridSpacingX-1, p_hei ,QPainter::CompositionMode_Source);
offset += 5;
}
}
}
p->begin( pd );
}
@@ -1573,20 +1584,20 @@ void KOAgenda::drawContentsToPainter( QPainter* paint, bool backgroundOnly )// i
}
}
// Draw horizontal lines of grid
int y = ((int)(cy/lGridSpacingY))*lGridSpacingY;
if ( lGridSpacingY > 0 ) {
while (y < cy + ch) {
- p->setPen( SolidLine );
+ p->setPen( Qt::SolidLine );
p->drawLine(cx,y,cx+cw,y);
y+=lGridSpacingY;
- p->setPen( DotLine );
+ p->setPen( Qt::DotLine );
p->drawLine(cx,y,cx+cw,y);
y+=lGridSpacingY;
}
- p->setPen( SolidLine );
+ p->setPen( Qt::SolidLine );
}
mPixPainter.end() ;
}
/*
Convert srcollview contents coordinates to agenda grid coordinates.
@@ -1714,13 +1725,13 @@ void KOAgenda::updateTodo( Todo * todo, int days, bool remove)
//qDebug("item found ");
item->hide();
item->setCellX(-2, -1 );
item->select(false);
mUnusedItems.append( item );
mItems.remove( item );
- QPtrList<KOAgendaItem> oldconflictItems = item->conflictItems();
+ Q3PtrList<KOAgendaItem> oldconflictItems = item->conflictItems();
KOAgendaItem *itemit;
//globalFlagBlockAgendaItemPaint = 1;
for ( itemit=oldconflictItems.first(); itemit != 0;
itemit=oldconflictItems.next() ) {
if ( itemit != item )
placeSubCells(itemit);
@@ -1744,13 +1755,13 @@ void KOAgenda::updateTodo( Todo * todo, int days, bool remove)
return;
}
if ( todo->hasCompletedDate() && !KOPrefs::instance()->mShowCompletedTodoInAgenda )
return;
//qDebug("updateTodo+++++++++++++++++++++++++++++++++++++ ");
QDate currentDate = QDate::currentDate();
- bool overdue = (!todo->isCompleted()) && (todo->dtDue() < currentDate)&& ( KOPrefs::instance()->mShowTodoInAgenda );
+ bool overdue = (!todo->isCompleted()) && (todo->dtDue() < (QDateTime)currentDate)&& ( KOPrefs::instance()->mShowTodoInAgenda );
QDateTime dt;
if ( todo->hasCompletedDate() )
dt = todo->completed();
else
dt = todo->dtDue();
if ( overdue ) {
@@ -1776,13 +1787,13 @@ void KOAgenda::updateTodo( Todo * todo, int days, bool remove)
int startY = endY - 1-hi;
item = insertItem(todo,currentDate,days,startY,endY);
item->show();
}
qApp->processEvents();
globalFlagBlockAgendaItemPaint = 0;
- QPtrList<KOAgendaItem> oldconflictItems = item->conflictItems();
+ Q3PtrList<KOAgendaItem> oldconflictItems = item->conflictItems();
KOAgendaItem *itemit;
for ( itemit=oldconflictItems.first(); itemit != 0;
itemit=oldconflictItems.next() ) {
globalFlagBlockAgendaItemUpdate = 0;
itemit->repaintMe();
globalFlagBlockAgendaItemUpdate = 1;
@@ -1864,13 +1875,13 @@ void KOAgenda::insertMultiItem (Event *event,QDate qd,int XBegin,int XEnd,
int cellX,cellYTop,cellYBottom;
QString newtext;
int width = XEnd - XBegin + 1;
int count = 0;
KOAgendaItem *current = 0;
- QPtrList<KOAgendaItem> multiItems;
+ Q3PtrList<KOAgendaItem> multiItems;
for (cellX = XBegin;cellX <= XEnd;++cellX) {
if (cellX == XBegin) cellYTop = YTop;
else cellYTop = 0;
if (cellX == XEnd) cellYBottom = YBottom;
else cellYBottom = rows() - 1;
newtext = QString("(%1/%2): ").arg(++count).arg(width);
@@ -1924,13 +1935,13 @@ void KOAgenda::finishResize ( )
*/
void KOAgenda::resizeEvent ( QResizeEvent *ev )
{
mSelectionHeight = 0;
mResizeTimer.start( 150 , true );
computeSizes();
- QScrollView::resizeEvent( ev );
+ Q3ScrollView::resizeEvent( ev );
return;
}
void KOAgenda::computeSizes()
{
if ( globalFlagBlockStartup )
@@ -2013,13 +2024,13 @@ void KOAgenda::popupAlarm()
if (!mClickedItem) {
qDebug("KOAgenda::popupAlarm() called without having a clicked item ");
return;
}
// TODO: deal correctly with multiple alarms
Alarm* alarm;
- QPtrList<Alarm> list(mClickedItem->incidence()->alarms());
+ Q3PtrList<Alarm> list(mClickedItem->incidence()->alarms());
for(alarm=list.first();alarm;alarm=list.next()) {
alarm->toggleAlarm();
}
emit itemModified( mClickedItem , KOGlobals::EVENTEDITED );
mClickedItem->paintMe( true );
mClickedItem->repaint( false );
@@ -2104,22 +2115,22 @@ void KOAgenda::selectItem(KOAgendaItem *item)
}
// This function seems never be called.
void KOAgenda::keyPressEvent( QKeyEvent *kev )
{
switch(kev->key()) {
- case Key_PageDown:
+ case Qt::Key_PageDown:
verticalScrollBar()->addPage();
break;
- case Key_PageUp:
+ case Qt::Key_PageUp:
verticalScrollBar()->subtractPage();
break;
- case Key_Down:
+ case Qt::Key_Down:
verticalScrollBar()->addLine();
break;
- case Key_Up:
+ case Qt::Key_Up:
verticalScrollBar()->subtractLine();
break;
default:
;
}
}
@@ -2143,13 +2154,13 @@ DateList KOAgenda::dateList() const
void KOAgenda::setDateList(const DateList &selectedDates)
{
mSelectedDates = selectedDates;
}
-void KOAgenda::setHolidayMask(QMemArray<bool> *mask)
+void KOAgenda::setHolidayMask(Q3MemArray<bool> *mask)
{
mHolidayMask = mask;
/*
kdDebug() << "HolidayMask: ";
for(uint i=0;i<mask->count();++i) {
@@ -2159,13 +2170,13 @@ void KOAgenda::setHolidayMask(QMemArray<bool> *mask)
*/
}
void KOAgenda::contentsMousePressEvent ( QMouseEvent *event )
{
- QScrollView::contentsMousePressEvent(event);
+ Q3ScrollView::contentsMousePressEvent(event);
}
void KOAgenda::storePosition()
{
//mContentPosition
int max = mGridSpacingY*4*24;
@@ -2193,19 +2204,19 @@ void KOAgenda::restorePosition()
//qDebug("posY %d hei %d", posY, max);
}
void KOAgenda::moveChild( QWidget *w, int x , int y )
{
++x;
- QScrollView::moveChild( w, x , y );
+ Q3ScrollView::moveChild( w, x , y );
}
#include <qmessagebox.h>
#ifdef DESKTOP_VERSION
#include <qprinter.h>
#include <qpainter.h>
-#include <qpaintdevicemetrics.h>
+#include <q3paintdevicemetrics.h>
#endif
void KOAgenda::printSelection()
{
#ifdef DESKTOP_VERSION
if ( mStartCellY == mCurrentCellY ) {
@@ -2228,13 +2239,13 @@ void KOAgenda::printSelection()
QPrinter* printer = new QPrinter();
if ( !printer->setup()) {
delete printer;
return;
}
QPainter p( printer );
- QPaintDeviceMetrics m = QPaintDeviceMetrics ( printer );
+ Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( printer );
QString date = i18n("Date range: ")+KGlobal::locale()->formatDate( mSelectedDates.first() )+" - "+KGlobal::locale()->formatDate( mSelectedDates.last() );
//date += " --- printing time: " + KGlobal::locale()->formatDateTime(QDateTime::currentDateTime(), true );
int hei = p.boundingRect(0,0, 5, 5, Qt::AlignLeft, date ).height();
// p.drawText( 0, 0, date );
int offset = m.width()/8;
// compute the scale
diff --git a/korganizer/koagenda.h b/korganizer/koagenda.h
index 380ce62..0708341 100644
--- a/korganizer/koagenda.h
+++ b/korganizer/koagenda.h
@@ -20,33 +20,42 @@
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#ifndef KOAGENDA_H
#define KOAGENDA_H
-#include <qscrollview.h>
+#include <q3scrollview.h>
#include <qtimer.h>
-#include <qmemarray.h>
+#include <q3memarray.h>
#include <qpainter.h>
#include <qpixmap.h>
-#include <qguardedptr.h>
+#include <qpointer.h>
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <Q3Frame>
+#include <QLabel>
+#include <QMouseEvent>
+#include <Q3PtrList>
+#include <Q3PopupMenu>
+#include <QKeyEvent>
+#include <QEvent>
#include "koagendaitem.h"
#include "koeventview.h"
-class QPopupMenu;
+class Q3PopupMenu;
class QTime;
class KConfig;
-class QFrame;
+class Q3Frame;
class KOAgenda;
class KCal::Event;
class KCal::Todo;
using namespace KCal;
-class MarcusBains : public QFrame {
+class MarcusBains : public Q3Frame {
Q_OBJECT
public:
MarcusBains(KOAgenda *agenda=0,const char *name=0);
virtual ~MarcusBains();
void hideMe();
public slots:
@@ -60,23 +69,23 @@ class MarcusBains : public QFrame {
KOAgenda *agenda;
QTime oldTime;
int oldToday;
};
-class KOAgenda : public QScrollView
+class KOAgenda : public Q3ScrollView
{
Q_OBJECT
public:
enum MouseActionType { NOP, MOVE, SELECT,
RESIZETOP, RESIZEBOTTOM, RESIZELEFT, RESIZERIGHT };
KOAgenda ( int columns, int rows, int columnSize, QWidget * parent=0,
- const char * name=0, WFlags f=0 );
+ const char * name=0, Qt::WFlags f=0 );
KOAgenda ( int columns, QWidget * parent=0,
- const char * name=0, WFlags f=0 );
+ const char * name=0, Qt::WFlags f=0 );
virtual ~KOAgenda();
bool mInvalidPixmap;
Incidence *selectedIncidence() const;
QDate selectedIncidenceDate() const;
@@ -114,13 +123,13 @@ class KOAgenda : public QScrollView
virtual int minimumWidth() const;
/** Update configuration from preference settings */
void updateConfig();
void checkScrollBoundaries();
- void setHolidayMask(QMemArray<bool> *);
+ void setHolidayMask(Q3MemArray<bool> *);
void setDateList(const DateList &selectedDates);
DateList dateList() const;
void drawContentsToPainter( QPainter* paint = 0, bool backgroundOnly = false);
void finishUpdate();
void printSelection();
void storePosition();
@@ -274,35 +283,35 @@ class KOAgenda : public QScrollView
DateList mSelectedDates;
// The KOAgendaItem, which has been right-clicked last
KOAgendaItem *mClickedItem;
// The KOAgendaItem, which is being moved/resized
- QGuardedPtr<KOAgendaItem> mActionItem;
+ QPointer<KOAgendaItem> mActionItem;
// Currently selected item
- QGuardedPtr<KOAgendaItem> mSelectedItem;
+ QPointer<KOAgendaItem> mSelectedItem;
// The Marcus Bains Line widget.
MarcusBains *mMarcusBains;
void computeSizes();
MouseActionType mActionType;
bool mItemMoved;
// List of all Items contained in agenda
- QPtrList<KOAgendaItem> mItems;
- QPtrList<KOAgendaItem> mUnusedItems;
+ Q3PtrList<KOAgendaItem> mItems;
+ Q3PtrList<KOAgendaItem> mUnusedItems;
KOAgendaItem* getNewItem(Incidence * event,QDate qd, QWidget* viewport);
- QPopupMenu *mItemPopup; // Right mouse button popup menu for KOAgendaItems
- QPopupMenu *mNewItemPopup;
+ Q3PopupMenu *mItemPopup; // Right mouse button popup menu for KOAgendaItems
+ Q3PopupMenu *mNewItemPopup;
int mOldLowerScrollValue;
int mOldUpperScrollValue;
KOAgendaItem * getItemForTodo ( Todo * todo );
- QMemArray<bool> *mHolidayMask;
+ Q3MemArray<bool> *mHolidayMask;
int mCurPixWid;
int mCurPixHei;
};
#endif // KOAGENDA_H
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index 407424d..0f9a38f 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -16,19 +16,29 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <qlabel.h>
#include <qlayout.h>
-#include <qhbox.h>
-#include <qvbox.h>
+#include <q3hbox.h>
+#include <q3vbox.h>
#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qdragobject.h>
+#include <q3whatsthis.h>
+#include <q3dragobject.h>
#include <qdrawutil.h>
#include <qpainter.h>
+#include <QDesktopWidget>
+//Added by qt3to4:
+#include <Q3PtrList>
+#include <QPixmap>
+#include <QDragEnterEvent>
+#include <QDropEvent>
+#include <QResizeEvent>
+#include <QMouseEvent>
+#include <QEvent>
+#include <QPaintEvent>
#include <kiconloader.h>
#include <kdebug.h>
#include <kglobal.h>
#include <klocale.h>
#ifndef DESKTOP_VERSION
@@ -54,36 +64,36 @@ extern int globalFlagBlockAgendaItemUpdate;
//--------------------------------------------------------------------------
QToolTipGroup *KOAgendaItem::mToolTipGroup = 0;
//--------------------------------------------------------------------------
-class KOAgendaItemWhatsThis :public QWhatsThis
+class KOAgendaItemWhatsThis :public Q3WhatsThis
{
public:
- KOAgendaItemWhatsThis( KOAgendaItem* view ) : QWhatsThis( view ),_view (view) { };
+ KOAgendaItemWhatsThis( KOAgendaItem* view ) : Q3WhatsThis( view ),_view (view) { };
protected:
virtual QString text( const QPoint& )
{
return _view->getWhatsThisText() ;
}
private:
KOAgendaItem * _view;
};
KOAgendaItem::KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent,bool allday,
- const char *name,WFlags) :
+ const char *name,Qt::WFlags) :
QWidget(parent, name), mIncidence(incidence), mDate(qd)
{
#ifndef DESKTOP_VERSION
//QPEApplication::setStylusOperation( this, QPEApplication::RightOnHold );
#endif
mKOAgendaItemWhatsThis = new KOAgendaItemWhatsThis(this);
- int wflags = getWFlags() |WRepaintNoErase;// WResizeNoErase
- setWFlags ( wflags);
+ Qt::WindowFlags wflags = windowFlags() |Qt::WRepaintNoErase;// WResizeNoErase
+ setWindowFlags ( wflags);
mAllDay = allday;
init ( incidence, qd );
//setMouseTracking(true);
//setAcceptDrops(true);
xPaintCoord = -1;
yPaintCoord = -1;
@@ -100,13 +110,13 @@ QString KOAgendaItem::getWhatsThisText()
void KOAgendaItem::initColor ()
{
if ( (mIncidence->typeID() == todoID ) &&
( !((static_cast<Todo*>(mIncidence))->isCompleted()) &&
((static_cast<Todo*>(mIncidence))->dtDue().date() <= QDate::currentDate()) ) ) {
- if ( (static_cast<Todo*>(mIncidence))->dtDue() < QDateTime::currentDateTime().date())
+ if ( (static_cast<Todo*>(mIncidence))->dtDue() < (QDateTime)QDateTime::currentDateTime().date())
mBackgroundColor = KOPrefs::instance()->mTodoOverdueColor ;
else
mBackgroundColor = KOPrefs::instance()->mTodoDueTodayColor;
}
else {
QStringList categories = mIncidence->categories();
@@ -129,13 +139,13 @@ void KOAgendaItem::initColor ()
QColor BackgroundColor ( mBackgroundColor );
if ( mIncidence->calID() > 1 ) {
//BackgroundColor = KOPrefs::instance()->defaultColor( mIncidence->calID() );
}
mColorGroup = QColorGroup( BackgroundColor.light(),
BackgroundColor.dark(),BackgroundColor.light(),
- BackgroundColor.dark(),BackgroundColor, black, BackgroundColor) ;
+ BackgroundColor.dark(),BackgroundColor, Qt::black, BackgroundColor) ;
setBackgroundColor( mBackgroundColor );
mWhiteText = (mBackgroundColor.red() + mBackgroundColor.green() + mBackgroundColor.blue() < 250);
}
void KOAgendaItem::init ( Incidence *incidence, QDate qd )
{
mIncidence = incidence;
@@ -225,62 +235,62 @@ bool KOAgendaItem::updateIcons(QPainter * p, bool horLayout)
if ( horLayout )
++xOff;
else
++yOff;
}
if (mIncidence->isAlarmEnabled() && mIncidence->alarmEnabled()) {
- p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, red );
+ p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, Qt::red );
if ( horLayout )
++xOff;
else
++yOff;
}
if (mIncidence->doesRecur()) {
- p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, blue );
+ p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, Qt::blue );
if ( horLayout )
++xOff;
else
++yOff;
}
if (mIncidence->description().length() > 0) {
- p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, darkGreen );
+ p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, Qt::darkGreen );
if ( horLayout )
++xOff;
else
++yOff;
}
if (mIncidence->isReadOnly()) {
- p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, white );
+ p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, Qt::white );
if ( horLayout )
++xOff;
else
++yOff;
}
if (mIncidence->attendeeCount()>0) {
if (mIncidence->organizer() == KOPrefs::instance()->email()) {
- p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, black );
+ p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, Qt::black );
if ( horLayout )
++xOff;
else
++yOff;
} else {
Attendee *me = mIncidence->attendeeByMails(KOPrefs::instance()->mAdditionalMails,KOPrefs::instance()->email());
if (me!=0) {
} else {
- p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, yellow );
+ p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, Qt::yellow );
if ( horLayout )
++xOff;
else
++yOff;
}
- p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, darkYellow );
+ p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, Qt::darkYellow );
if ( horLayout )
++xOff;
else
++yOff;
}
@@ -417,39 +427,39 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint )
else
if ( nfh < h -2 )
++yy;
}
int align;
#ifndef DESKTOP_VERSION
- align = ( AlignLeft|WordBreak|AlignTop);
+ align = ( Qt::AlignLeft|Qt::TextWordWrap|Qt::AlignTop);
#else
- align = ( AlignLeft|BreakAnywhere|WordBreak|AlignTop);
+ align = ( Qt::AlignLeft|Qt::TextWrapAnywhere|Qt::TextWordWrap|Qt::AlignTop);
#endif
if ( addIcon ) {
if ( ! horLayout ) {
x += AGENDA_ICON_SIZE+3;
w -= (AGENDA_ICON_SIZE+3);
}
else {
yy+= AGENDA_ICON_SIZE+2;
h -=(AGENDA_ICON_SIZE+3);
}
}
if ( mWhiteText )
- paint->setPen ( white);
+ paint->setPen ( Qt::white);
if ( x < 0 ) {
w = w+x-3;
x = 3;
if ( !horLayout && addIcon )
x += AGENDA_ICON_SIZE+3;
if ( w > parentWidget()->width() ){
w = parentWidget()->width() - 6;
#ifndef DESKTOP_VERSION
- align = ( AlignHCenter|WordBreak|AlignTop);
+ align = ( Qt::AlignHCenter|Qt::TextWordWrap|Qt::AlignTop);
#else
- align = ( AlignHCenter|BreakAnywhere|WordBreak|AlignTop);
+ align = ( Qt::AlignHCenter|Qt::TextWrapAnywhere|Qt::TextWordWrap|Qt::AlignTop);
#endif
}
}
QRect dr;
if ( w + x > parentWidget()->width() )
@@ -558,13 +568,13 @@ void KOAgendaItem::paintEvent ( QPaintEvent *e )
if ( rw <= 1 ) {
//qDebug("KOAgendaItem::Width2 <= 1 (%d). Returning.%s ",rw,mDisplayedText.latin1() );
return;
}
}
//qDebug("%d %d %d %d %d %d %d",rx, ry, paintFrom, xx ,yPaintCoord+ry, rw, rh);
- bitBlt (this, rx, ry, paintFrom, xx ,yPaintCoord+ry, rw, rh ,CopyROP);
+ bitBlt (this, rx, ry, paintFrom, xx ,yPaintCoord+ry, rw, rh ,QPainter::CompositionMode_Source);
}
void KOAgendaItem::computeText()
{
mDisplayedText = mIncidence->summary();
if ( (mIncidence->typeID() == todoID ) ) {
if ( static_cast<Todo*>(mIncidence)->hasDueDate() ) {
@@ -625,13 +635,13 @@ void KOAgendaItem::computeText()
tipText += "\n"+i18n("Due: ")+ (static_cast<Todo*>(mIncidence))->dtDueDateStr();
}
if (!mIncidence->location().isEmpty()) {
tipText += "\n"+i18n("Location: ")+mIncidence->location();
}
- QToolTip::add(this,tipText,toolTipGroup(),"");
+ QToolTip::add(this,tipText /*TODO:hacker: ,toolTipGroup(),"" */);
#endif
}
void KOAgendaItem::updateItem()
{
computeText();
@@ -792,33 +802,33 @@ void KOAgendaItem::expandRight(int dx)
if (newXWidth < newX) newXWidth = newX;
setCellX(newX,newXWidth);
}
QToolTipGroup *KOAgendaItem::toolTipGroup()
{
- if (!mToolTipGroup) mToolTipGroup = new QToolTipGroup(0);
+ /* TODO:hacker: if (!mToolTipGroup) mToolTipGroup = new QToolTipGroup(0); */
return mToolTipGroup;
}
void KOAgendaItem::dragEnterEvent( QDragEnterEvent *e )
{
#ifndef KORG_NODND
if ( ICalDrag::canDecode( e ) || VCalDrag::canDecode( e ) ||
- !QTextDrag::canDecode( e ) ) {
+ !Q3TextDrag::canDecode( e ) ) {
e->ignore();
return;
}
e->accept();
#endif
}
void KOAgendaItem::dropEvent( QDropEvent *e )
{
#ifndef KORG_NODND
QString text;
- if(QTextDrag::decode(e,text))
+ if(Q3TextDrag::decode(e,text))
{
kdDebug() << "Dropped : " << text << endl;
QStringList emails = QStringList::split(",",text);
for(QStringList::ConstIterator it = emails.begin();it!=emails.end();++it) {
kdDebug() << " Email: " << (*it) << endl;
int pos = (*it).find("<");
@@ -830,18 +840,18 @@ void KOAgendaItem::dropEvent( QDropEvent *e )
}
}
#endif
}
-QPtrList<KOAgendaItem> KOAgendaItem::conflictItems()
+Q3PtrList<KOAgendaItem> KOAgendaItem::conflictItems()
{
return mConflictItems;
}
-void KOAgendaItem::setConflictItems(QPtrList<KOAgendaItem> ci)
+void KOAgendaItem::setConflictItems(Q3PtrList<KOAgendaItem> ci)
{
mConflictItems = ci;
KOAgendaItem *item;
for ( item=mConflictItems.first(); item != 0;
item=mConflictItems.next() ) {
item->addConflictItem(this);
diff --git a/korganizer/koagendaitem.h b/korganizer/koagendaitem.h
index 27ee720..17cf975 100644
--- a/korganizer/koagendaitem.h
+++ b/korganizer/koagendaitem.h
@@ -16,17 +16,24 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef KOAGENDAITEM_H
#define KOAGENDAITEM_H
-#include <qframe.h>
+#include <q3frame.h>
#include <qlabel.h>
#include <qpixmap.h>
#include <qdatetime.h>
#include <qpalette.h>
+//Added by qt3to4:
+#include <QDropEvent>
+#include <QPaintEvent>
+#include <QResizeEvent>
+#include <Q3PtrList>
+#include <QEvent>
+#include <QDragEnterEvent>
#include <libkcal/incidence.h>
class KOAgendaItemWhatsThis;
class QToolTipGroup;
class QDragEnterEvent;
@@ -42,13 +49,13 @@ using namespace KCal;
*/
class KOAgendaItem : public QWidget
{
Q_OBJECT
public:
KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent, bool allday, const char *name=0,
- WFlags f=0 );
+ Qt::WFlags f=0 );
~KOAgendaItem();
QString getWhatsThisText();
void init ( Incidence *incidence, QDate qd );
int cellX() { return mCellX; }
int cellXWidth() { return mCellXWidth; }
int cellYTop() { return mCellYTop; }
@@ -93,14 +100,14 @@ class KOAgendaItem : public QWidget
QString text () { return mDisplayedText; }
virtual bool eventFilter ( QObject *, QEvent * );
static QToolTipGroup *toolTipGroup();
- QPtrList<KOAgendaItem> conflictItems();
- void setConflictItems(QPtrList<KOAgendaItem>);
+ Q3PtrList<KOAgendaItem> conflictItems();
+ void setConflictItems(Q3PtrList<KOAgendaItem>);
void addConflictItem(KOAgendaItem *ci);
void paintMe( bool, QPainter* painter = 0 );
void repaintMe();
static QPixmap * paintPix();
static QPixmap * paintPixAllday();
void updateItem();
@@ -158,10 +165,10 @@ class KOAgendaItem : public QWidget
static QToolTipGroup *mToolTipGroup;
QColor mBackgroundColor;
QColorGroup mColorGroup;
QString mDisplayedText;
bool mSelected;
- QPtrList<KOAgendaItem> mConflictItems;
+ Q3PtrList<KOAgendaItem> mConflictItems;
};
#endif // KOAGENDAITEM_H
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index 6e65a03..87993ae 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -18,27 +18,39 @@
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 <qhbox.h>
-#include <qvbox.h>
+#include <q3hbox.h>
+#include <q3vbox.h>
#include <qlabel.h>
-#include <qframe.h>
+#include <q3frame.h>
#include <qlayout.h>
#ifndef KORG_NOSPLITTER
#include <qsplitter.h>
#endif
#include <qfont.h>
#include <qfontmetrics.h>
-#include <qpopupmenu.h>
+#include <q3popupmenu.h>
#include <qtooltip.h>
#include <qpainter.h>
#include <qpushbutton.h>
#include <qapplication.h>
+#include <QDesktopWidget>
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <QPixmap>
+#include <QMouseEvent>
+#include <Q3GridLayout>
+#include <Q3ValueList>
+#include <QKeyEvent>
+#include <Q3HBoxLayout>
+#include <Q3VBoxLayout>
+#include <QPaintEvent>
+#include <Q3PtrList>
#include <kapplication.h>
#include <KDGanttMinimizeSplitter.h>
#include <kdebug.h>
#include <kstandarddirs.h>
#include <kiconloader.h>
@@ -75,14 +87,14 @@ extern int globalFlagBlockAgendaItemPaint;
extern int globalFlagBlockAgendaItemUpdate;
extern int globalFlagBlockLabel;
using namespace KOrg;
#define IDLETIMEOUT 45
-TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,WFlags f) :
- QScrollView(parent,name,f)
+TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,Qt::WFlags f) :
+ Q3ScrollView(parent,name,f)
{
myPix.resize( 1, 1 );
mRows = rows;
mRedrawNeeded = true;
setMinimumHeight( 20 );
@@ -92,13 +104,13 @@ TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,WFlags f) :
setHScrollBarMode(AlwaysOff);
setVScrollBarMode(AlwaysOff);
resizeContents(50,mRows * mCellHeight);
- viewport()->setBackgroundMode( PaletteBackground );
+ viewport()->setBackgroundMode( Qt::PaletteBackground );
}
void TimeLabels::setCellHeight(int height)
{
mCellHeight = height;
}
@@ -280,13 +292,13 @@ void TimeLabels::paintEvent(QPaintEvent*)
repaintContents(contentsX(), contentsY(), visibleWidth(), visibleHeight());
}
////////////////////////////////////////////////////////////////////////////
EventIndicator::EventIndicator(Location loc,QWidget *parent,const char *name)
- : QFrame(parent,name)
+ : Q3Frame(parent,name)
{
mColumns = 1;
mTopBox = 0;
mLocation = loc;
mTopLayout = 0;
mPaintWidget = 0;
@@ -390,60 +402,60 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
if ( KOPrefs::instance()->mVerticalScreen ) {
expandPix = SmallIcon( "1updownarrow" );
} else {
expandPix = SmallIcon("1leftrightarrow" );
}
- QBoxLayout *topLayout = new QVBoxLayout(this);
+ Q3BoxLayout *topLayout = new Q3VBoxLayout(this);
// Create day name labels for agenda columns
// Create agenda splitter
mSplitterAgenda = new KDGanttMinimizeSplitter( Qt::Vertical, this);
mSplitterAgenda->setMinimizeDirection ( KDGanttMinimizeSplitter::Up );
topLayout->addWidget( mSplitterAgenda );
- mAllDayFrame = new QHBox(mSplitterAgenda);
- mAllDayFrame->setFocusPolicy(NoFocus);
+ mAllDayFrame = new Q3HBox(mSplitterAgenda);
+ mAllDayFrame->setFocusPolicy(Qt::NoFocus);
QWidget *agendaFrame = new QWidget(mSplitterAgenda);
- agendaFrame->setFocusPolicy(NoFocus);
+ agendaFrame->setFocusPolicy(Qt::NoFocus);
// Create all-day agenda widget
- mDummyAllDayLeft = new QVBox( mAllDayFrame );
+ mDummyAllDayLeft = new Q3VBox( mAllDayFrame );
mExpandButton = new QPushButton(mDummyAllDayLeft);
mExpandButton->setPixmap( expandPix );
int widebut = mExpandButton->sizeHint().width()+4;
int heibut = mExpandButton->sizeHint().height()+4;
if ( heibut > widebut )
widebut = heibut ;
//mExpandButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed,
// QSizePolicy::Fixed ) );
mExpandButton->setFixedSize( widebut, widebut);
connect( mExpandButton, SIGNAL( clicked() ), SIGNAL( toggleExpand() ) );
- mExpandButton->setFocusPolicy(NoFocus);
+ mExpandButton->setFocusPolicy(Qt::NoFocus);
mAllDayAgenda = new KOAgenda(1,mAllDayFrame);
- mAllDayAgenda->setFocusPolicy(NoFocus);
+ mAllDayAgenda->setFocusPolicy(Qt::NoFocus);
QLabel *dummyAllDayRight = new QLabel (mAllDayFrame);
// Create event context menu for all day agenda
//mAllDayAgendaPopup = eventPopup();
// Create agenda frame
- QGridLayout *agendaLayout = new QGridLayout(agendaFrame,4,3);
+ Q3GridLayout *agendaLayout = new Q3GridLayout(agendaFrame,4,3);
// QHBox *agendaFrame = new QHBox(splitterAgenda);
// create event indicator bars
mEventIndicatorTop = new EventIndicator(EventIndicator::Top,agendaFrame);
#ifndef DESKTOP_VERSION
mEventIndicatorTop->setPaintWidget( mSplitterAgenda );
#endif
- mDayLabelsFrame = new QHBox(agendaFrame);
+ mDayLabelsFrame = new Q3HBox(agendaFrame);
//topLayout->addWidget(mDayLabelsFrame);
- mDayLabels = new QFrame (mDayLabelsFrame);
- mLayoutDayLabels = new QHBoxLayout(mDayLabels);
+ mDayLabels = new Q3Frame (mDayLabelsFrame);
+ mLayoutDayLabels = new Q3HBoxLayout(mDayLabels);
agendaLayout->addMultiCellWidget(mDayLabelsFrame ,0,0,0,2);
agendaLayout->addWidget(mEventIndicatorTop,1,1);
mEventIndicatorBottom = new EventIndicator(EventIndicator::Bottom,
agendaFrame);
agendaLayout->addWidget(mEventIndicatorBottom,3,1);
@@ -457,18 +469,18 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
this,SLOT(updateConfig()));
// Create agenda
mAgenda = new KOAgenda(1,96,KOPrefs::instance()->mHourSize,agendaFrame);
agendaLayout->addMultiCellWidget(mAgenda,2,2,1,2);
agendaLayout->setColStretch(1,1);
- mAgenda->setFocusPolicy(NoFocus);
+ mAgenda->setFocusPolicy(Qt::NoFocus);
// Create event context menu for agenda
mAllAgendaPopup = eventPopup();
#if 0
- mAllAgendaPopup->addAdditionalItem(QIconSet(SmallIcon("bell")),
+ mAllAgendaPopup->addAdditionalItem(QIcon(SmallIcon("bell")),
i18n("Toggle Alarm"),mAgenda,
SLOT(popupAlarm()),true);
#endif
connect(mAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)),
mAllAgendaPopup,SLOT(showIncidencePopup(Incidence *)));
@@ -915,15 +927,15 @@ int KOAgendaView::maxDatesHint()
int KOAgendaView::currentDateCount()
{
return mSelectedDates.count();
}
-QPtrList<Incidence> KOAgendaView::selectedIncidences()
+Q3PtrList<Incidence> KOAgendaView::selectedIncidences()
{
- QPtrList<Incidence> selected;
+ Q3PtrList<Incidence> selected;
Incidence *incidence;
incidence = mAgenda->selectedIncidence();
if (incidence) selected.append(incidence);
incidence = mAllDayAgenda->selectedIncidence();
@@ -984,14 +996,14 @@ void KOAgendaView::updateConfig()
// for some reason, this needs to be called explicitly
mTimeLabels->repaint();
mDummyAllDayLeft->setFixedWidth(mTimeLabels->width());
// ToolTips displaying summary of events
- KOAgendaItem::toolTipGroup()->setEnabled(KOPrefs::instance()
- ->mEnableToolTips);
+ /* TODO:hacker: KOAgendaItem::toolTipGroup()->setEnabled(KOPrefs::instance()
+ ->mEnableToolTips); */
//setHolidayMasks();
//createDayLabels(); called by via updateView();
mEventIndicatorTop->setXOffset(mTimeLabels->width() + mAgenda->frameWidth());
updateView();
@@ -1114,13 +1126,13 @@ void KOAgendaView::showDates( const QDate &start, const QDate &end )
// and update the view
fillAgenda();
}
-void KOAgendaView::showEvents(QPtrList<Event>)
+void KOAgendaView::showEvents(Q3PtrList<Event>)
{
kdDebug() << "KOAgendaView::showEvents() is not yet implemented" << endl;
}
void KOAgendaView::changeEventDisplay(Event *, int)
{
@@ -1162,17 +1174,17 @@ void KOAgendaView::fillAgenda()
mEventIndicatorBottom->changeColumns(mSelectedDates.count());
setHolidayMasks();
mMinY.resize(mSelectedDates.count());
mMaxY.resize(mSelectedDates.count());
- QPtrList<Event> dayEvents;
+ Q3PtrList<Event> dayEvents;
// ToDo items shall be displayed for the day they are due, but only showed today if they are already overdue.
// Therefore, gtodoset all of them.
- QPtrList<Todo> todos = calendar()->todos();
+ Q3PtrList<Todo> todos = calendar()->todos();
mAgenda->setDateList(mSelectedDates);
QDate today = QDate::currentDate();
DateList::ConstIterator dit;
@@ -1297,13 +1309,13 @@ void KOAgendaView::fillAgenda()
if ( ! todo->hasDueDate() && !todo->hasCompletedDate()) continue; // todo shall not be displayed if it has no date
if ( todo->hasCompletedDate() && !KOPrefs::instance()->mShowCompletedTodoInAgenda ) continue;
// ToDo items shall be displayed for the day they are due, but only showed today if they are already overdue.
// Already completed items can be displayed on their original due date
//if not KOPrefs::instance()->mShowTodoInAgenda, show overdue in agenda
- bool overdue = (!todo->isCompleted()) && (todo->dtDue() < today) && KOPrefs::instance()->mShowTodoInAgenda;
+ bool overdue = (!todo->isCompleted()) && (todo->dtDue() < (QDateTime)today) && KOPrefs::instance()->mShowTodoInAgenda;
bool fillIn = false;
if ( todo->hasCompletedDate() && todo->completed().date() == currentDate )
fillIn = true;
if ( ! fillIn && !todo->hasCompletedDate() )
fillIn = ((todo->dtDue().date() == currentDate) && !overdue) || ((currentDate == today) && overdue);
if ( fillIn ) {
@@ -1500,13 +1512,13 @@ void KOAgendaView::readSettings(KConfig *config)
{
// kdDebug() << "KOAgendaView::readSettings()" << endl;
config->setGroup("Views");
//#ifndef KORG_NOSPLITTER
- QValueList<int> sizes = config->readIntListEntry("Separator AgendaView");
+ Q3ValueList<int> sizes = config->readIntListEntry("Separator AgendaView");
if (sizes.count() == 2) {
if ( sizes[0] < 20 ) {
sizes[1] = sizes[1] +20 - sizes[0];
sizes[0] = 20;
}
mSplitterAgenda->setSizes(sizes);
@@ -1521,13 +1533,13 @@ void KOAgendaView::writeSettings(KConfig *config)
{
// kdDebug() << "KOAgendaView::writeSettings()" << endl;
config->setGroup("Views");
//#ifndef KORG_NOSPLITTER
- QValueList<int> list = mSplitterAgenda->sizes();
+ Q3ValueList<int> list = mSplitterAgenda->sizes();
config->writeEntry("Separator AgendaView",list);
//qDebug("write %d %d ", list[0],list[1] );
//#endif
}
void KOAgendaView::setHolidayMasks()
@@ -1538,13 +1550,13 @@ void KOAgendaView::setHolidayMasks()
for(i=0;i<mSelectedDates.count();++i) {
QDate date = mSelectedDates[i];
bool showSaturday = KOPrefs::instance()->mExcludeSaturdays && (date.dayOfWeek() == 6);
bool showSunday = KOPrefs::instance()->mExcludeHolidays && (date.dayOfWeek() == 7);
bool showHoliday = false;
if ( KOPrefs::instance()->mExcludeHolidays ) {
- QPtrList<Event> events = calendar()->events( date, true );
+ Q3PtrList<Event> events = calendar()->events( date, true );
Event *event;
for( event = events.first(); event; event = events.next() ) {
if ( event->isHoliday()) {
showHoliday = true;
break;
}
@@ -1660,13 +1672,13 @@ void KOAgendaView::updateTodo( Todo * t, int )
da = t->dtDue().date();
if ( ! t->hasDueDate() && !t->hasCompletedDate() ) {
remove = true;
removeAD = true;
}
else {
- bool overdue = (!t->isCompleted()) && (t->dtDue() < QDate::currentDate()) && KOPrefs::instance()->mShowTodoInAgenda ;
+ bool overdue = (!t->isCompleted()) && (t->dtDue() < (QDateTime)QDate::currentDate()) && KOPrefs::instance()->mShowTodoInAgenda ;
if ( overdue &&
QDate::currentDate() >= mSelectedDates.first() &&
QDate::currentDate() <= mSelectedDates.last()) {
removeAD = false;
remove = true;
}
diff --git a/korganizer/koagendaview.h b/korganizer/koagendaview.h
index 5e68146..3b871d9 100644
--- a/korganizer/koagendaview.h
+++ b/korganizer/koagendaview.h
@@ -20,27 +20,37 @@
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#ifndef KOAGENDAVIEW_H
#define KOAGENDAVIEW_H
-#include <qscrollview.h>
+#include <q3scrollview.h>
#include <qdatetime.h>
#include <qpushbutton.h>
#include <qlayout.h>
+#include <Q3BoxLayout>
#ifndef DESKTOP_VERSION
#include <qksplitter.h>
#else
#include <qsplitter.h>
#endif
-#include <qmemarray.h>
+#include <q3memarray.h>
+//Added by qt3to4:
+#include <QPaintEvent>
+#include <QResizeEvent>
+#include <Q3Frame>
+#include <QPixmap>
+#include <QLabel>
+#include <QMouseEvent>
+#include <Q3PtrList>
+#include <QKeyEvent>
#include "koeventview.h"
-class QHBox;
-class QFrame;
+class Q3HBox;
+class Q3Frame;
class QLabel;
class QPushButton;
class CalendarView;
class KOAgenda;
class KOAgendaItem;
class KConfig;
@@ -52,13 +62,13 @@ class KOAgendaButton : public QPushButton
public:
KOAgendaButton( QWidget *parent=0, const char *name=0 ) :
QPushButton( parent, name )
{
mNum = -3;
setFlat( true );
- setFocusPolicy(NoFocus);
+ setFocusPolicy(Qt::NoFocus);
setSizePolicy(QSizePolicy( QSizePolicy::Expanding ,QSizePolicy::Expanding ));
connect( this, SIGNAL( clicked() ), this, SLOT ( bClicked() ) );
};
QSize sizeHint () const { return QSize( 5,5) ;}
void setNum( int n) { mNum = n; }
@@ -67,16 +77,16 @@ private slots:
signals:
void numClicked( int );
private:
int mNum;
};
-class TimeLabels : public QScrollView {
+class TimeLabels : public Q3ScrollView {
Q_OBJECT
public:
- TimeLabels(int rows,QWidget *parent=0,const char *name=0,WFlags f=0);
+ TimeLabels(int rows,QWidget *parent=0,const char *name=0,Qt::WFlags f=0);
void setCellHeight(int height);
/** Calculates the minimum width */
virtual int minimumWidth() const;
@@ -110,13 +120,13 @@ class TimeLabels : public QScrollView {
int mCellHeight;
/** */
KOAgenda* mAgenda;
};
-class EventIndicator : public QFrame {
+class EventIndicator : public Q3Frame {
Q_OBJECT
public:
enum Location { Top, Bottom };
EventIndicator(Location loc=Top,QWidget *parent=0,const char *name=0);
virtual ~EventIndicator();
@@ -129,17 +139,17 @@ class EventIndicator : public QFrame {
void drawContents(QPainter *);
private:
int mXOffset;
KDGanttMinimizeSplitter* mPaintWidget;
int mColumns;
- QHBox *mTopBox;
- QBoxLayout *mTopLayout;
+ Q3HBox *mTopBox;
+ Q3BoxLayout *mTopLayout;
Location mLocation;
QPixmap mPixmap;
- QMemArray<bool> mEnabled;
+ Q3MemArray<bool> mEnabled;
};
/**
KOAgendaView is the agenda-like view used to display events in an one or
multi-day view.
*/
@@ -156,13 +166,13 @@ class KOAgendaView : public KOEventView {
virtual int maxDatesHint();
/** Returns number of currently shown dates. */
virtual int currentDateCount();
/** returns the currently selected events */
- virtual QPtrList<Incidence> selectedIncidences();
+ virtual Q3PtrList<Incidence> selectedIncidences();
/** returns the currently selected events */
virtual DateList selectedDates();
/** Remove all events from view */
void clearView();
@@ -182,13 +192,13 @@ class KOAgendaView : public KOEventView {
void repaintAgenda();
public slots:
void setInitStartHour();
virtual void updateView();
virtual void updateConfig();
virtual void showDates(const QDate &start, const QDate &end);
- virtual void showEvents(QPtrList<Event> eventList);
+ virtual void showEvents(Q3PtrList<Event> eventList);
void updateTodo( Todo *, int );
void changeEventDisplay(Event *, int);
void clearSelection();
@@ -257,16 +267,16 @@ class KOAgendaView : public KOEventView {
private:
bool flag_blockfillAgenda;
QTimer* mIdleTimer;
QDateTime mIdleStart;
// view widgets
- QFrame *mDayLabels;
- QHBox *mDayLabelsFrame;
- QBoxLayout *mLayoutDayLabels;
- QFrame *mAllDayFrame;
+ Q3Frame *mDayLabels;
+ Q3HBox *mDayLabelsFrame;
+ Q3BoxLayout *mLayoutDayLabels;
+ Q3Frame *mAllDayFrame;
KOAgenda *mAllDayAgenda;
KOAgenda *mAgenda;
TimeLabels *mTimeLabels;
QWidget *mDummyAllDayLeft;
KDGanttMinimizeSplitter* mSplitterAgenda;
@@ -281,18 +291,18 @@ class KOAgendaView : public KOEventView {
KOEventPopupMenu *mAllAgendaPopup;
//KOEventPopupMenu *mAllDayAgendaPopup;
EventIndicator *mEventIndicatorTop;
EventIndicator *mEventIndicatorBottom;
- QMemArray<int> mMinY;
- QMemArray<int> mMaxY;
+ Q3MemArray<int> mMinY;
+ Q3MemArray<int> mMaxY;
- QMemArray<bool> mHolidayMask;
+ Q3MemArray<bool> mHolidayMask;
- QPtrList<KOAgendaButton> mDayLabelsList;
+ Q3PtrList<KOAgendaButton> mDayLabelsList;
QDateTime mTimeSpanBegin;
QDateTime mTimeSpanEnd;
bool mTimeSpanInAllDay;
void keyPressEvent ( QKeyEvent * e );
};
diff --git a/korganizer/kocounterdialog.h b/korganizer/kocounterdialog.h
index c8dcf45..493d9e1 100644
--- a/korganizer/kocounterdialog.h
+++ b/korganizer/kocounterdialog.h
@@ -19,13 +19,13 @@
#ifndef KOCOUNTERDIALOG_H
#define KOCOUNTERDIALOG_H
//
// Viewer dialog for counter events.
//
-#include <qtextview.h>
+#include <q3textview.h>
#include <kdialogbase.h>
#include <libkcal/event.h>
using namespace KCal;
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index 52fd1e8..4f681b3 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -21,15 +21,24 @@
with any edition of Qt, and distribute the resulting executable,
without including the source ode for Qt in the source distribution.
*/
#include <qevent.h>
#include <qpainter.h>
-#include <qptrlist.h>
+#include <q3ptrlist.h>
#include <qtimer.h>
-#include <qwhatsthis.h>
+#include <q3whatsthis.h>
+//Added by qt3to4:
+#include <QDragLeaveEvent>
+#include <Q3Frame>
+#include <QDragEnterEvent>
+#include <QDragMoveEvent>
+#include <QDropEvent>
+#include <QResizeEvent>
+#include <QMouseEvent>
+#include <QPaintEvent>
#include <kglobal.h>
#include <kdebug.h>
#include <klocale.h>
#include <libkcal/vcaldrag.h>
@@ -51,21 +60,21 @@
// ============================================================================
// D Y N A M I C T I P
// ============================================================================
DynamicTip::DynamicTip( QWidget * parent )
- : QToolTip( parent )
+ /* TODO:hacker: : QToolTip( parent ) */
{
matrix = (KODayMatrix*)parent;
}
-class KODaymatrixWhatsThis :public QWhatsThis
+class KODaymatrixWhatsThis :public Q3WhatsThis
{
public:
- KODaymatrixWhatsThis( KODayMatrix* view ) : QWhatsThis( view ),_view (view) { ;};
+ KODaymatrixWhatsThis( KODayMatrix* view ) : Q3WhatsThis( view ),_view (view) { ;};
~KODaymatrixWhatsThis() { ; };
protected:
virtual QString text( const QPoint& p )
{
return _view->getWhatsThisText( p ) ;
@@ -88,25 +97,25 @@ void DynamicTip::maybeTip( const QPoint &pos )
// kdDebug() << "DynamicTip::maybeTip matrix cell index [" <<
// col << "][" << row << "] => " <<(col+row*7) << endl;
//show holiday names only
QString str = matrix->getHolidayLabel(col+row*7);
if (str.isEmpty()) return;
- tip(rct, str);
+ /* TODO:hacker: tip(rct, str);*/
}
// ============================================================================
// K O D A Y M A T R I X
// ============================================================================
const int KODayMatrix::NOSELECTION = -1000;
const int KODayMatrix::NUMDAYS = 42;
KODayMatrix::KODayMatrix( QWidget *parent, const char *name )
- : QFrame( parent, name , Qt::WRepaintNoErase ), mCalendar( 0 )
+ : Q3Frame( parent, name , Qt::WNoAutoErase ), mCalendar( 0 )
{
mLastView = -1;
oldW = 0;
oldH = 0;
@@ -148,13 +157,13 @@ QString KODayMatrix::getWhatsThisText( QPoint p )
{
int tmp = getDayIndexFrom(p.x(), p.y());
if ( tmp < 0 || tmp > NUMDAYS-1 || !mCalendar )
return QString();
QDate mDate = days[tmp];
- QPtrList<Event> eventlist = mCalendar->events(mDate);
+ Q3PtrList<Event> eventlist = mCalendar->events(mDate);
Event *event;
QStringList mToolTip;
for(event=eventlist.first();event != 0;event=eventlist.next()) {
QString mToolTipText;
QString text;
int multiday = 0;// 1 = start, 2 = midddle, 3 = end day
@@ -202,13 +211,13 @@ QString KODayMatrix::getWhatsThisText( QPoint p )
mToolTipText += " (" + event->location() + ")";
//qDebug("TTT: %s ", mToolTipText.latin1());
mToolTip.append( deTag( mToolTipText ) );
}
mToolTip.sort();
if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) {
- QPtrList<Todo> todolist = mCalendar->todos(mDate);
+ Q3PtrList<Todo> todolist = mCalendar->todos(mDate);
Todo *todo;
for(todo=todolist.first();todo != 0;todo=todolist.next()) {
QString mToolTipText;
if ( !todo->doesFloat() )
mToolTipText += KGlobal::locale()->formatTime(todo->dtDue().time())+" ";
mToolTipText += todo->summary();
@@ -217,13 +226,13 @@ QString KODayMatrix::getWhatsThisText( QPoint p )
mToolTipText = deTag( mToolTipText);
mToolTipText = "<b>" + i18n("Todo: ") + "</b>"+ mToolTipText;
mToolTip.append( mToolTipText );
}
}
if (KOPrefs::instance()->mCurrentDisplayedView == VIEW_J_VIEW ) {
- QPtrList<Journal> j_list = mCalendar->journals4Date( mDate );
+ Q3PtrList<Journal> j_list = mCalendar->journals4Date( mDate );
Journal *j = j_list.first();
while ( j ) {
QString mToolTipText;
if ( !j->summary().isEmpty() ) {
mToolTipText = j->summary().left(30);
if ( j->summary().length() > 30 )
@@ -438,13 +447,13 @@ void KODayMatrix::updateViewTimed()
}
#if 1
int i;
int timeSpan = NUMDAYS-1;
- QPtrList<Event> events = mCalendar->events();
+ Q3PtrList<Event> events = mCalendar->events();
Event *event;
QDateTime dt;
bool ok;
bDays.fill( false);
pDays.fill( false);
hDays.fill( false);
@@ -523,13 +532,13 @@ void KODayMatrix::updateViewTimed()
pDays.setBit(i);
}
}
if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) {
bDays.fill( false);
// insert due todos
- QPtrList<Todo> todos = mCalendar->todos( );
+ Q3PtrList<Todo> todos = mCalendar->todos( );
Todo *todo;
for(todo = todos.first(); todo; todo = todos.next()) {
//insertTodo( todo );
if ( todo->hasDueDate() ) {
int day = mStartDate.daysTo( todo->dtDue().date() );
if ( day >= 0 && day < timeSpan + 1) {
@@ -548,13 +557,13 @@ void KODayMatrix::updateViewTimed()
}
}
}
if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_J_VIEW ) {
bDays.fill( false);
// insert due todos
- QPtrList<Journal> todos = mCalendar->journals( );
+ Q3PtrList<Journal> todos = mCalendar->journals( );
Journal *todo;
for(todo = todos.first(); todo; todo = todos.next()) {
int day = mStartDate.daysTo( todo->dtStart().date() );
if ( day >= 0 && day < timeSpan + 1) {
int i = day;
QString holiStr = mHolidays[i];
@@ -572,13 +581,13 @@ void KODayMatrix::updateViewTimed()
}
}
#else
//qDebug("KODayMatrix::updateViewTimed ");
for(int i = 0; i < NUMDAYS; i++) {
// if events are set for the day then remember to draw it bold
- QPtrList<Event> eventlist = mCalendar->events(days[i]);
+ Q3PtrList<Event> eventlist = mCalendar->events(days[i]);
Event *event;
int numEvents = eventlist.count();
QString holiStr = "";
bDays.clearBit(i);
hDays.clearBit(i);
eDays.clearBit(i);
@@ -672,13 +681,13 @@ void KODayMatrix::updateView(QDate actdate)
void KODayMatrix::updateEvents()
{
if ( !mCalendar ) return;
for( int i = 0; i < NUMDAYS; i++ ) {
// if events are set for the day then remember to draw it bold
- QPtrList<Event> eventlist = mCalendar->events( days[ i ] );
+ Q3PtrList<Event> eventlist = mCalendar->events( days[ i ] );
int numEvents = eventlist.count();
Event *event;
for( event = eventlist.first(); event != 0;event=eventlist.next()) {
ushort recurType = event->doesRecur();
if ( ( recurType == Recurrence::rDaily &&
@@ -736,26 +745,26 @@ int KODayMatrix::getDayIndexFrom(int x, int y)
// M O U S E E V E N T H A N D L I N G
// ----------------------------------------------------------------------------
void KODayMatrix::mousePressEvent (QMouseEvent* e)
{
- if ( e->button() == LeftButton )
+ if ( e->button() == Qt::LeftButton )
mouseDown = true;
mSelStart = getDayIndexFrom(e->x(), e->y());
if (mSelStart > NUMDAYS-1) mSelStart=NUMDAYS-1;
mSelInit = mSelStart;
mSelEnd = mSelStart;
mRedrawNeeded = true;
repaint(false);
}
void KODayMatrix::mouseReleaseEvent (QMouseEvent* e)
{
mRedrawNeeded = true;
- if ( e->button() == LeftButton )
+ if ( e->button() == Qt::LeftButton )
if ( ! mouseDown ) {
return;
}
else
mouseDown = false;
int tmp = getDayIndexFrom(e->x(), e->y());
@@ -1192,26 +1201,26 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent)
p.setPen(mDefaultTextColor);
p.drawRect(0, 0, width(), height());
} else {
//qDebug("NO redraw ");
}
- bitBlt (this, pevent->rect().topLeft(), &myPix , pevent->rect() ,CopyROP);
+ bitBlt (this, pevent->rect().topLeft(), &myPix , pevent->rect() ,QPainter::CompositionMode_Source);
mRedrawNeeded = false;
}
// ----------------------------------------------------------------------------
// R E SI Z E E V E N T H A N D L I N G
// ----------------------------------------------------------------------------
void KODayMatrix::resizeEvent(QResizeEvent * e)
{
QRect sz = frameRect();
daysize.setHeight(sz.height()*7 / NUMDAYS);
daysize.setWidth(sz.width() / 7);
- QFrame::resizeEvent( e );
+ Q3Frame::resizeEvent( e );
}
QSize KODayMatrix::sizeHint() const
{
QFontMetrics fm ( font() );
diff --git a/korganizer/kodaymatrix.h b/korganizer/kodaymatrix.h
index b96e08f..6edf7cd 100644
--- a/korganizer/kodaymatrix.h
+++ b/korganizer/kodaymatrix.h
@@ -23,20 +23,28 @@
#ifndef _KODAYMAT_H
#define _KODAYMAT_H
#include <libkcal/calendar.h>
#include <qstring.h>
-#include <qframe.h>
+#include <q3frame.h>
#include <qcolor.h>
#include <qpen.h>
#include <qdatetime.h>
#include <qtooltip.h>
#include <qpixmap.h>
#include <qbitarray.h>
#include <qmap.h>
+//Added by qt3to4:
+#include <QDragMoveEvent>
+#include <QDropEvent>
+#include <QDragLeaveEvent>
+#include <QPaintEvent>
+#include <QResizeEvent>
+#include <QMouseEvent>
+#include <QDragEnterEvent>
class QDragEnterEvent;
class QDragMoveEvent;
class QDragLeaveEvent;
class QDropEvent;
@@ -48,13 +56,13 @@ using namespace KCal;
/**
* small helper class to dynamically show tooltips inside the day matrix.
* This class asks the day matrix object for a appropriate label which
* is in our special case the name of the holiday or null if this day is no holiday.
*/
-class DynamicTip : public QToolTip
+class DynamicTip /* TODO:hacker: : public QToolTip */
{
public:
/**
* Constructor that expects a KODayMatrix object as parent.
*
@@ -100,13 +108,13 @@ private:
* adjust the selection and leave some days undisplayed while scrolling through the months
*
* @short day matrix widget of the KDateNavigator
*
* @author Eitzenberger Thomas
*/
-class KODayMatrix: public QFrame {
+class KODayMatrix: public Q3Frame {
Q_OBJECT
public:
/** constructor to create a day matrix widget.
diff --git a/korganizer/kodialogmanager.cpp b/korganizer/kodialogmanager.cpp
index ea30fac..deb1e46 100644
--- a/korganizer/kodialogmanager.cpp
+++ b/korganizer/kodialogmanager.cpp
@@ -38,12 +38,14 @@
#include "archivedialog.h"
#endif
#include "kconfig.h"
#include "kodialogmanager.h"
#include <kapplication.h>
+//Added by qt3to4:
+#include <Q3PtrList>
KODialogManager::KODialogManager( CalendarView *mainView ) :
QObject(), mMainView( mainView )
{
mOutgoingDialog = 0;
mIncomingDialog = 0;
@@ -185,14 +187,14 @@ void KODialogManager::showSearchDialog()
connect(lview, SIGNAL(cloneIncidenceSignal(Incidence *)),
mMainView, SLOT(cloneIncidence(Incidence *)));
connect(lview, SIGNAL(beamIncidenceSignal(Incidence *)),
mMainView, SLOT(beamIncidence(Incidence *)));
connect(lview, SIGNAL(moveIncidenceSignal(Incidence *)),
mMainView, SLOT(moveIncidence(Incidence *)));
- connect(lview, SIGNAL(beamIncidenceList(QPtrList<Incidence> )),
- mMainView, SLOT(beamIncidenceList(QPtrList<Incidence> )));
+ connect(lview, SIGNAL(beamIncidenceList(Q3PtrList<Incidence> )),
+ mMainView, SLOT(beamIncidenceList(Q3PtrList<Incidence> )));
connect(mMainView, SIGNAL(configChanged()), mSearchDialog, SLOT(updateConfig()));
connect(mMainView, SIGNAL(updateSearchDialog()), mSearchDialog, SLOT(updateList()));
// connect( lview, SIGNAL( incidenceSelected( Incidence * ) ),
// mMainView, SLOT( processMainViewSelection( Incidence * ) ) );
#ifndef DESKTOP_VERSION
@@ -243,13 +245,13 @@ void KODialogManager::showArchiveDialog()
// Workaround.
QApplication::restoreOverrideCursor();
#endif
}
-void KODialogManager::showFilterEditDialog(QPtrList<CalFilter> *filters)
+void KODialogManager::showFilterEditDialog(Q3PtrList<CalFilter> *filters)
{
if (!mFilterEditDialog) {
mFilterEditDialog = new FilterEditDialog(filters,mMainView);
connect(mFilterEditDialog,SIGNAL(filterChanged()),
mMainView,SLOT(filterEdited()));
diff --git a/korganizer/kodialogmanager.h b/korganizer/kodialogmanager.h
index b68ddc2..00ad1df 100644
--- a/korganizer/kodialogmanager.h
+++ b/korganizer/kodialogmanager.h
@@ -22,13 +22,13 @@
without including the source code for Qt in the source distribution.
*/
#ifndef KODIALOGMANAGER_H
#define KODIALOGMANAGER_H
#include <qobject.h>
-#include <qptrlist.h>
+#include <q3ptrlist.h>
#include <libkcal/calfilter.h>
class CalendarView;
class OutgoingDialog;
class IncomingDialog;
@@ -75,13 +75,13 @@ class KODialogManager : public QObject
void showSyncOptions();
void showIncomingDialog();
void showOutgoingDialog();
// void showCategoryEditDialog();
void showSearchDialog();
void showArchiveDialog();
- void showFilterEditDialog(QPtrList<CalFilter> *filters);
+ void showFilterEditDialog(Q3PtrList<CalFilter> *filters);
void showPluginDialog();
void hideSearchDialog();
private:
void createOutgoingDialog();
void createIncomingDialog();
diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp
index 9a4b4ec..a01c838 100644
--- a/korganizer/koeditordetails.cpp
+++ b/korganizer/koeditordetails.cpp
@@ -19,20 +19,26 @@
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 <qfiledialog.h>
+#include <q3filedialog.h>
#include <qlayout.h>
-#include <qvbox.h>
-#include <qbuttongroup.h>
-#include <qvgroupbox.h>
-#include <qwidgetstack.h>
+#include <q3vbox.h>
+#include <q3buttongroup.h>
+#include <q3vgroupbox.h>
+#include <q3widgetstack.h>
#include <qdatetime.h>
-#include <qapp.h>
+#include <qapplication.h>
+#include <QDesktopWidget>
+//Added by qt3to4:
+#include <Q3GridLayout>
+#include <QLabel>
+#include <Q3PtrList>
+#include <Q3VBoxLayout>
#include <klocale.h>
#include <kglobal.h>
#include <kdialog.h>
#include <kiconloader.h>
#include <kstandarddirs.h>
@@ -77,13 +83,13 @@ void CustomListViewItem<Attendee *>::updateItem()
}
KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name)
: QWidget( parent, name), mDisableItemUpdate( false )
{
- QGridLayout *topLayout = new QGridLayout(this);
+ Q3GridLayout *topLayout = new Q3GridLayout(this);
topLayout->setSpacing(spacing);
topLayout->setMargin(KDialog::marginHint()-2);
QString organizer = KOPrefs::instance()->email();
mOrganizerLabel = new QLabel(i18n("Organizer: %1").arg(organizer),this);
@@ -98,17 +104,17 @@ KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name)
if ( QApplication::desktop()->height() <= 240 )
hei = 60;
mListView->setFixedHeight(hei);
}
mListView->setAllColumnsShowFocus (true );
//mListView->setSingleClick( true );
- connect(mListView,SIGNAL(selectionChanged(QListViewItem *)),
+ connect(mListView,SIGNAL(selectionChanged(Q3ListViewItem *)),
SLOT(updateAttendeeInput()));
- connect(mListView,SIGNAL(executed(QListViewItem * ,const QPoint&, int )),
- SLOT(itemClicked(QListViewItem * ,const QPoint& , int )));
+ connect(mListView,SIGNAL(executed(Q3ListViewItem * ,const QPoint&, int )),
+ SLOT(itemClicked(Q3ListViewItem * ,const QPoint& , int )));
mRsvpButton = new QCheckBox(this);
mRsvpButton->setText(i18n("Request response"));
mAddressBookButton = new QPushButton(i18n("Address &Book..."),this);
QLabel *attendeeLabel = new QLabel(this);
attendeeLabel->setText(i18n("Name:"));
@@ -137,13 +143,13 @@ KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name)
mStatusCombo->insertStringList(Attendee::statusList());
connect(mStatusCombo,SIGNAL(activated(int)),SLOT(updateAttendeeItem()));
connect(mRsvpButton,SIGNAL(clicked()),SLOT(updateAttendeeItem()));
QWidget *buttonBox = new QWidget(this);
- QVBoxLayout *buttonLayout = new QVBoxLayout(buttonBox);
+ Q3VBoxLayout *buttonLayout = new Q3VBoxLayout(buttonBox);
QPushButton *newButton = new QPushButton(i18n("&New"),buttonBox);
buttonLayout->addWidget(newButton);
connect(newButton,SIGNAL(clicked()),SLOT(addNewAttendee()));
mRemoveButton = new QPushButton(i18n("&Remove"),buttonBox);
@@ -362,25 +368,25 @@ void KOEditorDetails::setDefaults()
void KOEditorDetails::readEvent(Incidence *event)
{
setDefaults();
//mListView->clear();
//mdelAttendees.clear();
- QPtrList<Attendee> tmpAList = event->attendees();
+ Q3PtrList<Attendee> tmpAList = event->attendees();
Attendee *a;
for (a = tmpAList.first(); a; a = tmpAList.next())
insertAttendee(new Attendee(*a));
mListView->setSelected( mListView->firstChild(), true );
mOrganizerLabel->setText(i18n("Organizer: %1").arg(event->organizer()));
}
void KOEditorDetails::writeEvent(Incidence *event)
{
event->clearAttendees();
- QListViewItem *item;
+ Q3ListViewItem *item;
AttendeeListItem *a;
for (item = mListView->firstChild(); item;
item = item->nextSibling()) {
a = (AttendeeListItem *)item;
event->addAttendee(new Attendee(*(a->data())));
}
@@ -401,13 +407,13 @@ bool KOEditorDetails::validateInput()
{
return true;
}
void KOEditorDetails::updateAttendeeInput()
{
- QListViewItem *item = mListView->selectedItem();
+ Q3ListViewItem *item = mListView->selectedItem();
AttendeeListItem *aItem = static_cast<AttendeeListItem *>( item );
if (aItem) {
fillAttendeeInput( aItem );
} else {
clearAttendeeInput();
}
@@ -448,24 +454,24 @@ void KOEditorDetails::setEnabledAttendeeInput( bool enabled )
mStatusCombo->setEnabled( enabled );
mRsvpButton->setEnabled( enabled );
mRemoveButton->setEnabled( enabled );
}
-void KOEditorDetails::itemClicked(QListViewItem * item ,const QPoint & pnt, int c )
+void KOEditorDetails::itemClicked(Q3ListViewItem * item ,const QPoint & pnt, int c )
{
if ( item && c == 4 ) {
mRsvpButton->setChecked( !mRsvpButton->isChecked() );
updateAttendeeItem();
}
}
void KOEditorDetails::updateAttendeeItem()
{
if (mDisableItemUpdate) return;
- QListViewItem *item = mListView->selectedItem();
+ Q3ListViewItem *item = mListView->selectedItem();
AttendeeListItem *aItem = static_cast<AttendeeListItem *>( item );
if ( !aItem ) return;
Attendee *a = aItem->data();
a->setName( mNameEdit->text() );
diff --git a/korganizer/koeditordetails.h b/korganizer/koeditordetails.h
index 5f8f6f2..40e896c 100644
--- a/korganizer/koeditordetails.h
+++ b/korganizer/koeditordetails.h
@@ -21,23 +21,23 @@
without including the source code for Qt in the source distribution.
*/
#ifndef _KOEDITORDETAILS_H
#define _KOEDITORDETAILS_H
#include <qmap.h>
-#include <qframe.h>
+#include <q3frame.h>
#include <qlabel.h>
#include <qcheckbox.h>
#include <qpushbutton.h>
-#include <qgroupbox.h>
+#include <q3groupbox.h>
#include <qlineedit.h>
#include <qcombobox.h>
-#include <qmultilineedit.h>
+#include <q3multilineedit.h>
#include <klistview.h>
#include <qradiobutton.h>
-#include <qptrlist.h>
+#include <q3ptrlist.h>
#include <kapplication.h>
#include <libkcal/event.h>
#include "ktimeedit.h"
@@ -80,13 +80,13 @@ class KOEditorDetails : public QWidget
void addNewAttendee();
void removeAttendee();
void openAddressBook();
void updateAttendeeInput();
void clearAttendeeInput();
void fillAttendeeInput(AttendeeListItem *);
- void itemClicked(QListViewItem *,const QPoint & pnt, int c);
+ void itemClicked(Q3ListViewItem *,const QPoint & pnt, int c);
void updateAttendeeItem();
void setEnabledAttendeeInput(bool);
private:
bool mDisableItemUpdate;
@@ -100,10 +100,10 @@ class KOEditorDetails : public QWidget
QLabel *mOrganizerLabel;
QPushButton* mAddButton;
QPushButton* mRemoveButton;
QPushButton* mAddressBookButton;
- QPtrList<Attendee> mdelAttendees;
+ Q3PtrList<Attendee> mdelAttendees;
};
#endif
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp
index 21f220c..8105432 100644
--- a/korganizer/koeditorgeneral.cpp
+++ b/korganizer/koeditorgeneral.cpp
@@ -21,21 +21,28 @@
without including the source code for Qt in the source distribution.
*/
#include <qwidget.h>
#include <qtooltip.h>
#include <qlayout.h>
-#include <qvbox.h>
-#include <qbuttongroup.h>
-#include <qvgroupbox.h>
-#include <qwidgetstack.h>
+#include <q3vbox.h>
+#include <q3buttongroup.h>
+#include <q3vgroupbox.h>
+#include <q3widgetstack.h>
#include <qdatetime.h>
#include <qtimer.h>
#include <qfile.h>
#include <qregexp.h>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
+#include <QLabel>
+#include <Q3GridLayout>
+#include <Q3PtrList>
+#include <Q3PopupMenu>
+#include <QDesktopWidget>
#include <kglobal.h>
#include <kdialog.h>
#include <kdebug.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -66,15 +73,15 @@ KOEditorGeneral::KOEditorGeneral(QObject* parent, const char* name) :
}
KOEditorGeneral::~KOEditorGeneral()
{
}
-void KOEditorGeneral::initHeader(QWidget *parent,QBoxLayout *topLayout)
+void KOEditorGeneral::initHeader(QWidget *parent,Q3BoxLayout *topLayout)
{
- QGridLayout *headerLayout = new QGridLayout(topLayout);
+ Q3GridLayout *headerLayout = new Q3GridLayout(topLayout);
#if 0
mOwnerLabel = new QLabel(i18n("Owner:"),parent);
headerLayout->addMultiCellWidget(mOwnerLabel,0,0,0,1);
#endif
// 1 on pda
@@ -192,16 +199,16 @@ void KOEditorGeneral::selectedCatPopup( int index )
categories.prepend( colcat );
}
}
setCategories( categories.join(",") );
}
-void KOEditorGeneral::initCategories(QWidget *parent, QBoxLayout *topLayout)
+void KOEditorGeneral::initCategories(QWidget *parent, Q3BoxLayout *topLayout)
{
- QBoxLayout *categoriesLayout = new QHBoxLayout( topLayout );
- mCatPopup = new QPopupMenu ( parent );
+ Q3BoxLayout *categoriesLayout = new Q3HBoxLayout( topLayout );
+ mCatPopup = new Q3PopupMenu ( parent );
mCatPopup->setCheckable (true);
connect(mCatPopup,SIGNAL(aboutToShow () ), this ,SLOT(showCatPopup()));
connect(mCatPopup,SIGNAL( activated ( int ) ), this ,SLOT(selectedCatPopup( int )));
mCategoriesButton = new QPushButton(parent);
mCategoriesButton->setText(i18n("Categories..."));
connect(mCategoriesButton,SIGNAL(clicked()),this, SLOT(editCategories() ));
@@ -211,27 +218,27 @@ void KOEditorGeneral::initCategories(QWidget *parent, QBoxLayout *topLayout)
mCategoriesLabel->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Fixed ,FALSE) );
mCategoriesLabel->setPopup( mCatPopup );
//mCategoriesLabel->setFrameStyle(QFrame::Panel|QFrame::Sunken);
categoriesLayout->addWidget(mCategoriesLabel,1);
}
-void KOEditorGeneral::initSecrecy(QWidget *parent, QBoxLayout *topLayout)
+void KOEditorGeneral::initSecrecy(QWidget *parent, Q3BoxLayout *topLayout)
{
- QBoxLayout *secrecyLayout = new QHBoxLayout( topLayout );
+ Q3BoxLayout *secrecyLayout = new Q3HBoxLayout( topLayout );
QLabel *secrecyLabel = new QLabel(i18n("Access:"),parent);
mCancelBox = new QCheckBox ( i18n("Cancelled"), parent);
secrecyLayout->addWidget(mCancelBox);
secrecyLayout->addWidget(secrecyLabel);
mSecrecyCombo = new QComboBox(parent);
mSecrecyCombo->insertStringList(Incidence::secrecyList());
secrecyLayout->addWidget(mSecrecyCombo);
}
-void KOEditorGeneral::initDescription(QWidget *parent,QBoxLayout *topLayout)
+void KOEditorGeneral::initDescription(QWidget *parent,Q3BoxLayout *topLayout)
{
mDescriptionEdit = new KTextEdit(parent);
mDescriptionEdit->setFont(KOPrefs::instance()->mEditBoxFont );
mDescriptionEdit->append("");
mDescriptionEdit->setReadOnly(false);
mDescriptionEdit->setOverwriteMode(false);
@@ -240,15 +247,15 @@ void KOEditorGeneral::initDescription(QWidget *parent,QBoxLayout *topLayout)
#ifndef DESKTOP_VERSION
QPEApplication::setStylusOperation( mDescriptionEdit, QPEApplication::RightOnHold );
#endif
}
-void KOEditorGeneral::initAlarm(QWidget *parent,QBoxLayout *topLayout)
+void KOEditorGeneral::initAlarm(QWidget *parent,Q3BoxLayout *topLayout)
{
- QBoxLayout *alarmLayout = new QHBoxLayout(topLayout);
+ Q3BoxLayout *alarmLayout = new Q3HBoxLayout(topLayout);
//mAlarmBell = new QLabel(parent);
//mAlarmBell->setPixmap(SmallIcon("bell"));
//alarmLayout->addWidget(mAlarmBell);
if ( QApplication::desktop()->width() < 320 )
mAlarmButton = new QCheckBox(i18n("Rem."),parent);
@@ -525,13 +532,13 @@ void KOEditorGeneral::readIncidence(Incidence *event)
mSecrecyCombo->setCurrentItem(event->secrecy());
mCancelBox->setChecked( event->cancelled() );
mAlarmProgramButton->setOn(false);
mAlarmSoundButton->setOn(false);
// set up alarm stuff
- QPtrList<Alarm> alarms = event->alarms();
+ Q3PtrList<Alarm> alarms = event->alarms();
Alarm* alarm;
mAlarmIncrCombo->setCurrentItem(0);
for ( alarm = alarms.first(); alarm; alarm = alarms.next() ) {
int offset;
if ( alarm->hasTime() ) {
QDateTime t = alarm->time();
@@ -587,13 +594,13 @@ void KOEditorGeneral::writeIncidence(Incidence *event)
event->setSecrecy(mSecrecyCombo->currentItem());
event->setCancelled(mCancelBox->isChecked() );;
// alarm stuff
if (mAlarmButton->isChecked()) {
if (event->alarms().count() == 0)
event->newAlarm();
- QPtrList<Alarm> alarms = event->alarms();
+ Q3PtrList<Alarm> alarms = event->alarms();
Alarm *alarm;
for (alarm = alarms.first(); alarm; alarm = alarms.next() ) {
alarm->setEnabled(true);
int j = mAlarmTimeEdit->value()* -60;
if (mAlarmIncrCombo->currentItem() == 1)
j = j * 60;
diff --git a/korganizer/koeditorgeneral.h b/korganizer/koeditorgeneral.h
index b10a5d4..45f26fd 100644
--- a/korganizer/koeditorgeneral.h
+++ b/korganizer/koeditorgeneral.h
@@ -20,25 +20,26 @@
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#ifndef KOEDITORGENERAL_H
#define KOEDITORGENERAL_H
-#include <qframe.h>
+#include <q3frame.h>
#include <qlabel.h>
#include <qcheckbox.h>
#include <qpushbutton.h>
-#include <qpopupmenu.h>
-#include <qgroupbox.h>
+#include <q3popupmenu.h>
+#include <q3groupbox.h>
#include <qlineedit.h>
#include <qcombobox.h>
-#include <qlistview.h>
+#include <q3listview.h>
#include <qradiobutton.h>
#include <qlayout.h>
#include <qspinbox.h>
#include <qcombobox.h>
+#include <Q3BoxLayout>
#include <ktextedit.h>
#include <krestrictedline.h>
#include <libkcal/incidence.h>
@@ -52,17 +53,17 @@ class KOEditorGeneral : public QObject
{
Q_OBJECT
public:
KOEditorGeneral (QObject* parent=0,const char* name=0);
virtual ~KOEditorGeneral();
void setFocusOn( int i );
- void initHeader(QWidget *,QBoxLayout *);
- void initDescription(QWidget *,QBoxLayout *);
- void initSecrecy(QWidget *,QBoxLayout *);
- void initCategories(QWidget *,QBoxLayout *);
- void initAlarm(QWidget *,QBoxLayout *);
+ void initHeader(QWidget *,Q3BoxLayout *);
+ void initDescription(QWidget *,Q3BoxLayout *);
+ void initSecrecy(QWidget *,Q3BoxLayout *);
+ void initCategories(QWidget *,Q3BoxLayout *);
+ void initAlarm(QWidget *,Q3BoxLayout *);
/** Set widgets to default values */
void setDefaults(bool allDay);
/** Read event object and setup widgets accordingly */
void readIncidence(Incidence *);
/** Write event settings to event object */
@@ -112,13 +113,13 @@ class KOEditorGeneral : public QObject
QComboBox *mSecrecyCombo;
QCheckBox *mCancelBox;
QPushButton *mCategoriesButton;
QPushButton *mCategoriesLabel;
private:
- QPopupMenu * mCatPopup;
+ Q3PopupMenu * mCatPopup;
QString getFittingPath( const QString &) ;
QString mAlarmSound;
QString mAlarmProgram;
QString mAlarmMessage;
};
diff --git a/korganizer/koeditorgeneralevent.cpp b/korganizer/koeditorgeneralevent.cpp
index 2c6ed9f..73a4139 100644
--- a/korganizer/koeditorgeneralevent.cpp
+++ b/korganizer/koeditorgeneralevent.cpp
@@ -20,17 +20,23 @@
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 <qlayout.h>
-#include <qvbox.h>
-#include <qbuttongroup.h>
-#include <qvgroupbox.h>
-#include <qwidgetstack.h>
+#include <q3vbox.h>
+#include <q3buttongroup.h>
+#include <q3vgroupbox.h>
+#include <q3widgetstack.h>
#include <qdatetime.h>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
+#include <Q3GridLayout>
+#include <Q3Frame>
+#include <QLabel>
+#include <Q3VBoxLayout>
#include <kdebug.h>
#include <kglobal.h>
#include <kdialog.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -81,25 +87,25 @@ void KOEditorGeneralEvent::finishSetup()
mSummaryEdit->load(KOLocationBox::SUMMARYEVENT);
mSummaryEdit->setFocus();
}
-void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout)
+void KOEditorGeneralEvent::initTime(QWidget *parent,Q3BoxLayout *topLayout)
{
- QBoxLayout *timeLayout = new QVBoxLayout(topLayout);
+ Q3BoxLayout *timeLayout = new Q3VBoxLayout(topLayout);
- QGroupBox *timeGroupBox = new QGroupBox(1,QGroupBox::Horizontal,
+ Q3GroupBox *timeGroupBox = new Q3GroupBox(1,Qt::Horizontal,
i18n("Date && Time"),parent);
timeLayout->addWidget(timeGroupBox);
timeGroupBox->layout()->setSpacing( KDialog::spacingHintSmall() );
timeGroupBox->layout()->setMargin( KDialog::marginHint() );
- QFrame *timeBoxFrame = new QFrame(timeGroupBox);
+ Q3Frame *timeBoxFrame = new Q3Frame(timeGroupBox);
- QGridLayout *layoutTimeBox = new QGridLayout(timeBoxFrame,2,3);
+ Q3GridLayout *layoutTimeBox = new Q3GridLayout(timeBoxFrame,2,3);
layoutTimeBox->setSpacing(topLayout->spacing());
mStartDateLabel = new QLabel(i18n("Start:"),timeBoxFrame);
layoutTimeBox->addWidget(mStartDateLabel,0,0);
mStartDateEdit = new KDateEdit(timeBoxFrame);
@@ -115,24 +121,24 @@ void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout)
mEndDateEdit = new KDateEdit(timeBoxFrame);
layoutTimeBox->addWidget(mEndDateEdit,1,1);
mEndTimeEdit = new KOTimeEdit(timeBoxFrame);
layoutTimeBox->addWidget(mEndTimeEdit,1,2);
QWidget* duration = new QWidget( timeBoxFrame );
- QHBoxLayout *flagsBox = new QHBoxLayout( duration );
+ Q3HBoxLayout *flagsBox = new Q3HBoxLayout( duration );
mNoTimeButton = new QCheckBox(i18n("All day event"),duration);
flagsBox->addWidget(mNoTimeButton);
connect(mNoTimeButton, SIGNAL(toggled(bool)),SLOT(dontAssociateTime(bool)));
mDurationLabel = new QLabel( duration );
// if ( KOPrefs::instance()->mCompactDialogs ) {
//layoutTimeBox->addMultiCellWidget( mDurationLabel, 3, 3, 0, 3 );
//} else {
flagsBox->addWidget( mDurationLabel );
//}
flagsBox->setStretchFactor(mDurationLabel, 10 );
- mDurationLabel->setAlignment( AlignRight | AlignVCenter);
+ mDurationLabel->setAlignment( Qt::AlignRight | Qt::AlignVCenter);
layoutTimeBox->addMultiCellWidget( duration, 2, 2, 0, 3 );
// time widgets are checked if they contain a valid time
connect(mStartTimeEdit, SIGNAL(timeChanged(QTime)),
this, SLOT(startTimeChanged(QTime)));
connect(mEndTimeEdit, SIGNAL(timeChanged(QTime)),
@@ -144,15 +150,15 @@ void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout)
connect(mEndDateEdit, SIGNAL(dateChanged(QDate)),
this, SLOT(endDateChanged(QDate)));
connect(mStartDateEdit,SIGNAL(setTimeTo(QTime)),this,SLOT(sTimeChanged(QTime)));
connect(mEndDateEdit,SIGNAL(setTimeTo(QTime)),this,SLOT(eTimeChanged(QTime)));
}
-void KOEditorGeneralEvent::initClass(QWidget *parent,QBoxLayout *topLayout)
+void KOEditorGeneralEvent::initClass(QWidget *parent,Q3BoxLayout *topLayout)
{
- QBoxLayout *classLayout = new QHBoxLayout(topLayout);
+ Q3BoxLayout *classLayout = new Q3HBoxLayout(topLayout);
QLabel *freeTimeLabel = new QLabel(i18n("Show time as:"),parent);
classLayout->addWidget(freeTimeLabel);
mFreeTimeCombo = new QComboBox(false, parent);
mFreeTimeCombo->insertItem(i18n("Busy"));
diff --git a/korganizer/koeditorgeneralevent.h b/korganizer/koeditorgeneralevent.h
index d798905..5d97a5c 100644
--- a/korganizer/koeditorgeneralevent.h
+++ b/korganizer/koeditorgeneralevent.h
@@ -20,21 +20,21 @@
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#ifndef _KOEDITORGENERALEVENT_H
#define _KOEDITORGENERALEVENT_H
-#include <qframe.h>
+#include <q3frame.h>
#include <qlabel.h>
#include <qcheckbox.h>
#include <qpushbutton.h>
-#include <qgroupbox.h>
+#include <q3groupbox.h>
#include <qlineedit.h>
#include <qcombobox.h>
-#include <qmultilineedit.h>
-#include <qlistview.h>
+#include <q3multilineedit.h>
+#include <q3listview.h>
#include <qradiobutton.h>
#include <krestrictedline.h>
#include "koeditorgeneral.h"
@@ -48,14 +48,14 @@ class KOEditorGeneralEvent : public KOEditorGeneral
{
Q_OBJECT
public:
KOEditorGeneralEvent (QObject* parent=0,const char* name=0);
virtual ~KOEditorGeneralEvent();
- void initTime(QWidget *,QBoxLayout *);
- void initClass(QWidget *,QBoxLayout *);
+ void initTime(QWidget *,Q3BoxLayout *);
+ void initClass(QWidget *,Q3BoxLayout *);
void finishSetup();
/** Set widgets to default values */
void setDefaults(QDateTime from,QDateTime to,bool allDay);
/**
diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp
index d32d5a5..baee9fc 100644
--- a/korganizer/koeditorgeneraltodo.cpp
+++ b/korganizer/koeditorgeneraltodo.cpp
@@ -19,20 +19,27 @@
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 <qfiledialog.h>
+#include <q3filedialog.h>
#include <qlayout.h>
-#include <qvbox.h>
-#include <qbuttongroup.h>
-#include <qvgroupbox.h>
-#include <qwidgetstack.h>
+#include <q3vbox.h>
+#include <q3buttongroup.h>
+#include <q3vgroupbox.h>
+#include <q3widgetstack.h>
#include <qdatetime.h>
#include <qapplication.h>
+#include <QDesktopWidget>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
+#include <Q3GridLayout>
+#include <Q3Frame>
+#include <QLabel>
+#include <Q3VBoxLayout>
#include <kglobal.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kmessagebox.h>
#include <kdebug.h>
@@ -79,24 +86,24 @@ void KOEditorGeneralTodo::finishSetup()
// QWidget::setTabOrder(mCategoriesButton, mSecrecyCombo);
// QWidget::setTabOrder(mSecrecyCombo, mDescriptionEdit);
mSummaryEdit->load(KOLocationBox::SUMMARYTODO);
mSummaryEdit->setFocus();
}
-void KOEditorGeneralTodo::initTime(QWidget *parent,QBoxLayout *topLayout)
+void KOEditorGeneralTodo::initTime(QWidget *parent,Q3BoxLayout *topLayout)
{
- QBoxLayout *timeLayout = new QVBoxLayout(topLayout);
+ Q3BoxLayout *timeLayout = new Q3VBoxLayout(topLayout);
- QGroupBox *timeGroupBox = new QGroupBox(1,QGroupBox::Horizontal,
+ Q3GroupBox *timeGroupBox = new Q3GroupBox(1,Qt::Horizontal,
i18n("Date && Time"),parent);
timeLayout->addWidget(timeGroupBox);
timeGroupBox->layout()->setSpacing( KDialog::spacingHint()-2 );
timeGroupBox->layout()->setMargin( KDialog::marginHint() );
- QFrame *timeBoxFrame = new QFrame(timeGroupBox);
+ Q3Frame *timeBoxFrame = new Q3Frame(timeGroupBox);
- QGridLayout *layoutTimeBox = new QGridLayout(timeBoxFrame,3,3);
+ Q3GridLayout *layoutTimeBox = new Q3GridLayout(timeBoxFrame,3,3);
layoutTimeBox->setSpacing(KDialog::spacingHintSmall());
layoutTimeBox->setColStretch( 1, 1 );
mStartCheck = new QCheckBox(i18n("Start:"),timeBoxFrame);
layoutTimeBox->addWidget(mStartCheck,0,0);
connect(mStartCheck,SIGNAL(toggled(bool)),SLOT(enableStartEdit(bool)));
@@ -130,13 +137,13 @@ void KOEditorGeneralTodo::initTime(QWidget *parent,QBoxLayout *topLayout)
this, SLOT(startDateChanged(QDate)));
// some more layouting
//layoutTimeBox->setColStretch(3,1);
}
-void KOEditorGeneralTodo::initCompletion(QWidget *parent, QBoxLayout *topLayout)
+void KOEditorGeneralTodo::initCompletion(QWidget *parent, Q3BoxLayout *topLayout)
{
mCompletedCombo = new QComboBox(parent);
// xgettext:no-c-format
mCompletedCombo->insertItem(i18n(" 0 %"));
// xgettext:no-c-format
mCompletedCombo->insertItem(i18n(" 20 %"));
@@ -170,31 +177,31 @@ void KOEditorGeneralTodo::initCompletion(QWidget *parent, QBoxLayout *topLayout)
else
mCompleteDateEdit->setMaximumWidth( 140 );
topLayout->setSpacing( 0 );
}
}
-void KOEditorGeneralTodo::initPriority(QWidget *parent, QBoxLayout *topLayout)
+void KOEditorGeneralTodo::initPriority(QWidget *parent, Q3BoxLayout *topLayout)
{
- QHBox* h = new QHBox ( parent );
+ Q3HBox* h = new Q3HBox ( parent );
topLayout->addWidget( h );
QLabel *priorityLabel = new QLabel(i18n("Priority:"), h);
// topLayout->addWidget(priorityLabel);
mPriorityCombo = new QComboBox( h );
mPriorityCombo->insertItem(i18n("1 (high)"));
mPriorityCombo->insertItem(i18n("2"));
mPriorityCombo->insertItem(i18n("3"));
mPriorityCombo->insertItem(i18n("4"));
mPriorityCombo->insertItem(i18n("5 (low)"));
//topLayout->addWidget(mPriorityCombo);
}
-void KOEditorGeneralTodo::initStatus(QWidget *parent,QBoxLayout *topLayout)
+void KOEditorGeneralTodo::initStatus(QWidget *parent,Q3BoxLayout *topLayout)
{
- QBoxLayout *statusLayout = new QHBoxLayout(topLayout);
+ Q3BoxLayout *statusLayout = new Q3HBoxLayout(topLayout);
initCompletion( parent, statusLayout );
statusLayout->addStretch( 1 );
initPriority( parent, statusLayout );
@@ -393,13 +400,13 @@ void KOEditorGeneralTodo::enableStartEdit( bool enable )
}
emit datesChecked();
}
void KOEditorGeneralTodo::startDateChanged(QDate newdate)
{
if ( mDueCheck->isChecked() )
- emit dateTimesChanged(newdate,mDueDateEdit->date());
+ emit dateTimesChanged((QDateTime)newdate,(QDateTime)mDueDateEdit->date());
}
void KOEditorGeneralTodo::enableTimeEdits(bool enable)
{
if(mStartCheck->isChecked()) {
mStartTimeEdit->setEnabled( enable );
}
diff --git a/korganizer/koeditorgeneraltodo.h b/korganizer/koeditorgeneraltodo.h
index 2e56a7a..2e97ff5 100644
--- a/korganizer/koeditorgeneraltodo.h
+++ b/korganizer/koeditorgeneraltodo.h
@@ -20,21 +20,21 @@
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#ifndef _KOEDITORGENERALTODO_H
#define _KOEDITORGENERALTODO_H
-#include <qframe.h>
+#include <q3frame.h>
#include <qlabel.h>
#include <qcheckbox.h>
#include <qpushbutton.h>
-#include <qgroupbox.h>
+#include <q3groupbox.h>
#include <qlineedit.h>
#include <qcombobox.h>
-#include <qmultilineedit.h>
-#include <qlistview.h>
+#include <q3multilineedit.h>
+#include <q3listview.h>
#include <qradiobutton.h>
#include "koeditorgeneral.h"
#include "koglobals.h"
class KRestrictedLine;
@@ -47,16 +47,16 @@ class KOEditorGeneralTodo : public KOEditorGeneral
{
Q_OBJECT
public:
KOEditorGeneralTodo (QObject* parent=0,const char* name=0);
virtual ~KOEditorGeneralTodo();
- void initTime(QWidget *, QBoxLayout *);
- void initStatus(QWidget *, QBoxLayout *);
- void initCompletion(QWidget *, QBoxLayout *);
- void initPriority(QWidget *, QBoxLayout *);
+ void initTime(QWidget *, Q3BoxLayout *);
+ void initStatus(QWidget *, Q3BoxLayout *);
+ void initCompletion(QWidget *, Q3BoxLayout *);
+ void initPriority(QWidget *, Q3BoxLayout *);
void finishSetup();
/** Set widgets to default values */
void setDefaults(QDateTime due,bool allDay);
/** Read todo object and setup widgets accordingly */
diff --git a/korganizer/koeditorrecurrence.cpp b/korganizer/koeditorrecurrence.cpp
index e0380c4..e0ae3a0 100644
--- a/korganizer/koeditorrecurrence.cpp
+++ b/korganizer/koeditorrecurrence.cpp
@@ -19,23 +19,31 @@
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 <qfiledialog.h>
+#include <q3filedialog.h>
#include <qlayout.h>
-#include <qvbox.h>
-#include <qbuttongroup.h>
-#include <qvgroupbox.h>
-#include <qwidgetstack.h>
+#include <q3vbox.h>
+#include <q3buttongroup.h>
+#include <q3vgroupbox.h>
+#include <q3widgetstack.h>
#include <qdatetime.h>
-#include <qlistbox.h>
+#include <q3listbox.h>
#include <qspinbox.h>
#include <qcheckbox.h>
#include <qapplication.h>
+#include <QDesktopWidget>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
+#include <QLabel>
+#include <Q3GridLayout>
+#include <Q3PtrList>
+#include <Q3Frame>
+#include <Q3VBoxLayout>
#include <kdialog.h>
#include <kglobal.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kdebug.h>
@@ -78,13 +86,13 @@ int RecurBase::frequency()
/////////////////////////// RecurDaily ///////////////////////////////
RecurDaily::RecurDaily( QWidget *parent, const char *name ) :
RecurBase( parent, name )
{
- QBoxLayout *topLayout = new QHBoxLayout( this );
+ Q3BoxLayout *topLayout = new Q3HBoxLayout( this );
topLayout->setSpacing( KDialog::spacingHint() );
topLayout->setMargin( KDialog::marginHintSmall() );
QLabel *preLabel = new QLabel( i18n("Recur every"), this );
topLayout->addWidget( preLabel );
@@ -97,30 +105,30 @@ RecurDaily::RecurDaily( QWidget *parent, const char *name ) :
/////////////////////////// RecurWeekly ///////////////////////////////
RecurWeekly::RecurWeekly( QWidget *parent, const char *name ) :
RecurBase( parent, name )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
topLayout->setSpacing( KDialog::spacingHint() );
topLayout->setMargin( KDialog::marginHintSmall() );
//topLayout->addStretch( 1 );
- QBoxLayout *weeksLayout = new QHBoxLayout( topLayout );
+ Q3BoxLayout *weeksLayout = new Q3HBoxLayout( topLayout );
QLabel *preLabel = new QLabel( i18n("Recur every"), this );
weeksLayout->addWidget( preLabel );
weeksLayout->addWidget( frequencyEdit() );
QLabel *postLabel = new QLabel( i18n("week(s) on:"), this );
weeksLayout->addWidget( postLabel );
- QHBox *dayBox = new QHBox( this );
- topLayout->addWidget( dayBox, 1, AlignVCenter );
+ Q3HBox *dayBox = new Q3HBox( this );
+ topLayout->addWidget( dayBox, 1, Qt::AlignVCenter );
// TODO: Respect start of week setting
for ( int i = 0; i < 7; ++i ) {
QString weekDayName = KGlobal::locale()->weekDayName( i + 1, true );
int left = 1;
if ( QApplication::desktop()->width() > 480 ) {
++left;
@@ -153,46 +161,46 @@ QBitArray RecurWeekly::days()
/////////////////////////// RecurMonthly ///////////////////////////////
RecurMonthly::RecurMonthly( QWidget *parent, const char *name ) :
RecurBase( parent, name )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
topLayout->setSpacing( KDialog::spacingHint() );
topLayout->setMargin( KDialog::marginHintSmall() );
- QBoxLayout *freqLayout = new QHBoxLayout( topLayout );
+ Q3BoxLayout *freqLayout = new Q3HBoxLayout( topLayout );
QLabel *preLabel = new QLabel( i18n("every"), this );
freqLayout->addWidget( preLabel );
freqLayout->addWidget( frequencyEdit() );
QLabel *postLabel = new QLabel( i18n("month(s)"), this );
freqLayout->addWidget( postLabel );
- QButtonGroup *buttonGroup = new QButtonGroup( this );
- buttonGroup->setFrameStyle( QFrame::NoFrame );
- topLayout->addWidget( buttonGroup, 1, AlignVCenter );
+ Q3ButtonGroup *buttonGroup = new Q3ButtonGroup( this );
+ buttonGroup->setFrameStyle( Q3Frame::NoFrame );
+ topLayout->addWidget( buttonGroup, 1, Qt::AlignVCenter );
- QGridLayout *buttonLayout = new QGridLayout( buttonGroup, 3, 2 );
+ Q3GridLayout *buttonLayout = new Q3GridLayout( buttonGroup, 3, 2 );
buttonLayout->setSpacing( KDialog::spacingHint() );
buttonLayout->setMargin( KDialog::marginHintSmall() );
QString recurOnText;
if ( QApplication::desktop()->width() > 320 ) {
recurOnText = i18n("Recur on the");
}
mByDayRadio = new QRadioButton( recurOnText, buttonGroup );
buttonLayout->addWidget( mByDayRadio, 0, 0 );
- mByDayCombo = new QComboBox( buttonGroup );
+ mByDayCombo = new Q3ComboBox( buttonGroup );
mByDayCombo->setSizeLimit( 7 );
mByDayCombo->insertItem( i18n("1st") );
mByDayCombo->insertItem( i18n("2nd") );
mByDayCombo->insertItem( i18n("3rd") );
mByDayCombo->insertItem( i18n("4th") );
mByDayCombo->insertItem( i18n("5th") );
@@ -290,40 +298,40 @@ int RecurMonthly::weekday()
/////////////////////////// RecurYearly ///////////////////////////////
RecurYearly::RecurYearly( QWidget *parent, const char *name ) :
RecurBase( parent, name )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
topLayout->setSpacing( KDialog::spacingHint() );
topLayout->setMargin( KDialog::marginHintSmall() );
- QBoxLayout *freqLayout = new QHBoxLayout( topLayout );
+ Q3BoxLayout *freqLayout = new Q3HBoxLayout( topLayout );
QLabel *preLabel = new QLabel( i18n("every"), this );
freqLayout->addWidget( preLabel );
freqLayout->addWidget( frequencyEdit() );
QLabel *postLabel = new QLabel( i18n("year(s)"), this );
freqLayout->addWidget( postLabel );
- QButtonGroup *buttonGroup = new QButtonGroup( this );
- buttonGroup->setFrameStyle( QFrame::NoFrame );
- topLayout->addWidget( buttonGroup, 1, AlignVCenter );
+ Q3ButtonGroup *buttonGroup = new Q3ButtonGroup( this );
+ buttonGroup->setFrameStyle( Q3Frame::NoFrame );
+ topLayout->addWidget( buttonGroup, 1, Qt::AlignVCenter );
- QGridLayout *buttonLayout = new QGridLayout( buttonGroup, 2, 3 );
+ Q3GridLayout *buttonLayout = new Q3GridLayout( buttonGroup, 2, 3 );
mByMonthRadio = new QRadioButton( i18n("On day "), buttonGroup);
buttonLayout->addWidget( mByMonthRadio, 0, 0 , Qt::AlignRight);
mByDayLabel = new QLabel( i18n("%1 of ").arg(1), buttonGroup );
buttonLayout->addWidget( mByDayLabel, 0, 1 );
- mByMonthCombo = new QComboBox( buttonGroup );
+ mByMonthCombo = new Q3ComboBox( buttonGroup );
mByMonthCombo->insertItem( i18n("January") );
mByMonthCombo->insertItem( i18n("February") );
mByMonthCombo->insertItem( i18n("March") );
mByMonthCombo->insertItem( i18n("April") );
mByMonthCombo->insertItem( i18n("May") );
mByMonthCombo->insertItem( i18n("June") );
@@ -380,33 +388,33 @@ int RecurYearly::day()
//////////////////////////// ExceptionsWidget //////////////////////////
ExceptionsWidget::ExceptionsWidget( QWidget *parent, const char *name ) :
QWidget( parent, name )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
- QGroupBox *groupBox = new QGroupBox( 1, Horizontal, i18n("Exceptions"),
+ Q3GroupBox *groupBox = new Q3GroupBox( 1, Qt::Horizontal, i18n("Exceptions"),
this );
topLayout->addWidget( groupBox );
QWidget *box = new QWidget( groupBox );
- QGridLayout *boxLayout = new QGridLayout( box );
+ Q3GridLayout *boxLayout = new Q3GridLayout( box );
mExceptionDateEdit = new KDateEdit( box );
boxLayout->addWidget( mExceptionDateEdit, 0, 0 );
QPushButton *addExceptionButton = new QPushButton( i18n("Add"), box );
boxLayout->addWidget( addExceptionButton, 1, 0 );
QPushButton *changeExceptionButton = new QPushButton( i18n("Change"), box );
boxLayout->addWidget( changeExceptionButton, 2, 0 );
QPushButton *deleteExceptionButton = new QPushButton( i18n("Delete"), box );
boxLayout->addWidget( deleteExceptionButton, 3, 0 );
- mExceptionList = new QListBox( box );
+ mExceptionList = new Q3ListBox( box );
boxLayout->addMultiCellWidget( mExceptionList, 0, 3, 1, 1 );
boxLayout->setRowStretch( 4, 1 );
boxLayout->setColStretch( 1, 3 );
connect( addExceptionButton, SIGNAL( clicked() ),
@@ -503,46 +511,46 @@ DateList ExceptionsDialog::dates()
///////////////////////// RecurrenceRangeWidget ///////////////////////////
RecurrenceRangeWidget::RecurrenceRangeWidget( QWidget *parent,
const char *name )
: QWidget( parent, name )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
- mRangeGroupBox = new QGroupBox( 1, Horizontal, i18n("Recurrence Range"),
+ mRangeGroupBox = new Q3GroupBox( 1, Qt::Horizontal, i18n("Recurrence Range"),
this );
topLayout->addWidget( mRangeGroupBox );
QWidget *rangeBox = new QWidget( mRangeGroupBox );
- QVBoxLayout *rangeLayout = new QVBoxLayout( rangeBox );
+ Q3VBoxLayout *rangeLayout = new Q3VBoxLayout( rangeBox );
rangeLayout->setSpacing( KDialog::spacingHint() );
rangeLayout->setMargin( KDialog::marginHintSmall() );
mStartDateLabel = new QLabel( i18n("Begin on:"), rangeBox );
rangeLayout->addWidget( mStartDateLabel );
- mRangeButtonGroup = new QButtonGroup;
+ mRangeButtonGroup = new Q3ButtonGroup;
mNoEndDateButton = new QRadioButton( i18n("No ending date"), rangeBox );
mRangeButtonGroup->insert( mNoEndDateButton );
rangeLayout->addWidget( mNoEndDateButton );
- QBoxLayout *durationLayout = new QHBoxLayout( rangeLayout );
+ Q3BoxLayout *durationLayout = new Q3HBoxLayout( rangeLayout );
durationLayout->setSpacing( KDialog::spacingHint() );
mEndDurationButton = new QRadioButton( i18n("End after"), rangeBox );
mRangeButtonGroup->insert( mEndDurationButton );
durationLayout->addWidget( mEndDurationButton );
mEndDurationEdit = new QSpinBox( 1, 9999, 1, rangeBox );
durationLayout->addWidget( mEndDurationEdit );
QLabel *endDurationLabel = new QLabel( i18n("occurrence(s)"), rangeBox );
durationLayout ->addWidget( endDurationLabel );
- QBoxLayout *endDateLayout = new QHBoxLayout( rangeLayout );
+ Q3BoxLayout *endDateLayout = new Q3HBoxLayout( rangeLayout );
endDateLayout->setSpacing( KDialog::spacingHint() );
mEndDateButton = new QRadioButton( i18n("End by:"), rangeBox );
mRangeButtonGroup->insert( mEndDateButton );
endDateLayout->addWidget( mEndDateButton );
@@ -663,13 +671,13 @@ void RecurrenceRangeDialog::setDateTimes( const QDateTime &start,
//////////////////////////// RecurrenceChooser ////////////////////////
RecurrenceChooser::RecurrenceChooser( QWidget *parent, const char *name ) :
QWidget( parent, name )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
mTypeCombo = new QComboBox( this );
mTypeCombo->insertItem( i18n("Daily") );
mTypeCombo->insertItem( i18n("Weekly") );
mTypeCombo->insertItem( i18n("Monthly") );
mTypeCombo->insertItem( i18n("Yearly") );
@@ -722,23 +730,23 @@ void RecurrenceChooser::emitChoice()
/////////////////////////////// Main Widget /////////////////////////////
KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) :
QWidget( parent, name )
{
- QGridLayout *topLayout = new QGridLayout( this, 2,2 );
+ Q3GridLayout *topLayout = new Q3GridLayout( this, 2,2 );
topLayout->setSpacing( KDialog::spacingHint() );
topLayout->setMargin( KDialog::marginHintSmall() );
mEnabledCheck = new QCheckBox( i18n("Enable Recurrence"), this );
connect( mEnabledCheck, SIGNAL( toggled( bool ) ),
SLOT( setEnabled( bool ) ) );
topLayout->addMultiCellWidget( mEnabledCheck, 0, 0, 0, 1 );
- mTimeGroupBox = new QGroupBox( 1, Horizontal, i18n("Time"),
+ mTimeGroupBox = new Q3GroupBox( 1, Qt::Horizontal, i18n("Time"),
this );
topLayout->addMultiCellWidget( mTimeGroupBox, 1, 1 , 0 , 1 );
if ( QApplication::desktop()->width() <= 640 ) {
mTimeGroupBox->hide();
}
@@ -749,20 +757,20 @@ KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) :
mDateTimeLabel = new QLabel( mTimeGroupBox );
// mDateTimeLabel = new QLabel( timeFrame );
// layoutTimeFrame->addWidget( mDateTimeLabel );
//mTimeGroupBox->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Maximum ) );
//mDateTimeLabel->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Maximum) );
- mRuleBox = new QGroupBox( 1, Horizontal, i18n("Recurrence Rule"), this );
+ mRuleBox = new Q3GroupBox( 1, Qt::Horizontal, i18n("Recurrence Rule"), this );
topLayout->addMultiCellWidget( mRuleBox, 2, 2, 0, 1 );
mRecurrenceChooser = new RecurrenceChooser( mRuleBox );
connect( mRecurrenceChooser, SIGNAL( chosen( int ) ),
SLOT( showCurrentRule( int ) ) );
- mRuleStack = new QWidgetStack( mRuleBox );
+ mRuleStack = new Q3WidgetStack( mRuleBox );
mDaily = new RecurDaily( mRuleStack );
mRuleStack->addWidget( mDaily, 0 );
mWeekly = new RecurWeekly( mRuleStack );
mRuleStack->addWidget( mWeekly, 0 );
@@ -893,14 +901,14 @@ void KOEditorRecurrence::readEvent(Incidence *event)
dtEnd = ((Event*)event)->dtEnd();
else
dtEnd = ((Todo*)event)->dtDue();
setDefaults( event->dtStart(), dtEnd );
QBitArray rDays( 7 );
- QPtrList<Recurrence::rMonthPos> rmp;
- QPtrList<int> rmd;
+ Q3PtrList<Recurrence::rMonthPos> rmp;
+ Q3PtrList<int> rmd;
int day = 0;
int count = 0;
int month = 0;
setDateTimes( event->dtStart(), dtEnd );
@@ -965,13 +973,13 @@ void KOEditorRecurrence::readEvent(Incidence *event)
month = *rmd.first();
else
month = event->dtStart().date().month() ;
mYearly->setByMonth( month, day );
#if 0
//qDebug("2day = %d ",day );
- QPtrList<Recurrence::rMonthPos> monthlist = r->yearMonthPositions();
+ Q3PtrList<Recurrence::rMonthPos> monthlist = r->yearMonthPositions();
int month;
if ( !monthlist.isEmpty() ) {
month = monthlist.first()->rPos ;
} else {
month = event->dtStart().date().month() ;
}
diff --git a/korganizer/koeditorrecurrence.h b/korganizer/koeditorrecurrence.h
index 75e0c73..6c012bd 100644
--- a/korganizer/koeditorrecurrence.h
+++ b/korganizer/koeditorrecurrence.h
@@ -20,31 +20,33 @@
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#ifndef _KOEDITORRECURRENCE_H
#define _KOEDITORRECURRENCE_H
-#include <qframe.h>
+#include <q3frame.h>
#include <qlabel.h>
#include <qcheckbox.h>
#include <qpushbutton.h>
-#include <qgroupbox.h>
+#include <q3groupbox.h>
#include <qlineedit.h>
#include <qcombobox.h>
-#include <qmultilineedit.h>
-#include <qlistview.h>
+#include <q3multilineedit.h>
+#include <q3listview.h>
#include <qradiobutton.h>
-#include <qbuttongroup.h>
+#include <q3buttongroup.h>
+#include <Q3ListBox>
+#include <Q3ComboBox>
#include <kdialogbase.h>
#include <libkcal/event.h>
#include "ktimeedit.h"
-class QWidgetStack;
+class Q3WidgetStack;
class QSpinBox;
class KDateEdit;
using namespace KCal;
@@ -95,13 +97,13 @@ class RecurMonthly : public RecurBase
int count();
int weekday();
private:
QRadioButton *mByDayRadio;
- QComboBox *mByDayCombo;
+ Q3ComboBox *mByDayCombo;
QRadioButton *mByPosRadio;
QComboBox *mByPosCountCombo;
QComboBox *mByPosWeekdayCombo;
};
@@ -119,13 +121,13 @@ class RecurYearly : public RecurBase
int month();
int day();
private:
int mDay;
QRadioButton *mByMonthRadio;
- QComboBox *mByMonthCombo;
+ Q3ComboBox *mByMonthCombo;
QLabel* mByDayLabel;
QLabel* mDayOfLabel;
QRadioButton *mByDayRadio;
};
class RecurrenceChooser : public QWidget
@@ -177,13 +179,13 @@ class ExceptionsWidget : public QWidget, public ExceptionsBase
void addException();
void changeException();
void deleteException();
private:
KDateEdit *mExceptionDateEdit;
- QListBox *mExceptionList;
+ Q3ListBox *mExceptionList;
DateList mExceptionDates;
};
class ExceptionsDialog : public KDialogBase, public ExceptionsBase
{
public:
@@ -232,14 +234,14 @@ class RecurrenceRangeWidget : public QWidget, public RecurrenceRangeBase
const QDateTime &end = QDateTime() );
protected slots:
void showCurrentRange();
private:
- QButtonGroup *mRangeButtonGroup;
- QGroupBox *mRangeGroupBox;
+ Q3ButtonGroup *mRangeButtonGroup;
+ Q3GroupBox *mRangeGroupBox;
QLabel *mStartDateLabel;
QRadioButton *mNoEndDateButton;
QRadioButton *mEndDurationButton;
QSpinBox *mEndDurationEdit;
QRadioButton *mEndDateButton;
KDateEdit *mEndDateEdit;
@@ -297,17 +299,17 @@ class KOEditorRecurrence : public QWidget
void showExceptionsDialog();
void showRecurrenceRangeDialog();
private:
QCheckBox *mEnabledCheck;
- QGroupBox *mTimeGroupBox;
+ Q3GroupBox *mTimeGroupBox;
QLabel *mDateTimeLabel;
- QGroupBox *mRuleBox;
- QWidgetStack *mRuleStack;
+ Q3GroupBox *mRuleBox;
+ Q3WidgetStack *mRuleStack;
RecurrenceChooser *mRecurrenceChooser;
RecurDaily *mDaily;
RecurWeekly *mWeekly;
RecurMonthly *mMonthly;
RecurYearly *mYearly;
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;
diff --git a/korganizer/koeventpopupmenu.cpp b/korganizer/koeventpopupmenu.cpp
index fc4d9a4..81047c1 100644
--- a/korganizer/koeventpopupmenu.cpp
+++ b/korganizer/koeventpopupmenu.cpp
@@ -19,23 +19,26 @@
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 <qcursor.h>
+//Added by qt3to4:
+#include <Q3ValueList>
+#include <Q3PopupMenu>
#include <klocale.h>
#include <kdebug.h>
#include <kiconloader.h>
#include <libkcal/event.h>
#include "koeventpopupmenu.h"
#include "koprefs.h"
-KOEventPopupMenu::KOEventPopupMenu(): QPopupMenu()
+KOEventPopupMenu::KOEventPopupMenu(): Q3PopupMenu()
{
mCurrentIncidence = 0;
mHasAdditionalItems = false;
mSingleOnlyItems.append( insertItem (i18n("&Show"),this,SLOT(popupShow())));
@@ -50,34 +53,34 @@ KOEventPopupMenu::KOEventPopupMenu(): QPopupMenu()
mEditOnlyItems.append(insertItem (i18n("&Beam..."),
this,SLOT(popupBeam())));
#endif
mEditOnlyItems.append(insertItem (i18n("&Toggle Cancel"),
this,SLOT(popupCancel())));
isDisabled = false;
- mCatPopup = new QPopupMenu ( this );
+ mCatPopup = new Q3PopupMenu ( this );
mCatPopup->setCheckable (true);
connect(mCatPopup,SIGNAL( aboutToShow ()), this ,SLOT( fillCatPopup()));
connect(mCatPopup,SIGNAL( activated ( int ) ), this ,SLOT( computeCatPopup( int )));
- mCalPopup = new QPopupMenu ( this );
+ mCalPopup = new Q3PopupMenu ( this );
mCalPopup->setCheckable (true);
connect(mCalPopup,SIGNAL( aboutToShow ()), this ,SLOT( fillCalPopup()));
connect(mCalPopup,SIGNAL( activated ( int ) ), this ,SLOT( computeCalPopup( int )));
//mEditOnlyItems.append(insertItem (i18n("Categories"),mCatPopup ));
//mEditOnlyItems.append(insertItem (i18n("Calendar"),mCalPopup ));
insertItem (i18n("Categories"),mCatPopup );
insertItem (i18n("Calendar"),mCalPopup );
- QValueList<int>::Iterator it;
+ Q3ValueList<int>::Iterator it;
for( it = mEditOnlyItems.begin(); it != mEditOnlyItems.end(); ++it ) {
mSingleOnlyItems.append(*it);
}
}
void KOEventPopupMenu::enableDefault( bool enable )
{
isDisabled = !enable;
- QValueList<int>::Iterator it;
+ Q3ValueList<int>::Iterator it;
for( it = mSingleOnlyItems.begin(); it != mSingleOnlyItems.end(); ++it ) {
setItemEnabled(*it,enable);
}
}
void KOEventPopupMenu::fillCalPopup() // CAL
@@ -143,22 +146,22 @@ void KOEventPopupMenu::showIncidencePopup(Incidence *incidence)
if ( !incidence) return;
mCurrentIncidence = incidence;
if (mCurrentIncidence) {
// Enable/Disabled menu items only valid for editable events.
if ( !isDisabled ) {
- QValueList<int>::Iterator it;
+ Q3ValueList<int>::Iterator it;
for( it = mEditOnlyItems.begin(); it != mEditOnlyItems.end(); ++it ) {
setItemEnabled(*it,!mCurrentIncidence->isReadOnly());
}
}
popup(QCursor::pos());
}
}
-void KOEventPopupMenu::addAdditionalItem(const QIconSet &icon,const QString &text,
+void KOEventPopupMenu::addAdditionalItem(const QIcon &icon,const QString &text,
const QObject *receiver, const char *member,
bool editOnly)
{
if (!mHasAdditionalItems) {
mHasAdditionalItems = true;
insertSeparator();
diff --git a/korganizer/koeventpopupmenu.h b/korganizer/koeventpopupmenu.h
index e28745b..de5220b 100644
--- a/korganizer/koeventpopupmenu.h
+++ b/korganizer/koeventpopupmenu.h
@@ -23,24 +23,26 @@
#ifndef KOEVENTPOPUPMENU_H
#define KOEVENTPOPUPMENU_H
//
// Context menu for event views with standard event actions
//
-#include <qpopupmenu.h>
+#include <q3popupmenu.h>
+//Added by qt3to4:
+#include <Q3ValueList>
#include <libkcal/incidence.h>
using namespace KCal;
-class KOEventPopupMenu : public QPopupMenu {
+class KOEventPopupMenu : public Q3PopupMenu {
Q_OBJECT
public:
KOEventPopupMenu();
- void addAdditionalItem(const QIconSet &icon,const QString &text,
+ void addAdditionalItem(const QIcon &icon,const QString &text,
const QObject *receiver, const char *member,
bool editOnly=false);
public slots:
void showIncidencePopup(Incidence *);
@@ -70,14 +72,14 @@ class KOEventPopupMenu : public QPopupMenu {
void categoryChanged( Incidence * );
private:
Incidence *mCurrentIncidence;
bool mHasAdditionalItems;
- QValueList<int> mEditOnlyItems;
- QValueList<int> mSingleOnlyItems;
+ Q3ValueList<int> mEditOnlyItems;
+ Q3ValueList<int> mSingleOnlyItems;
bool isDisabled;
- QPopupMenu *mCatPopup;
- QPopupMenu *mCalPopup;
+ Q3PopupMenu *mCatPopup;
+ Q3PopupMenu *mCalPopup;
};
#endif
diff --git a/korganizer/koeventview.cpp b/korganizer/koeventview.cpp
index 1d26930..a4ba85e 100644
--- a/korganizer/koeventview.cpp
+++ b/korganizer/koeventview.cpp
@@ -18,13 +18,13 @@
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 <qpopupmenu.h>
+#include <q3popupmenu.h>
#include <qcursor.h>
#include <klocale.h>
#include <kdebug.h>
#include <kiconloader.h>
#include <kmessagebox.h>
@@ -70,13 +70,13 @@ KOEventPopupMenu *KOEventView::eventPopup()
return eventPopup;
}
//---------------------------------------------------------------------------
-void KOEventView::showIncidencePopup(QPopupMenu *popup,Incidence *event)
+void KOEventView::showIncidencePopup(Q3PopupMenu *popup,Incidence *event)
{
mCurrentIncidence = event;
if (event) popup->popup(QCursor::pos());
}
//---------------------------------------------------------------------------
diff --git a/korganizer/koeventview.h b/korganizer/koeventview.h
index 77ec111..f28e68b 100644
--- a/korganizer/koeventview.h
+++ b/korganizer/koeventview.h
@@ -27,12 +27,14 @@
#include <libkcal/calendar.h>
#include <libkcal/event.h>
#include <korganizer/baseview.h>
#include "koeventpopupmenu.h"
+//Added by qt3to4:
+#include <Q3PopupMenu>
using namespace KCal;
class CalPrinter;
/**
@@ -84,13 +86,13 @@ class KOEventView : public KOrg::BaseView
/**
* Show context menu for event.
* @param event event, which is to be manipulated by the menu actions
* @param popup a popop menu created with eventPopup()
*/
- void showIncidencePopup(QPopupMenu *popup, Incidence *event);
+ void showIncidencePopup(Q3PopupMenu *popup, Incidence *event);
/**
Perform the default action for an incidence, e.g. open the event editor,
when double-clicking an event in the agenda view.
*/
void defaultAction( Incidence * );
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index c0acf34..4df26a9 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -14,18 +14,23 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include <qcstring.h>
-#include <qwhatsthis.h>
+#include <q3cstring.h>
+#include <q3whatsthis.h>
#include <qdialog.h>
#include <qapplication.h>
+#include <QDesktopWidget>
#include <qlabel.h>
#include <qlayout.h>
+//Added by qt3to4:
+#include <QKeyEvent>
+#include <Q3PtrList>
+#include <Q3VBoxLayout>
#include <klocale.h>
#include <kapplication.h>
#include <libkcal/event.h>
#include <libkcal/todo.h>
#include <kdebug.h>
@@ -52,20 +57,20 @@
#ifdef DESKTOP_VERSION
#include <kabc/addresseedialog.h>
#include <kabc/addresseeview.h>
#include <qprinter.h>
#include <qpainter.h>
-#include <qpaintdevicemetrics.h>
+#include <q3paintdevicemetrics.h>
#else //DESKTOP_VERSION
#include <qtopia/qcopenvelope_qws.h>
#endif //DESKTOP_VERSION
#include <externalapphandler.h>
KOEventViewer::KOEventViewer(QWidget *parent,const char *name)
- : QTextBrowser(parent,name)
+ : Q3TextBrowser(parent,name)
{
mSyncMode = false;
mColorMode = 0;
}
KOEventViewer::~KOEventViewer()
@@ -83,13 +88,13 @@ void KOEventViewer::printMe()
QPrinter printer;
if (!printer.setup() )
return;
QPainter p;
p.begin ( &printer );
- QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer );
+ Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer );
float dx, dy;
int wid = (m.width() * 9)/10;
dx = (float) wid/(float)contentsWidth ();
dy = (float)(m.height()) / (float)contentsHeight ();
float scale;
// scale to fit the width or height of the paper
@@ -131,13 +136,13 @@ void KOEventViewer::setSource(const QString& n)
//qDebug("for *%s* +%s+ ", n.latin1(), uid.latin1());
if (n == uid ) {
//qDebug("found %s ",(*it).mobileHomePhone().latin1() );
QDialog dia( this,"dia123", true );
dia.setCaption( i18n("Details of attendee") );
- QVBoxLayout lay ( &dia );
+ Q3VBoxLayout lay ( &dia );
KABC::AddresseeView av ( &dia );
av.setAddressee( (*it) );
lay.addWidget( &av );
if ( QApplication::desktop()->width() < 480 )
dia.resize( 220, 240);
else {
@@ -152,13 +157,13 @@ void KOEventViewer::setSource(const QString& n)
#else
{
if ( "uid:organizer" == n ) {
ExternalAppHandler::instance()->requestDetailsFromKAPI("", mCurrentIncidence->organizer(),"");
return;
}
- QPtrList<Attendee> attendees = mCurrentIncidence->attendees();
+ Q3PtrList<Attendee> attendees = mCurrentIncidence->attendees();
if (attendees.count()) {
Attendee *a;
for(a=attendees.first();a;a=attendees.next()) {
if ( "uid:"+a->uid() == n ) {
bool res = ExternalAppHandler::instance()->requestDetailsFromKAPI(a->name(), a->email(), a->uid());
return;
@@ -197,20 +202,20 @@ void KOEventViewer::setSource(const QString& n)
return;
} else if (n.startsWith("uid:")) {
DCOPClient *client = KApplication::kApplication()->dcopClient();
const QByteArray noParamData;
const QByteArray paramData;
QByteArray replyData;
- QCString replyTypeStr;
+ Q3CString replyTypeStr;
#define PING_ABBROWSER (client->call("kaddressbook", "KAddressBookIface", "interfaces()", noParamData, replyTypeStr, replyData))
bool foundAbbrowser = PING_ABBROWSER;
if (foundAbbrowser) {
//KAddressbook is already running, so just DCOP to it to bring up the contact editor
//client->send("kaddressbook","KAddressBookIface",
- QDataStream arg(paramData, IO_WriteOnly);
+ QDataStream arg(paramData, QIODevice::WriteOnly);
arg << n.mid(6);
client->send("kaddressbook", "KAddressBookIface", "showContactEditor( QString )", paramData);
return;
} else {
/*
KaddressBook is not already running. Pass it the UID of the contact via the command line while starting it - its neater.
@@ -228,13 +233,13 @@ void KOEventViewer::setSource(const QString& n)
//QTextBrowser::setSource(n);
}
#endif
}
void KOEventViewer::mailToAttendees( bool all )
{
- QPtrList<Attendee> attendees = mCurrentIncidence->attendees();
+ Q3PtrList<Attendee> attendees = mCurrentIncidence->attendees();
if (attendees.count() == 0) return;
QStringList nameList;
QStringList emailList;
QStringList uidList;
Attendee* a;
for(a=attendees.first();a;a=attendees.next()) {
@@ -257,13 +262,13 @@ void KOEventViewer::mailToAttendees( bool all )
ExternalAppHandler::instance()->mailToMultipleContacts( emailList.join(","), mMailSubject );
#endif
}
void KOEventViewer::addTag(const QString & tag,const QString & text)
{
- int number=text.contains("\n");
+ int number=text.count("\n");
QString str = "<" + tag + ">";
QString tmpText=text;
QString tmpStr=str;
if(number !=-1)
{
if (number > 0) {
@@ -584,13 +589,13 @@ void KOEventViewer::appendTodo(Todo *event, int mode )
mText += "<a href=\"todo_uid:" + event->relatedTo()->uid() + "\">";
mText += deTag(event->relatedTo()->summary());
mText += "</a><br>";
// mText.append(deTag("[" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] " +event->relatedTo()->summary()) +"<br>");
}
- QPtrList<Incidence> Relations = event->relations();
+ Q3PtrList<Incidence> Relations = event->relations();
Incidence *to;
if ( Relations.first() )
addTag("b",i18n("Sub todos:<br>"));
for (to=Relations.first();to;to=Relations.next()) {
QString t_name = "[" +QString::number(((Todo*)to)->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%] ";// +to->relatedTo()->summary());
mText += t_name;
@@ -618,13 +623,13 @@ void KOEventViewer::formatCategories(Incidence *event)
addTag("p","<b>"+i18n("Categories")+":</b> " + event->categoriesStrWithSpace() ) ;
}
}
}
void KOEventViewer::formatAttendees(Incidence *event)
{
- QPtrList<Attendee> attendees = event->attendees();
+ Q3PtrList<Attendee> attendees = event->attendees();
if (attendees.count()) {
QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small);
QString NOiconPath = KGlobal::iconLoader()->iconPath("nomailappt",KIcon::Small);
addTag("h3",i18n("Organizer"));
@@ -651,13 +656,13 @@ void KOEventViewer::formatAttendees(Incidence *event)
#else
mText.append(event->organizer());
#endif
- if (iconPath) {
+ if (!iconPath.isEmpty()) {
mText += " <a href=\"mailto:" + event->organizer() + "\">";
mText += "<IMG src=\"" + iconPath + "\">";
mText += "</a>\n";
}
mText.append("</li></ul>");
@@ -701,13 +706,13 @@ void KOEventViewer::formatAttendees(Incidence *event)
else mText += a->email();
mText += "</a>\n";
#endif
if (!a->email().isEmpty()) {
- if (iconPath) {
+ if (!iconPath.isEmpty()) {
mText += "<a href=\"mailto:" + a->realName() +" <" + a->email() + ">:" + mMailSubject + "\">";
if ( a->RSVP() ) {
++a_count_nr;
mText += "<IMG src=\"" + iconPath + "\">";
}
else {
@@ -859,10 +864,10 @@ void KOEventViewer::keyPressEvent ( QKeyEvent * e )
switch ( e->key() ) {
case Qt::Key_Return:
case Qt::Key_Enter :
e->ignore();
break;
default:
- QTextBrowser::keyPressEvent ( e );
+ Q3TextBrowser::keyPressEvent ( e );
break;
}
}
diff --git a/korganizer/koeventviewer.h b/korganizer/koeventviewer.h
index 64eb4ff..3df667f 100644
--- a/korganizer/koeventviewer.h
+++ b/korganizer/koeventviewer.h
@@ -19,13 +19,16 @@
#ifndef KOEVENTVIEWER_H
#define KOEVENTVIEWER_H
//
// Viewer widget for events.
//
-#include <qtextbrowser.h>
+#include <q3textbrowser.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
+#include <QKeyEvent>
#include <libkcal/event.h>
#include <libkcal/journal.h>
using namespace KCal;
@@ -34,29 +37,29 @@ using namespace KCal;
#include <qradiobutton.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qdialog.h>
#include <qlabel.h>
-#include <qbuttongroup.h>
+#include <q3buttongroup.h>
#include <kglobal.h>
class KOPrintPrefs : public QDialog
{
public:
KOPrintPrefs( QWidget *parent=0, const char *name=0 ) :
QDialog( parent, name, true )
{
setCaption( i18n("KO/Pi Printout") );
- QVBoxLayout* lay = new QVBoxLayout( this );
+ Q3VBoxLayout* lay = new Q3VBoxLayout( this );
lay->setSpacing( 9 );
lay->setMargin( 9 );
QLabel * lab = new QLabel( i18n("This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n"), this );
lay->addWidget( lab );
- lab->setAlignment( AlignCenter );
- QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("Printout Mode"), this );
+ lab->setAlignment( Qt::AlignCenter );
+ Q3ButtonGroup* format = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("Printout Mode"), this );
lay->addWidget( format );
format->setExclusive ( true ) ;
pmNo = new QRadioButton(i18n("Print unscaled"), format );
pmScaledDown = new QRadioButton(i18n("Print scaled down to fit one page"), format );
new QRadioButton(i18n("Print scaled up/down to fit one page"), format );
pmScaledDown->setChecked( true );
@@ -80,13 +83,13 @@ private:
QRadioButton* pmNo;
QRadioButton* pmScaledDown;
};
#endif
-class KOEventViewer : public QTextBrowser {
+class KOEventViewer : public Q3TextBrowser {
Q_OBJECT
public:
KOEventViewer(QWidget *parent=0,const char *name=0);
virtual ~KOEventViewer();
void setSource(const QString &);
@@ -114,13 +117,13 @@ class KOEventViewer : public QTextBrowser {
void formatCategories(Incidence *event);
void formatAttendees(Incidence *event);
void formatReadOnly(Incidence *event);
void keyPressEvent ( QKeyEvent * e );
private:
- QTextBrowser *mEventTextView;
+ Q3TextBrowser *mEventTextView;
bool mSyncMode;
QString deTag(QString text);
QString mText;
QString mMailSubject;
Incidence* mCurrentIncidence;
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp
index 2e936f3..3a37852 100644
--- a/korganizer/koeventviewerdialog.cpp
+++ b/korganizer/koeventviewerdialog.cpp
@@ -19,18 +19,21 @@
#include <klocale.h>
#include <libkcal/event.h>
#include <qtimer.h>
#include <qpushbutton.h>
+//Added by qt3to4:
+#include <QHideEvent>
+#include <QKeyEvent>
#include "koeventviewer.h"
#include <kmessagebox.h>
#include "koprefs.h"
#include <libkcal/todo.h>
-#include "qapp.h"
+#include "qapplication.h"
#include "koeventviewerdialog.h"
extern int globalFlagBlockAgenda;
KOEventViewerDialog::KOEventViewerDialog(QWidget *parent,const char *name)
: KDialogBase(parent,name,
diff --git a/korganizer/koeventviewerdialog.h b/korganizer/koeventviewerdialog.h
index 71696f4..947c10b 100644
--- a/korganizer/koeventviewerdialog.h
+++ b/korganizer/koeventviewerdialog.h
@@ -19,13 +19,16 @@
#ifndef KOEVENTVIEWERDIALOG_H
#define KOEVENTVIEWERDIALOG_H
//
// Viewer dialog for events.
//
-#include <qtextview.h>
+#include <q3textview.h>
+//Added by qt3to4:
+#include <QKeyEvent>
+#include <QHideEvent>
#include <kdialogbase.h>
#include <libkcal/event.h>
using namespace KCal;
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp
index ee9c9f6..8335ba9 100644
--- a/korganizer/kofilterview.cpp
+++ b/korganizer/kofilterview.cpp
@@ -24,16 +24,20 @@
#include <qcheckbox.h>
#include <qcombobox.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qlabel.h>
#include <qdialog.h>
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <qtextcodec.h>
-#include <qwhatsthis.h>
+#include <q3whatsthis.h>
#include <qdir.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
+#include <Q3Frame>
+#include <Q3PtrList>
#include <libkcal/calfilter.h>
#include "kofilterview.h"
#include "koprefs.h"
@@ -44,14 +48,14 @@
#include <kmessagebox.h>
-KOFilterView::KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent,
- const char* name,WFlags fl )
+KOFilterView::KOFilterView(Q3PtrList<CalFilter> *filterList,QWidget* parent,
+ const char* name,Qt::WFlags fl )
: KOFilterView_base(parent,name,fl)
{
mFilters = filterList;
connect(mSelectionCombo,SIGNAL(activated(int)),SIGNAL(filterChanged()));
connect(mEnabledCheck,SIGNAL(clicked()),SIGNAL(filterChanged()));
@@ -111,20 +115,20 @@ void KOFilterView::setSelectedFilter( int fil )
}
KOCalEditView::KOCalEditView(QWidget* parent,
const char* name )
- : QScrollView(parent,name)
+ : Q3ScrollView(parent,name)
{
mw = 0;
setResizePolicy( AutoOneFit );
- setFrameStyle ( QFrame::Panel | QFrame::Plain );
+ setFrameStyle ( Q3Frame::Panel | Q3Frame::Plain );
setLineWidth ( 1 );
setMidLineWidth ( 1 );
- setFocusPolicy(NoFocus);
+ setFocusPolicy(Qt::NoFocus);
}
KOCalEditView::~KOCalEditView()
{
// no need to delete child widgets, Qt does it all for us
}
@@ -244,61 +248,61 @@ void KOCalEditView::readConfig()
mROB.clear();
if ( mw ) delete mw;
mw = new QWidget ( viewport() );
addChild(mw);
int ii = 0;
- mainLayout = new QGridLayout ( mw , 2, 8 );
+ mainLayout = new Q3GridLayout ( mw , 2, 8 );
mainLayout->setMargin( 2 );
mainLayout->setSpacing( 2 );
QPushButton * addButT = new QPushButton ( mw );
- addButT->setFocusPolicy(NoFocus);
+ addButT->setFocusPolicy(Qt::NoFocus);
mainLayout->addWidget( addButT,0,0 );
addButT->setText( "D");
connect(addButT,SIGNAL(clicked()),SLOT(defaultInfo()));
- QWhatsThis::add( addButT, i18n("Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.") );
+ Q3WhatsThis::add( addButT, i18n("Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.") );
//addBut->setPixmap ( SmallIcon("greenhook16"));
QPushButton *addBut = new QPushButton ( mw );
- addBut->setFocusPolicy(NoFocus);
+ addBut->setFocusPolicy(Qt::NoFocus);
mainLayout->addWidget( addBut,0,++ii );
addBut->setPixmap ( SmallIcon("eye"));
- QWhatsThis::add( addBut, i18n("In this column you can <b>set a calendar to be visible</b>. If a calendar is not visible its entries are not displayed in the views. You can add items to it and it is loaded/saved as usual.") );
+ Q3WhatsThis::add( addBut, i18n("In this column you can <b>set a calendar to be visible</b>. If a calendar is not visible its entries are not displayed in the views. You can add items to it and it is loaded/saved as usual.") );
connect(addBut,SIGNAL(clicked()),SLOT(enableAll()));
int max = addBut->sizeHint().height();
addBut->setMaximumWidth( max );
addButT->setFixedSize( QSize( max, max ) );
QLabel* lab = new QLabel (i18n(" Calendar \n Resource "), mw );
mainLayout->addWidget( lab,0,++ii );
- QWhatsThis::add( lab, i18n("In this column you can see the <b>name of the calendar</b>. If you click on the name button you will get an information box about the loaded calendar file. If the file was not loaded at startup you can try to load it here again.") );
+ Q3WhatsThis::add( lab, i18n("In this column you can see the <b>name of the calendar</b>. If you click on the name button you will get an information box about the loaded calendar file. If the file was not loaded at startup you can try to load it here again.") );
//lab = new QLabel ( i18n(" "), mw );
//mainLayout->addWidget( lab,0,++ii );
//lab->setFixedWidth( 1 );
addBut = new QPushButton ( mw );
- addBut->setFocusPolicy(NoFocus);
+ addBut->setFocusPolicy(Qt::NoFocus);
mainLayout->addWidget( addBut,0,++ii );
addBut->setPixmap ( SmallIcon("bell"));
- QWhatsThis::add( addBut, i18n("In this column you can <b>disable the alarms of a calendar all together</b>. The alarm data in the calendar itself is not changed, the alarms are marked internally as \"do not use\". Useful if you load a calendar of another person but do not want to get notified about alarms of that person.") );
+ Q3WhatsThis::add( addBut, i18n("In this column you can <b>disable the alarms of a calendar all together</b>. The alarm data in the calendar itself is not changed, the alarms are marked internally as \"do not use\". Useful if you load a calendar of another person but do not want to get notified about alarms of that person.") );
connect(addBut,SIGNAL(clicked()),SLOT(enableAlarm()));
addBut->setMaximumWidth( addBut->sizeHint().height() );
addBut = new QPushButton ( mw );
- addBut->setFocusPolicy(NoFocus);
+ addBut->setFocusPolicy(Qt::NoFocus);
mainLayout->addWidget( addBut,0,++ii );
addBut->setPixmap ( SmallIcon("pencil"));
- QWhatsThis::add( addBut, i18n("In this column you can <b>set a calendar and all entries of the calendar to read only</b>. If a calendar is readonly the entries cannot be edited and no items can be added to the calendar. If you change a setting of a calendar to readonly in this column all data will be saved because the data of a readonly calendar is not saved later.") );
+ Q3WhatsThis::add( addBut, i18n("In this column you can <b>set a calendar and all entries of the calendar to read only</b>. If a calendar is readonly the entries cannot be edited and no items can be added to the calendar. If you change a setting of a calendar to readonly in this column all data will be saved because the data of a readonly calendar is not saved later.") );
connect(addBut,SIGNAL(clicked()),SLOT(disableRO()));
addBut->setMaximumWidth( addBut->sizeHint().height() );
lab = new QLabel ( "", mw );
mainLayout->addWidget( lab,0,++ii );
addBut = new QPushButton ( mw );
- addBut->setFocusPolicy(NoFocus);
+ addBut->setFocusPolicy(Qt::NoFocus);
mainLayout->addWidget( addBut,0,++ii );
addBut->setPixmap ( SmallIcon("plus"));
connect(addBut,SIGNAL(clicked()),SLOT(addCal()));
- QWhatsThis::add( addBut, i18n("Click this button to <b>add a calendar</b>. You can add an existing calendar file or you can add a new calendar and KO/Pi creates a new empty calendar file for you.") );
+ Q3WhatsThis::add( addBut, i18n("Click this button to <b>add a calendar</b>. You can add an existing calendar file or you can add a new calendar and KO/Pi creates a new empty calendar file for you.") );
lab = new QLabel ( " ", mw );
mainLayout->addWidget( lab,0,++ii );
KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first();
int row = 1;
@@ -428,17 +432,17 @@ int KOCalEditView::addCalendar( QString name, QString file, bool ask )
}
if (!fi.exists() ) {
if ( ask )
if ( KMessageBox::questionYesNo(this, i18n("The file\n%1\ndoes not exist!\nShall I create it for you?").arg( KGlobal::formatMessage (absFile,0) ) )== KMessageBox::No )
return 0;
QFile fileIn( absFile );
- if (!fileIn.open( IO_WriteOnly ) ) {
+ if (!fileIn.open( QIODevice::WriteOnly ) ) {
KMessageBox::sorry( this, i18n("Sorry, cannot create the file\n%1!\nNo calendar added!").arg( file ) );
return 0;
}
- QTextStream tsIn( &fileIn );
+ Q3TextStream tsIn( &fileIn );
tsIn.setCodec( QTextCodec::codecForName("utf8") );
tsIn << "BEGIN:VCALENDAR\nPRODID:-//KDE-Pim//Platform-independent 2.1.0\nVERSION:2.0\nEND:VCALENDAR\n";
fileIn.close();
}
KopiCalendarFile * kkf = KOPrefs::instance()->getNewCalendar();
kkf->mName = name;
@@ -472,13 +476,13 @@ void KOCalEditView::enableAlarm()
toggleList( mAlarmB );
}
void KOCalEditView::disableRO()
{
toggleList( mROB, false );
}
-void KOCalEditView::toggleList ( QPtrList<KOCalCheckButton> list , bool enable )
+void KOCalEditView::toggleList ( Q3PtrList<KOCalCheckButton> list , bool enable )
{
bool dis = !enable;
KOCalCheckButton* it = list.first();
while ( it ) {
if ( !it->isChecked() == enable && it->isEnabled() ) {
dis = !dis;
diff --git a/korganizer/kofilterview.h b/korganizer/kofilterview.h
index 0dd423a..f1bbab4 100644
--- a/korganizer/kofilterview.h
+++ b/korganizer/kofilterview.h
@@ -23,41 +23,47 @@
#ifndef KOFILTERVIEW_H
#define KOFILTERVIEW_H
#include <qstring.h>
#include <qcheckbox.h>
#include <qapplication.h>
+#include <QDesktopWidget>
#include <qradiobutton.h>
#include <qlayout.h>
#include <qlabel.h>
#include <qdialog.h>
-#include <qscrollview.h>
+#include <q3scrollview.h>
#include <qpushbutton.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
+#include <Q3PtrList>
+#include <QKeyEvent>
+#include <Q3VBoxLayout>
#include <kconfig.h>
#include "kofilterview_base.h"
#include <libkcal/calfilter.h>
#include <kurlrequester.h>
#include <klineedit.h>
#include <kglobal.h>
#include <kmessagebox.h>
-class QGridLayout;
+class Q3GridLayout;
using namespace KCal;
class KONewCalPrefs : public QDialog
{
Q_OBJECT
public:
KONewCalPrefs( QWidget *parent=0, const char *name=0 ) :
QDialog( parent, name, true )
{
setCaption( i18n("Add new Calendar") );
- QVBoxLayout* lay = new QVBoxLayout( this );
+ Q3VBoxLayout* lay = new Q3VBoxLayout( this );
lay->setSpacing( 3 );
lay->setMargin( 3 );
QLabel * lab = new QLabel( i18n("<b>Name of new calendar:</b>"), this );
lay->addWidget( lab );
nameE = new KLineEdit( this );
lay->addWidget( nameE );
@@ -107,13 +113,13 @@ class KOCalButton : public QPushButton
KOCalButton( QWidget *parent=0, const char *name=0 ) :
QPushButton( parent, name)
{
connect( this, SIGNAL( clicked() ),
SLOT( bottonClicked() ));
mNumber = -1;
- setFocusPolicy(NoFocus);
+ setFocusPolicy(Qt::NoFocus);
}
void setNum ( int num ) {mNumber = num; }
signals:
void selectNum ( int );
private:
int mNumber;
@@ -132,13 +138,13 @@ class KOCalCheckButton : public QCheckBox
KOCalCheckButton( QWidget *parent=0, const char *name=0 ) :
QCheckBox( parent, name)
{
connect( this, SIGNAL( toggled ( bool ) ),
SLOT( bottonClicked( bool ) ));
mNumber = -1;
- setFocusPolicy(NoFocus);
+ setFocusPolicy(Qt::NoFocus);
//setMaximumWidth( 10 );
}
void setNum ( int num ) {mNumber = num; }
signals:
void selectNum ( int, bool );
@@ -160,13 +166,13 @@ class KOCalRadioButton : public QRadioButton
KOCalRadioButton( QWidget *parent=0, const char *name=0 ) :
QRadioButton( parent, name)
{
connect( this, SIGNAL( toggled ( bool ) ),
SLOT( bottonClicked( bool ) ));
mNumber = -1;
- setFocusPolicy(NoFocus);
+ setFocusPolicy(Qt::NoFocus);
//setMaximumWidth( 10 );
}
int num() { return mNumber;}
void setNum ( int num ) {mNumber = num; }
signals:
@@ -185,13 +191,13 @@ private slots :
class KOFilterView : public KOFilterView_base
{
Q_OBJECT
public:
- KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent=0,const char* name=0, WFlags fl=0);
+ KOFilterView(Q3PtrList<CalFilter> *filterList,QWidget* parent=0,const char* name=0, Qt::WFlags fl=0);
~KOFilterView();
void updateFilters();
bool filtersEnabled();
void setFiltersEnabled(bool);
@@ -201,16 +207,16 @@ class KOFilterView : public KOFilterView_base
signals:
void filterChanged();
void editFilters();
private:
- QPtrList<CalFilter> *mFilters;
+ Q3PtrList<CalFilter> *mFilters;
};
-class KOCalEditView : public QScrollView
+class KOCalEditView : public Q3ScrollView
{
Q_OBJECT
public:
KOCalEditView( QWidget* parent=0,const char* name=0);
~KOCalEditView();
int addCalendar( QString calName, QString fileName, bool ask = true );
@@ -241,17 +247,17 @@ class KOCalEditView : public QScrollView
void needsUpdate();
void checkCalendar();
void requestCalendarInfo( int id );
private:
QWidget *mw;
- void toggleList ( QPtrList<KOCalCheckButton> , bool b = true );
- QPtrList<KOCalRadioButton> mStdandardB;
- QPtrList<KOCalCheckButton> mEnabledB;
- QPtrList<KOCalCheckButton> mAlarmB;
- QPtrList<KOCalCheckButton> mROB;
- QGridLayout* mainLayout;
+ void toggleList ( Q3PtrList<KOCalCheckButton> , bool b = true );
+ Q3PtrList<KOCalRadioButton> mStdandardB;
+ Q3PtrList<KOCalCheckButton> mEnabledB;
+ Q3PtrList<KOCalCheckButton> mAlarmB;
+ Q3PtrList<KOCalCheckButton> mROB;
+ Q3GridLayout* mainLayout;
};
#endif // KOFILTERVIEW_H
diff --git a/korganizer/koimportoldialog.cpp b/korganizer/koimportoldialog.cpp
index 79b97e8..63d044c 100644
--- a/korganizer/koimportoldialog.cpp
+++ b/korganizer/koimportoldialog.cpp
@@ -19,26 +19,26 @@
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 <qlayout.h>
-#include <qprogressbar.h>
-#include <qprogressdialog.h>
-#include <qwidgetstack.h>
+#include <q3progressbar.h>
+#include <q3progressdialog.h>
+#include <q3widgetstack.h>
#include <qdatetime.h>
#include <qdir.h>
#include <qapplication.h>
-#include <qhbox.h>
+#include <q3hbox.h>
#include <qregexp.h>
-#include <qheader.h>
+#include <q3header.h>
#include <qdatetime.h>
-#include <qlistview.h>
+#include <q3listview.h>
#include <kdebug.h>
#include <klocale.h>
#include <kstandarddirs.h>
#include <kmessagebox.h>
#include <kfiledialog.h>
@@ -67,34 +67,34 @@ QDateTime mDdate2Qdtr( DATE dt)
odt = dt;
odt.GetAsSystemTime(st);
QDateTime qdt (QDate(st.wYear, st.wMonth,st.wDay ),QTime( st.wHour, st.wMinute,st.wSecond ) );
return qdt;
}
-class OLEListViewItem : public QCheckListItem
+class OLEListViewItem : public Q3CheckListItem
{
public:
- OLEListViewItem( QListView *parent, QString text ) :
- QCheckListItem( parent, text, QCheckListItem::CheckBox ) { mData = 0; };
- OLEListViewItem( QListViewItem *after, QString text ) :
- QCheckListItem( after, text, QCheckListItem::CheckBox ) { mData = 0; };
+ OLEListViewItem( Q3ListView *parent, QString text ) :
+ Q3CheckListItem( parent, text, Q3CheckListItem::CheckBox ) { mData = 0; };
+ OLEListViewItem( Q3ListViewItem *after, QString text ) :
+ Q3CheckListItem( after, text, Q3CheckListItem::CheckBox ) { mData = 0; };
~OLEListViewItem() {};
void setData( DWORD data ) {mData= data; };
DWORD data() { return mData ;};
private:
DWORD mData;
};
KOImportOLdialog::KOImportOLdialog( const QString &caption,
Calendar *calendar, QWidget *parent ) :
KDialogBase( Plain, caption, User1 | Close, Ok,
parent, caption, true, false, i18n("Import!") )
{
- QHBox * mw = new QHBox( this );
+ Q3HBox * mw = new Q3HBox( this );
setMainWidget( mw );
- mListView = new QListView( mw );
+ mListView = new Q3ListView( mw );
mListView->addColumn(i18n("Select Folder to import"));
mListView->addColumn(i18n("Content Type"));
mCalendar = calendar;
connect( this, SIGNAL( user1Clicked() ),SLOT ( slotApply()));
setupFolderView();
resize( sizeHint().width()+50, sizeHint().height()+50 );
@@ -209,13 +209,13 @@ void KOImportOLdialog::readCalendarData( DWORD folder )
mf.m_lpDispatch->AddRef();
_Items folderItems;
_variant_t indx((long)0);
LPDISPATCH itm;
int i;
folderItems = mf.GetItems();
- QProgressDialog bar( i18n("Importing calendar data"),i18n("Abort"), folderItems.GetCount(),this );
+ Q3ProgressDialog bar( i18n("Importing calendar data"),i18n("Abort"), folderItems.GetCount(),this );
bar.setCaption (i18n("Importing!") );
int h = bar.sizeHint().height() ;
int w = 300;
int dw = QApplication::desktop()->width();
int dh = QApplication::desktop()->height();
//bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
diff --git a/korganizer/koimportoldialog.h b/korganizer/koimportoldialog.h
index c8847c5..d66f099 100644
--- a/korganizer/koimportoldialog.h
+++ b/korganizer/koimportoldialog.h
@@ -28,13 +28,13 @@
#include <afxdisp.h>
#include <libkcal/calendar.h>
#include <libkcal/event.h>
class QDateTime;
-class QListView;
+class Q3ListView;
class OLEListViewItem;
class _AppointmentItem;
namespace KPIM { class CategorySelectDialog; }
using namespace KCal;
@@ -69,13 +69,13 @@ class KOImportOLdialog : public KDialogBase
void setupFolderView();
void addFolder(OLEListViewItem* iParent, LPDISPATCH dispParent);
void readCalendarData( DWORD folder );
void ol2kopiCalendar( _AppointmentItem * , bool computeRecurrence = true );
Calendar *mCalendar;
- QListView * mListView;
+ Q3ListView * mListView;
QString getUidByEmail( QString email );
private:
int importedItems;
};
diff --git a/korganizer/koincidenceeditor.cpp b/korganizer/koincidenceeditor.cpp
index 236f6f9..2060ea1 100644
--- a/korganizer/koincidenceeditor.cpp
+++ b/korganizer/koincidenceeditor.cpp
@@ -19,18 +19,20 @@
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 <qlayout.h>
-#include <qwidgetstack.h>
+#include <q3widgetstack.h>
#include <qdatetime.h>
#include <qdir.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
#include <kdebug.h>
#include <klocale.h>
#include <kstandarddirs.h>
#include <kmessagebox.h>
#include <kfiledialog.h>
@@ -79,15 +81,15 @@ KOIncidenceEditor::~KOIncidenceEditor()
{
//delete mCategoryDialog;
}
void KOIncidenceEditor::setupAttendeesTab()
{
- QFrame *topFrame = addPage(i18n("Attendees"));
+ Q3Frame *topFrame = addPage(i18n("Attendees"));
- QBoxLayout *topLayout = new QVBoxLayout(topFrame);
+ Q3BoxLayout *topLayout = new Q3VBoxLayout(topFrame);
mDetails = new KOEditorDetails(spacingHint()-2,topFrame);
topLayout->addWidget(mDetails);
}
void KOIncidenceEditor::alarmWarning()
diff --git a/korganizer/kojournalview.cpp b/korganizer/kojournalview.cpp
index 406df5a..51594ff 100644
--- a/korganizer/kojournalview.cpp
+++ b/korganizer/kojournalview.cpp
@@ -22,19 +22,25 @@
*/
//
// View of Journal entries
#include <qlayout.h>
-#include <qscrollview.h>
-#include <qpopupmenu.h>
-#include <qhbox.h>
+#include <q3scrollview.h>
+#include <q3popupmenu.h>
+#include <q3hbox.h>
#include <qpushbutton.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include <qapplication.h>
+#include <QDesktopWidget>
+//Added by qt3to4:
+#include <QPixmap>
+#include <Q3PtrList>
+#include <QKeyEvent>
+#include <Q3VBoxLayout>
#include <klocale.h>
#include <kdebug.h>
#include "koprefs.h"
#include <kglobal.h>
#include <ktextedit.h>
@@ -48,33 +54,33 @@ using namespace KOrg;
KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent,
const char *name)
: KOrg::BaseView(calendar, parent, name)
{
mCalendar = calendar;
- QHBox * vb = new QHBox ( this );
+ Q3HBox * vb = new Q3HBox ( this );
QPushButton * newJournal = new QPushButton( vb );
QPixmap icon;
if ( QApplication::desktop()->width() < 321 )
icon = SmallIcon("ko16old");
else
icon = SmallIcon("ko24old");
newJournal->setPixmap (icon ) ;
int size = newJournal->sizeHint().height();
newJournal->setFixedSize( size, size );
mDateLabel = new QLabel ( vb );
mDateLabel->setMargin(1);
- mDateLabel->setAlignment(AlignCenter);
- QScrollView * sv = new QScrollView( this );
- QVBoxLayout * hbl = new QVBoxLayout( this );
+ mDateLabel->setAlignment(Qt::AlignCenter);
+ Q3ScrollView * sv = new Q3ScrollView( this );
+ Q3VBoxLayout * hbl = new Q3VBoxLayout( this );
hbl->addWidget( vb );
hbl->addWidget( sv );
parWid = new QWidget( sv->viewport() );
sv->addChild(parWid);
- sv->setResizePolicy( QScrollView:: AutoOneFit );
- mTopLayout = new QVBoxLayout(parWid);
+ sv->setResizePolicy( Q3ScrollView:: AutoOneFit );
+ mTopLayout = new Q3VBoxLayout(parWid);
connect( newJournal, SIGNAL( clicked() ), this , SLOT( newJournal() ) );
getNewEntry();
}
KOJournalView::~KOJournalView()
{
@@ -93,15 +99,15 @@ JournalEntry* KOJournalView::getNewEntry()
connect ( Entry,SIGNAL(deleteJournal(Journal *) ),this ,SIGNAL(deleteJournal(Journal *) ) ) ;
connect ( Entry,SIGNAL(newJournal() ),this ,SLOT(newJournal() ) ) ;
connect ( Entry,SIGNAL(showJournalOnly( Journal * ) ),this ,SLOT(showOnly ( Journal* ) ) ) ;
return Entry;
}
-QPtrList<Incidence> KOJournalView::selectedIncidences()
+Q3PtrList<Incidence> KOJournalView::selectedIncidences()
{
- QPtrList<Incidence> eventList;
+ Q3PtrList<Incidence> eventList;
return eventList;
}
void KOJournalView::updateConfig()
{
JournalEntry* mEntry = jEntries.first();
@@ -159,19 +165,19 @@ void KOJournalView::showOnly ( Journal* j )
//qDebug("showOnly %x ", j);
flushView();
if ( j == 0 ) {
showDates( mDate, QDate() );
return;
}
- QPtrList<Journal> jl;
+ Q3PtrList<Journal> jl;
jl.append ( j );
showList( jl );
JournalEntry* mEntry = jEntries.first();
mEntry->setShowOnly();
}
-void KOJournalView::showList(QPtrList<Journal> jl)
+void KOJournalView::showList(Q3PtrList<Journal> jl)
{
static bool ff = false;
if ( ff ) return;
ff = true;
//qDebug("KOJournalView::showList %d",jl.count() );
JournalEntry* mEntry = jEntries.first();
@@ -222,17 +228,17 @@ void KOJournalView::showList(QPtrList<Journal> jl)
}
void KOJournalView::showDates(const QDate &start, const QDate &)
{
mDate = start;
mDateLabel->setText(KGlobal::locale()->formatDate(mDate));
- QPtrList<Journal> jl = calendar()->journals4Date( start );
+ Q3PtrList<Journal> jl = calendar()->journals4Date( start );
showList( jl );
}
-void KOJournalView::showEvents(QPtrList<Event>)
+void KOJournalView::showEvents(Q3PtrList<Event>)
{
// After new creation of list view no events are selected.
// emit incidenceSelected( 0 );
}
void KOJournalView::changeEventDisplay(Event *, int /*action*/)
diff --git a/korganizer/kojournalview.h b/korganizer/kojournalview.h
index 7fa94ae..22f26cd 100644
--- a/korganizer/kojournalview.h
+++ b/korganizer/kojournalview.h
@@ -22,12 +22,17 @@
*/
#ifndef _KOJOURNALVIEW_H
#define _KOJOURNALVIEW_H
#include <korganizer/baseview.h>
#include <qlayout.h>
+//Added by qt3to4:
+#include <QKeyEvent>
+#include <Q3PtrList>
+#include <QLabel>
+#include <Q3BoxLayout>
class JournalEntry;
class QLabel;
/**
* This class provides a journal view.
@@ -43,13 +48,13 @@ class KOJournalView : public KOrg::BaseView
KOJournalView(Calendar *calendar, QWidget *parent = 0,
const char *name = 0);
~KOJournalView();
virtual int currentDateCount();
void clearList();
- virtual QPtrList<Incidence> selectedIncidences();
+ virtual Q3PtrList<Incidence> selectedIncidences();
DateList selectedDates()
{DateList q;
return q;};
void checkModified();
signals:
void deleteJournal(Journal *);
@@ -57,23 +62,23 @@ class KOJournalView : public KOrg::BaseView
void showOnly ( Journal* );
void newJournal();
void updateView();
void flushView();
void updateConfig();
void showDates( const QDate &start, const QDate &end );
- void showEvents(QPtrList<Event> eventList);
+ void showEvents(Q3PtrList<Event> eventList);
void changeEventDisplay(Event *, int);
private:
- void showList(QPtrList<Journal> jl);
+ void showList(Q3PtrList<Journal> jl);
Calendar *mCalendar;
JournalEntry* getNewEntry();
- QPtrList<JournalEntry> jEntries;
+ Q3PtrList<JournalEntry> jEntries;
void keyPressEvent ( QKeyEvent * ) ;
- QBoxLayout *mTopLayout;
+ Q3BoxLayout *mTopLayout;
QWidget *parWid;
QLabel * mDateLabel;
QDate mDate;
};
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index 192f8c0..0ea1d50 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -19,26 +19,35 @@
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 <qlistview.h>
+#include <q3listview.h>
#include <qlayout.h>
#include <qlabel.h>
-#include <qpopupmenu.h>
-#include <qprogressbar.h>
+#include <q3popupmenu.h>
+#include <q3progressbar.h>
#include <qfileinfo.h>
#include <qmessagebox.h>
#include <qdialog.h>
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <qdir.h>
-#include <qwhatsthis.h>
+#include <q3whatsthis.h>
#include <qregexp.h>
#include <qpainter.h>
-#include <qpaintdevicemetrics.h>
+#include <q3paintdevicemetrics.h>
+//Added by qt3to4:
+#include <QPixmap>
+#include <QMouseEvent>
+#include <QKeyEvent>
+#include <QEvent>
+#include <Q3VBoxLayout>
+#include <Q3PtrList>
+
+#include<QDesktopWidget>
#include <klocale.h>
#include <kdebug.h>
#include <kiconloader.h>
#include <kglobal.h>
@@ -67,16 +76,16 @@
#include "kolistview.h"
#include "koeventviewer.h"
extern QPixmap* sgListViewCompletedPix[6];
extern QPixmap* sgListViewJournalPix;
-class KOListViewWhatsThis :public QWhatsThis
+class KOListViewWhatsThis :public Q3WhatsThis
{
public:
- KOListViewWhatsThis( QWidget *wid, KOListView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { };
+ KOListViewWhatsThis( QWidget *wid, KOListView* view ) : Q3WhatsThis( wid ), _wid(wid),_view (view) { };
protected:
virtual QString text( const QPoint& p)
{
return _view->getWhatsThisText(p) ;
}
@@ -271,69 +280,69 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
mListView->addColumn(i18n("Recurs")); // recurs?
mListView->addColumn(i18n("Cancelled"));
mListView->addColumn(i18n("Categories"));
mListView->addColumn(i18n("Calendar"));
mListView->addColumn(i18n("Last Modified"));
- mListView->setColumnAlignment(0,AlignLeft);
- mListView->setColumnAlignment(1,AlignLeft);
- mListView->setColumnAlignment(2,AlignHCenter);
- mListView->setColumnAlignment(3,AlignLeft);
- mListView->setColumnAlignment(4,AlignHCenter);
- mListView->setColumnAlignment(5,AlignLeft);
- mListView->setColumnAlignment(6,AlignLeft);
- mListView->setColumnAlignment(7,AlignLeft);
- mListView->setColumnAlignment(8,AlignLeft);
- mListView->setColumnAlignment(9,AlignLeft);
- mListView->setColumnAlignment(10,AlignLeft);
- mListView->setColumnAlignment(11,AlignLeft);
+ mListView->setColumnAlignment(0,Qt::AlignLeft);
+ mListView->setColumnAlignment(1,Qt::AlignLeft);
+ mListView->setColumnAlignment(2,Qt::AlignHCenter);
+ mListView->setColumnAlignment(3,Qt::AlignLeft);
+ mListView->setColumnAlignment(4,Qt::AlignHCenter);
+ mListView->setColumnAlignment(5,Qt::AlignLeft);
+ mListView->setColumnAlignment(6,Qt::AlignLeft);
+ mListView->setColumnAlignment(7,Qt::AlignLeft);
+ mListView->setColumnAlignment(8,Qt::AlignLeft);
+ mListView->setColumnAlignment(9,Qt::AlignLeft);
+ mListView->setColumnAlignment(10,Qt::AlignLeft);
+ mListView->setColumnAlignment(11,Qt::AlignLeft);
mKOListViewWhatsThis = new KOListViewWhatsThis(mListView->viewport(),this);
int iii = 0;
for ( iii = 0; iii< 12 ; ++iii )
- mListView->setColumnWidthMode( iii, QListView::Manual );
+ mListView->setColumnWidthMode( iii, Q3ListView::Manual );
- QBoxLayout *layoutTop = new QVBoxLayout(this);
+ Q3BoxLayout *layoutTop = new Q3VBoxLayout(this);
layoutTop->addWidget(mListView);
mListView->setFont ( KOPrefs::instance()->mListViewFont );
mPopupMenu = eventPopup();
- QPopupMenu* selPopup = new QPopupMenu ( this );
+ Q3PopupMenu* selPopup = new Q3PopupMenu ( this );
mPopupMenu->insertSeparator();
selPopup->insertItem(i18n("All"),this,
SLOT(allSelection()));
selPopup->insertItem(i18n("None"),this,
SLOT(clearSelection()));
selPopup->insertItem(i18n("Delete selected..."),this,
SLOT(deleteAll()));
mPopupMenu->insertItem(i18n("Selection"), selPopup );
- mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
+ mPopupMenu->addAdditionalItem(QIcon(QPixmap()),
i18n("Hide all selected"),this,
SLOT(hideAll()),true);
selPopup->insertSeparator();
- QPopupMenu * exportPO = new QPopupMenu ( this );
+ Q3PopupMenu * exportPO = new Q3PopupMenu ( this );
selPopup->insertItem( i18n("Export"), exportPO );
#ifdef DESKTOP_VERSION
mPopupMenu->insertSeparator();
- mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
+ mPopupMenu->addAdditionalItem(QIcon(QPixmap()),
i18n("Print complete list..."),this,
SLOT(printList()),true);
#endif
- mCalPopup = new QPopupMenu ( this );
+ mCalPopup = new Q3PopupMenu ( this );
selPopup->insertItem( i18n("Set Calendar"), mCalPopup );
selPopup->insertItem(i18n("Set categories")+"...",this,
SLOT(setCat()) );
selPopup->insertItem( i18n("Set alarm..."),this,
SLOT(setAlarm()));
#if 0
- mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
+ mPopupMenu->addAdditionalItem(QIcon(QPixmap()),
i18n("Set categories")+"...",this,
SLOT(setCat()),true);
- mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
+ mPopupMenu->addAdditionalItem(QIcon(QPixmap()),
i18n("Set alarm..."),this,
SLOT(setAlarm()),true);
#endif
QObject::connect(mCalPopup,SIGNAL(aboutToShow()),this,
SLOT( populateCalPopup() ));
QObject::connect(mCalPopup,SIGNAL(activated( int )),this,
@@ -353,13 +362,13 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
//mPopupMenu->insertSeparator();
#ifndef DESKTOP_VERSION
selPopup->insertSeparator();
selPopup->insertItem( i18n("Beam via IR..."),this,
SLOT(beamSelected()));
#if 0
- mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
+ mPopupMenu->addAdditionalItem(QIcon(QPixmap()),
i18n("Beam via IR"),this,
SLOT(beamSelected()),true);
#endif
#endif
/*
mPopupMenu = new QPopupMenu;
@@ -372,19 +381,19 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
SLOT(showDates()));
mPopupMenu->insertItem(i18n("Hide Dates"), this,
SLOT(hideDates()));
*/
QObject::connect(mListView,SIGNAL( newEvent()),
this,SIGNAL(signalNewEvent()));
- QObject::connect(mListView,SIGNAL(doubleClicked(QListViewItem *)),
- this,SLOT(defaultItemAction(QListViewItem *)));
- QObject::connect(mListView,SIGNAL(rightButtonPressed( QListViewItem *,
+ QObject::connect(mListView,SIGNAL(doubleClicked(Q3ListViewItem *)),
+ this,SLOT(defaultItemAction(Q3ListViewItem *)));
+ QObject::connect(mListView,SIGNAL(rightButtonPressed( Q3ListViewItem *,
const QPoint &, int )),
- this,SLOT(popupMenu(QListViewItem *,const QPoint &,int)));
- QObject::connect(mListView,SIGNAL(currentChanged(QListViewItem *)),
- SLOT(processSelectionChange(QListViewItem *)));
+ this,SLOT(popupMenu(Q3ListViewItem *,const QPoint &,int)));
+ QObject::connect(mListView,SIGNAL(currentChanged(Q3ListViewItem *)),
+ SLOT(processSelectionChange(Q3ListViewItem *)));
QObject::connect(mListView,SIGNAL(showIncidence(Incidence *)),
SIGNAL(showIncidenceSignal(Incidence *)) );
readSettings(KOGlobals::config(),"KOListView Layout");
}
@@ -425,13 +434,13 @@ void KOListView::setCalendar( int c )
i18n("Continue"), i18n("Cancel"), 0,
0, 1 );
if ( result != 0 ) {
return;
}
- QPtrList<Incidence> delSel = getSelectedIncidences() ;
+ Q3PtrList<Incidence> delSel = getSelectedIncidences() ;
int icount = delSel.count();
if ( icount ) {
Incidence *incidence = delSel.first();
while ( incidence ) {
incidence->setCalID( c );
KOListViewItem * item = getItemForEvent( incidence );
@@ -439,13 +448,13 @@ void KOListView::setCalendar( int c )
ListItemVisitor v(item, mStartDate );
incidence->accept(v);
}
incidence = delSel.next();
}
}
- QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
+ Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
KopiCalendarFile * cal = calendars.first();
while ( cal ) {
mCalendar->setCalendarEnabled( cal->mCalNumber,cal->isEnabled );
mCalendar->setAlarmEnabled( cal->mCalNumber, cal->isAlarmEnabled );
mCalendar->setReadOnly( cal->mCalNumber, cal->isReadOnly );
if ( cal->isStandard )
@@ -494,13 +503,13 @@ void KOListView::setCat()
void KOListView::setAlarm()
{
KOAlarmPrefs kap( this);
if ( !kap.exec() )
return;
- QPtrList<Incidence> delSel = getSelectedIncidences( true, true, false, true ); // no journals, only due todos
+ Q3PtrList<Incidence> delSel = getSelectedIncidences( true, true, false, true ); // no journals, only due todos
Incidence* inc = delSel.first();
int count = 0;
while ( inc ) {
++count;
if (kap.mAlarmButton->isChecked()) {
if (inc->alarms().count() == 0)
@@ -519,13 +528,13 @@ void KOListView::setAlarm()
}
else if (!kap.mAlarmSound.isEmpty() && kap.mAlarmSoundButton->isOn())
alarm->setAudioAlarm(kap.mAlarmSound);
else
alarm->setType(Alarm::Invalid);
} else {
- QPtrList<Alarm> alarms = inc->alarms();
+ Q3PtrList<Alarm> alarms = inc->alarms();
Alarm *alarm;
for (alarm = alarms.first(); alarm; alarm = alarms.next() ) {
alarm->setEnabled(false);
alarm->setType(Alarm::Invalid);
}
}
@@ -549,13 +558,13 @@ void KOListView::setCategories( bool removeOld )
if (! csd->exec()) {
delete csd;
return;
}
QStringList catList = csd->selectedCategories();
delete csd;
- QPtrList<Incidence> delSel = getSelectedIncidences(); // all inc allowed;
+ Q3PtrList<Incidence> delSel = getSelectedIncidences(); // all inc allowed;
Incidence* inc = delSel.first();
while ( inc ) {
if ( removeOld ) {
inc->setCategories( catList, false );
} else {
inc->addCategories( catList, false );
@@ -569,13 +578,13 @@ void KOListView::setCategories( bool removeOld )
}
QTimer::singleShot( 1, this, SLOT ( resetFocus() ) );
}
void KOListView::beamSelected()
{
- QPtrList<Incidence> delSel = getSelectedIncidences() ;
+ Q3PtrList<Incidence> delSel = getSelectedIncidences() ;
if ( delSel.count() )
emit beamIncidenceList( delSel );
}
void KOListView::saveDescriptionToFile()
{
@@ -584,13 +593,13 @@ void KOListView::saveDescriptionToFile()
i18n("This saves the text/details of selected\nJournals and Events/Todos\nto a text file."),
i18n("Continue"), i18n("Cancel"), 0,
0, 1 );
if ( result != 0 ) {
return;
}
- QPtrList<Incidence> delSel = getSelectedIncidences() ;
+ Q3PtrList<Incidence> delSel = getSelectedIncidences() ;
int icount = delSel.count();
if ( icount ) {
QString fn = KOPrefs::instance()->mLastSaveFile;
fn = KFileDialog::getSaveFileName( fn, i18n("Save filename"), this );
if ( fn == "" )
@@ -642,17 +651,17 @@ void KOListView::saveDescriptionToFile()
}
}
incidence = delSel.next();
}
QFile file( fn );
- if (!file.open( IO_WriteOnly ) ) {
+ if (!file.open( QIODevice::WriteOnly ) ) {
topLevelWidget()->setCaption(i18n("File open error - nothing saved!") );
return;
}
- QTextStream ts( &file );
+ Q3TextStream ts( &file );
ts << text;
file.close();
//qDebug("%s ", text.latin1());
mes = i18n("KO/Pi:Saved %1 descriptions/journals").arg(icount );
KOPrefs::instance()->mLastSaveFile = fn;
topLevelWidget()->setCaption(mes);
@@ -664,18 +673,18 @@ void KOListView::saveToFileVCS()
writeToFile( false );
}
void KOListView::saveToFile()
{
writeToFile( true );
}
-QPtrList<Incidence> KOListView::getSelectedIncidences( bool includeEvents, bool includeTodos, bool includeJournals, bool onlyDueTodos )
+Q3PtrList<Incidence> KOListView::getSelectedIncidences( bool includeEvents, bool includeTodos, bool includeJournals, bool onlyDueTodos )
{
- QPtrList<Incidence> delSel ;
+ Q3PtrList<Incidence> delSel ;
bool addSubTodos = false;
bool askSubTodos = true;
- QListViewItem *item = mListView->firstChild ();
+ Q3ListViewItem *item = mListView->firstChild ();
while ( item ) {
if ( item->isSelected() ) {
Incidence* inc = ((KOListViewItem *)item)->data();
if ( ( addSubTodos && delSel.findRef( inc ) == -1) || !addSubTodos ) {
if ( (inc->typeID() == todoID && includeTodos) ||
(inc->typeID() == eventID && includeEvents) ||
@@ -703,13 +712,13 @@ QPtrList<Incidence> KOListView::getSelectedIncidences( bool includeEvents, bool
}
if (result == KMessageBox::Yes)
addSubTodos = true;
askSubTodos = false;
}
if ( addSubTodos ) {
- QPtrList<Incidence> tempSel ;
+ Q3PtrList<Incidence> tempSel ;
inc->addRelationsToList( &tempSel );
Incidence* tempinc = tempSel.first();
while ( tempinc ) {
if ( delSel.findRef( tempinc ) == -1 ) {
if ( tempinc->typeID() == todoID && onlyDueTodos ) {
if ( ((Todo*)tempinc)->hasDueDate() )
@@ -727,13 +736,13 @@ QPtrList<Incidence> KOListView::getSelectedIncidences( bool includeEvents, bool
}
return delSel;
}
void KOListView::writeToFile( bool iCal )
{
- QPtrList<Incidence> delSel = getSelectedIncidences(); // all inc allowed;
+ Q3PtrList<Incidence> delSel = getSelectedIncidences(); // all inc allowed;
if ( !iCal ) {
bool journal = false;
Incidence *incidence = delSel.first();
while ( incidence ) {
if ( incidence->typeID() == journalID ) {
journal = true;
@@ -800,34 +809,34 @@ void KOListView::writeToFile( bool iCal )
}
}
QTimer::singleShot( 1, this, SLOT ( resetFocus() ) );
}
void KOListView::hideAll()
{
- QPtrList<QListViewItem> delSel ;
- QListViewItem *item = mListView->firstChild ();
+ Q3PtrList<Q3ListViewItem> delSel ;
+ Q3ListViewItem *item = mListView->firstChild ();
while ( item ) {
if ( item->isSelected() ) {
delSel.append(item);
}
item = item->nextSibling();
}
item = delSel.first() ;
while ( item ) {
- QListViewItem * del = item;
+ Q3ListViewItem * del = item;
item = delSel.next();
delete del;
}
}
void KOListView::printList()
{
mListView->printList();
}
void KOListView::deleteAll()
{
- QPtrList<Incidence> delSel = getSelectedIncidences(); // all inc allowed;;
+ Q3PtrList<Incidence> delSel = getSelectedIncidences(); // all inc allowed;;
if ( delSel.count() ) {
int icount = delSel.count();
Incidence *incidence = delSel.first();
Incidence *toDelete;
KOPrefs *p = KOPrefs::instance();
bool confirm = p->mConfirm;
@@ -835,17 +844,17 @@ void KOListView::deleteAll()
mess = mess.sprintf( i18n("You have %d item(s) selected.\n"), icount );
if ( KMessageBox::Continue == KMessageBox::warningContinueCancel(this, mess + i18n("All selected items will be\npermanently deleted.\n(Deleting items will take\nsome time on a PDA)\n"), i18n("KO/Pi Confirmation"),i18n("Delete")) ) {
p->mConfirm = false;
int delCounter = 0;
QDialog dia ( this, "p-dialog", true );
QLabel lab (i18n("Close dialog to abort deletion!"), &dia );
- QVBoxLayout lay( &dia );
+ Q3VBoxLayout lay( &dia );
lay.setMargin(7);
lay.setSpacing(7);
lay.addWidget( &lab);
- QProgressBar bar( icount, &dia );
+ Q3ProgressBar bar( icount, &dia );
lay.addWidget( &bar);
int w = 220;
int h = 50;
int dw = QApplication::desktop()->width();
int dh = QApplication::desktop()->height();
dia.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
@@ -881,16 +890,16 @@ int KOListView::maxDatesHint()
int KOListView::currentDateCount()
{
return 0;
}
-QPtrList<Incidence> KOListView::selectedIncidences()
+Q3PtrList<Incidence> KOListView::selectedIncidences()
{
- QPtrList<Incidence> eventList;
- QListViewItem *item = mListView->firstChild ();
+ Q3PtrList<Incidence> eventList;
+ Q3ListViewItem *item = mListView->firstChild ();
while ( item ) {
if ( item->isSelected() ) {
eventList.append(((KOListViewItem *)item)->data());
}
item = item->nextSibling();
@@ -984,35 +993,35 @@ void KOListView::showDates(const QDate &start, const QDate &end)
}
//emit incidenceSelected( 0 );
updateView();
}
-void KOListView::addEvents(QPtrList<Event> eventList)
+void KOListView::addEvents(Q3PtrList<Event> eventList)
{
Event *ev;
for(ev = eventList.first(); ev; ev = eventList.next()) {
addIncidence(ev);
}
if ( !mListView->currentItem() ){
updateView();
}
}
-void KOListView::addTodos(QPtrList<Todo> eventList)
+void KOListView::addTodos(Q3PtrList<Todo> eventList)
{
Todo *ev;
for(ev = eventList.first(); ev; ev = eventList.next()) {
addIncidence(ev);
}
if ( !mListView->currentItem() ){
updateView();
}
}
-void KOListView::addJournals(QPtrList<Journal> eventList)
+void KOListView::addJournals(Q3PtrList<Journal> eventList)
{
Journal *ev;
for(ev = eventList.first(); ev; ev = eventList.next()) {
addIncidence(ev);
}
if ( !mListView->currentItem() ){
@@ -1041,13 +1050,13 @@ void KOListView::addIncidence(Incidence *incidence)
if (incidence->accept(v)) {
return;
}
else delete item;
}
-void KOListView::showEvents(QPtrList<Event> eventList)
+void KOListView::showEvents(Q3PtrList<Event> eventList)
{
clear();
addEvents(eventList);
// After new creation of list view no events are selected.
@@ -1092,20 +1101,20 @@ KOListViewItem *KOListView::getItemForEvent(Incidence *event)
if (item->data() == event) return item;
item = (KOListViewItem *)item->nextSibling();
}
return 0;
}
-void KOListView::defaultItemAction(QListViewItem *i)
+void KOListView::defaultItemAction(Q3ListViewItem *i)
{
KOListViewItem *item = static_cast<KOListViewItem *>( i );
if ( item ) defaultAction( item->data() );
}
-void KOListView::popupMenu(QListViewItem *item,const QPoint &,int)
+void KOListView::popupMenu(Q3ListViewItem *item,const QPoint &,int)
{
mActiveItem = (KOListViewItem *)item;
if (mActiveItem) {
Incidence *incidence = mActiveItem->data();
mPopupMenu->enableDefault( !mListView->hasMultiSelection( item ) );
mPopupMenu->showIncidencePopup(incidence);
@@ -1128,13 +1137,13 @@ void KOListView::readSettings(KConfig *config, QString setting)
void KOListView::writeSettings(KConfig *config, QString setting)
{
// qDebug("KOListView::writeSettings ");
mListView->saveLayout(config, setting);
}
-void KOListView::processSelectionChange(QListViewItem *)
+void KOListView::processSelectionChange(Q3ListViewItem *)
{
KOListViewItem *item =
static_cast<KOListViewItem *>( mListView->currentItem() );
if ( !item ) {
@@ -1177,30 +1186,30 @@ void KOListView::keyPressEvent ( QKeyEvent *e)
}
void KOListViewListView::keyPressEvent ( QKeyEvent *e)
{
switch ( e->key() ) {
case Qt::Key_Down:
- if ( e->state() == ShiftButton ) {
- QListViewItem* cn = currentItem();
+ if ( e->state() == Qt::ShiftButton ) {
+ Q3ListViewItem* cn = currentItem();
if ( !cn )
cn = firstChild();
if ( !cn )
return;
while ( cn->nextSibling() )
cn = cn->nextSibling();
setCurrentItem ( cn );
ensureItemVisible ( cn );
e->accept();
return;
}
- if ( e->state() == ControlButton ) {
+ if ( e->state() == Qt::ControlButton ) {
int count = childCount ();
int jump = count / 5;
- QListViewItem* cn;
+ Q3ListViewItem* cn;
cn = currentItem();
if ( ! cn )
return;
if ( jump == 0 )
jump = 1;
while ( jump && cn->nextSibling() ) {
@@ -1208,47 +1217,47 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e)
--jump;
}
setCurrentItem ( cn );
ensureItemVisible ( cn );
} else
- QListView::keyPressEvent ( e ) ;
+ Q3ListView::keyPressEvent ( e ) ;
e->accept();
break;
case Qt::Key_Up:
- if ( e->state() == ShiftButton ) {
- QListViewItem* cn = firstChild();
+ if ( e->state() == Qt::ShiftButton ) {
+ Q3ListViewItem* cn = firstChild();
if ( cn ) {
setCurrentItem ( cn );
ensureItemVisible ( cn );
}
e->accept();
return;
}
- if ( e->state() == ControlButton ) {
+ if ( e->state() == Qt::ControlButton ) {
int count = childCount ();
int jump = count / 5;
- QListViewItem* cn;
+ Q3ListViewItem* cn;
cn = currentItem();
if ( ! cn )
return;
if ( jump == 0 )
jump = 1;
while ( jump && cn->itemAbove ()) {
cn = cn->itemAbove ();
--jump;
}
setCurrentItem ( cn );
ensureItemVisible ( cn );
} else
- QListView::keyPressEvent ( e ) ;
+ Q3ListView::keyPressEvent ( e ) ;
e->accept();
break;
case Qt::Key_I: {
- QListViewItem* cn;
+ Q3ListViewItem* cn;
cn = currentItem();
if ( cn ) {
KOListViewItem* ci = (KOListViewItem*)( cn );
if ( ci ){
//emit showIncidence( ci->data());
cn = cn->nextSibling();
@@ -1262,18 +1271,18 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e)
e->accept();
}
break;
case Qt::Key_Return:
case Qt::Key_Enter:
{
- QListViewItem* cn;
+ Q3ListViewItem* cn;
cn = currentItem();
if ( cn ) {
KOListViewItem* ci = (KOListViewItem*)( cn );
if ( ci ){
- if ( e->state() == ShiftButton )
+ if ( e->state() == Qt::ShiftButton )
ci->setSelected( false );
else
ci->setSelected( true );
cn = cn->nextSibling();
if ( cn ) {
setCurrentItem ( cn );
@@ -1297,43 +1306,43 @@ KOListViewListView::KOListViewListView(KOListView * lv )
setAllColumnsShowFocus( true );
mPopupTimer = new QTimer(this);
connect(mPopupTimer , SIGNAL(timeout()), this, SLOT(popupMenu()));
#ifndef DESKTOP_VERSION
//QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold );
#endif
- setSelectionMode( QListView::Multi );
+ setSelectionMode( Q3ListView::Multi );
setMultiSelection( true);
}
-bool KOListViewListView::hasMultiSelection(QListViewItem* item)
+bool KOListViewListView::hasMultiSelection(Q3ListViewItem* item)
{
- QListViewItem *qitem = firstChild ();
+ Q3ListViewItem *qitem = firstChild ();
while ( qitem ) {
if ( qitem->isSelected() && item != qitem )
return true;
qitem = qitem->nextSibling();
}
return false;
}
void KOListViewListView::contentsMouseDoubleClickEvent(QMouseEvent *e)
{
if (!e) return;
QPoint vp = contentsToViewport(e->pos());
- QListViewItem *item = itemAt(vp);
+ Q3ListViewItem *item = itemAt(vp);
if (!item) {
emit newEvent();
return;
}
KListView::contentsMouseDoubleClickEvent(e);
}
#if 0
void KOListViewListView::contentsMousePressEvent(QMouseEvent *e)
{
//qDebug("contentsMousePressEvent++++ ");
KListView::contentsMousePressEvent( e );
- if ( e->button() == RightButton ) {
- QListViewItem* ci = currentItem();
+ if ( e->button() == Qt::RightButton ) {
+ Q3ListViewItem* ci = currentItem();
clearSelection () ;
if ( ci )
ci->setSelected( true );
}
}
void KOListViewListView::contentsMouseReleaseEvent(QMouseEvent *e)
@@ -1345,28 +1354,28 @@ void KOListViewListView::contentsMouseMoveEvent(QMouseEvent *e)
KListView::contentsMouseMoveEvent(e);
}
#endif
void KOListViewListView::popupMenu()
{
mPopupTimer->stop();
- QMouseEvent* e = new QMouseEvent( QEvent::MouseButtonPress, mEventPos ,mEventGlobalPos, RightButton , RightButton );
+ QMouseEvent* e = new QMouseEvent( QEvent::MouseButtonPress, mEventPos ,mEventGlobalPos, Qt::RightButton , Qt::RightButton );
QApplication::postEvent( this->viewport(), e );
}
void KOListViewListView::contentsMousePressEvent(QMouseEvent *e)
{
//qDebug("contentsMousePressEvent++++ %d %d", e->pos().y(), e->globalPos().y());
mYMousePos = mapToGlobal( (e->pos())).y();
- if ( e->button() == LeftButton ) {
+ if ( e->button() == Qt::LeftButton ) {
mPopupTimer->start( 600 );
mEventPos = contentsToViewport(e->pos());
mEventGlobalPos = e->globalPos();
}
KListView::contentsMousePressEvent( e );
- if ( e->button() == RightButton ) {
- QListViewItem* ci = currentItem();
+ if ( e->button() == Qt::RightButton ) {
+ Q3ListViewItem* ci = currentItem();
//clearSelection();
if ( ci )
ci->setSelected( true );
}
}
void KOListViewListView::contentsMouseReleaseEvent(QMouseEvent *e)
@@ -1387,13 +1396,13 @@ void KOListViewListView::contentsMouseMoveEvent(QMouseEvent *e)
mEventGlobalPos = e->globalPos();
}
KListView::contentsMouseMoveEvent(e);
}
#define protected public
-#include <qheader.h>
+#include <q3header.h>
#undef protected
void KOListViewListView::printList()
{
#ifdef DESKTOP_VERSION
KOPrintPrefs pp ( this );
if (!pp.exec() )
@@ -1404,13 +1413,13 @@ void KOListViewListView::printList()
if (!printer.setup() )
return;
clearSelection ();
QPainter p;
p.begin ( &printer );
p.setFont(font());
- QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer );
+ Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer );
float dx, dy;
int wid = (m.width() * 9)/10;
dx = (float) wid/(float)contentsWidth ();
dy = (float)(m.height()) / (float)contentsHeight ();
float scale;
// scale to fit the width or height of the paper
@@ -1440,13 +1449,13 @@ void KOListViewListView::printList()
int yOff = 0;
while ( item ) {
p.translate( 0, yOff );
p.save();
for ( iii = 0; iii < cou; ++iii ) {
int align = columnAlignment( iii );
- if ( align == AlignAuto ) align = AlignLeft;
+ if ( align == Qt::AlignLeft ) align = Qt::AlignLeft;
p.restore();
p.save();
p.translate( header()->sectionPos( iii ), 0);
item->paintCell( &p, cg, iii, header()->sectionSize (iii), align );
}
yOff = item->height();
diff --git a/korganizer/kolistview.h b/korganizer/kolistview.h
index 99d0561..9fb0b00 100644
--- a/korganizer/kolistview.h
+++ b/korganizer/kolistview.h
@@ -21,15 +21,21 @@
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#ifndef _KOLISTVIEW_H
#define _KOLISTVIEW_H
-#include <qlistview.h>
+#include <q3listview.h>
#include <qmap.h>
-#include <qdict.h>
+#include <q3dict.h>
+//Added by qt3to4:
+#include <QMouseEvent>
+#include <Q3PtrList>
+#include <Q3PopupMenu>
+#include <QKeyEvent>
+#include <Q3VBoxLayout>
#include <klistview.h>
#include <libkcal/incidence.h>
#include "koeventview.h"
@@ -44,26 +50,26 @@ class KOListViewWhatsThis;
#include <qdialog.h>
#include <qtimer.h>
#include <qcombobox.h>
#include <qspinbox.h>
#include <qtooltip.h>
#include <qcheckbox.h>
-#include <qhbox.h>
+#include <q3hbox.h>
#include <qlabel.h>
#include <kiconloader.h>
#include "kfiledialog.h"
#include "koprefs.h"
class KOAlarmPrefs : public QDialog
{
Q_OBJECT
public:
KOAlarmPrefs( QWidget *par=0, const char *name=0 ) :
QDialog( par, name, true )
{
setCaption( i18n("Alarm Options") );
- QVBoxLayout* alarmLayout = new QVBoxLayout( this );
+ Q3VBoxLayout* alarmLayout = new Q3VBoxLayout( this );
alarmLayout->setSpacing( 3 );
alarmLayout->setMargin( 3 );
QWidget *parent = this;
mAlarmButton = new QCheckBox(i18n("Set reminder ON with offset to:"),parent);
alarmLayout->addWidget(mAlarmButton);
mAlarmTimeEdit = new QSpinBox ( 0, 9999, 1, parent, "mAlarmTimeEdit " ) ;
@@ -71,13 +77,13 @@ class KOAlarmPrefs : public QDialog
alarmLayout->addWidget(mAlarmTimeEdit);
mAlarmIncrCombo = new QComboBox(false, parent);
mAlarmIncrCombo->insertItem(i18n("minute(s)"));
mAlarmIncrCombo->insertItem(i18n("hour(s)"));
mAlarmIncrCombo->insertItem(i18n("day(s)"));
alarmLayout->addWidget(mAlarmIncrCombo);
- QHBox * hb = new QHBox ( parent );
+ Q3HBox * hb = new Q3HBox ( parent );
alarmLayout->addWidget(hb);
mAlarmSoundButton = new QPushButton(hb);
mAlarmSoundButton->setPixmap(SmallIcon("playsound"));
mAlarmSoundButton->setToggleButton(true);
connect(mAlarmSoundButton, SIGNAL(clicked()), SLOT(pickAlarmSound()));
mAlarmProgramButton = new QPushButton(hb);
@@ -207,13 +213,13 @@ class KOListView;
class KOListViewListView : public KListView
{
Q_OBJECT
public:
KOListViewListView(KOListView * lv );
- bool hasMultiSelection(QListViewItem*);
+ bool hasMultiSelection(Q3ListViewItem*);
void printList();
signals:
void newEvent();
void showIncidence( Incidence* );
public slots:
void popupMenu();
@@ -237,42 +243,42 @@ class KOListView : public KOEventView
KOListView(Calendar *calendar, QWidget *parent = 0,
const char *name = 0);
~KOListView();
virtual int maxDatesHint();
virtual int currentDateCount();
- virtual QPtrList<Incidence> selectedIncidences();
+ virtual Q3PtrList<Incidence> selectedIncidences();
virtual DateList selectedDates();
void showDates(bool show);
Incidence* currentItem();
- void addTodos(QPtrList<Todo> eventList);
- void addJournals(QPtrList<Journal> eventList);
+ void addTodos(Q3PtrList<Todo> eventList);
+ void addJournals(Q3PtrList<Journal> eventList);
virtual void printPreview(CalPrinter *calPrinter,
const QDate &, const QDate &);
void readSettings(KConfig *config, QString setting = "KOListView Layout");
void writeSettings(KConfig *config, QString setting = "KOListView Layout");
void updateList();
void clearList();
void setStartDate(const QDate &start);
int count();
QString getWhatsThisText(QPoint p);
- QPtrList<Incidence> KOListView::getSelectedIncidences( bool includeEvents = true, bool includeTodos = true , bool includeJournals = true, bool onlyDueTodos = false );
+ Q3PtrList<Incidence> getSelectedIncidences( bool includeEvents = true, bool includeTodos = true , bool includeJournals = true, bool onlyDueTodos = false );
void showCompletedTodos();
signals:
void signalNewEvent();
- void beamIncidenceList(QPtrList<Incidence>);
+ void beamIncidenceList(Q3PtrList<Incidence>);
public slots:
void hideAll();
void printList();
void resetFocus();
virtual void updateView();
virtual void showDates(const QDate &start, const QDate &end);
- virtual void showEvents(QPtrList<Event> eventList);
+ virtual void showEvents(Q3PtrList<Event> eventList);
void clearSelection();
void allSelection();
void clear();
void showDates();
void hideDates();
@@ -284,34 +290,34 @@ class KOListView : public KOEventView
void updateConfig();
void setCat();
void setAlarm();
void setCategories( bool removeOld );
void changeEventDisplay(Event *, int);
- void defaultItemAction(QListViewItem *item);
- void popupMenu(QListViewItem *item,const QPoint &,int);
+ void defaultItemAction(Q3ListViewItem *item);
+ void popupMenu(Q3ListViewItem *item,const QPoint &,int);
void setCalendar( int c );
void populateCalPopup();
protected slots:
- void processSelectionChange(QListViewItem *);
+ void processSelectionChange(Q3ListViewItem *);
void catChanged( Incidence* );
protected:
void writeToFile( bool iCal );
- void addEvents(QPtrList<Event> eventList);
+ void addEvents(Q3PtrList<Event> eventList);
void addIncidence(Incidence *);
KOListViewItem *getItemForEvent(Incidence *event);
private:
bool mForceShowCompletedTodos;
- QPopupMenu* mCalPopup;
+ Q3PopupMenu* mCalPopup;
KOListViewWhatsThis *mKOListViewWhatsThis;
KOListViewListView *mListView;
KOEventPopupMenu *mPopupMenu;
KOListViewItem *mActiveItem;
- QDict<Incidence> mUidDict;
+ Q3Dict<Incidence> mUidDict;
QDate mStartDate;
void keyPressEvent ( QKeyEvent * ) ;
};
#endif
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 85e9166..ca55c43 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -14,28 +14,40 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include <qpopupmenu.h>
+#include <q3popupmenu.h>
#include <qfont.h>
#include <qfontmetrics.h>
-#include <qkeycode.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qwidgetstack.h>
+#include <qnamespace.h>
+#include <q3hbox.h>
+#include <q3vbox.h>
+#include <q3widgetstack.h>
#include <qpushbutton.h>
#include <qtooltip.h>
#include <qpainter.h>
#include <qtimer.h>
-#include <qwhatsthis.h>
+#include <q3whatsthis.h>
#ifndef DESKTOP_VERSION
#include <qpe/qpeapplication.h>
#else
#include <qapplication.h>
+#include <QDesktopWidget>
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <QLabel>
+#include <QPixmap>
+#include <QFocusEvent>
+#include <QMouseEvent>
+#include <QKeyEvent>
+#include <Q3VBoxLayout>
+#include <Q3Frame>
+#include <Q3PointArray>
+#include <Q3PtrList>
#endif
#include <kdebug.h>
#include <klocale.h>
#include <kglobal.h>
#include <kconfig.h>
@@ -56,16 +68,16 @@
#include "komonthview.h"
#define PIXMAP_SIZE 5
#ifdef DESKTOP_VERSION
QToolTipGroup *MonthViewCell::mToolTipGroup = 0;
#endif
-class KNOWhatsThis :public QWhatsThis
+class KNOWhatsThis :public Q3WhatsThis
{
public:
- KNOWhatsThis( KNoScrollListBox* sbox ) : QWhatsThis( sbox ), _wid( sbox) { };
+ KNOWhatsThis( KNoScrollListBox* sbox ) : Q3WhatsThis( sbox ), _wid( sbox) { };
//~KNOWhatsThis( ) {qDebug("~KNOWhatsThis( ) "); };
protected:
virtual QString text( const QPoint& p)
{
return _wid->getWhatsThisText(p) ;
@@ -74,22 +86,22 @@ private:
KNoScrollListBox* _wid;
};
KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name)
- : QListBox(parent, name, WRepaintNoErase)
+ : Q3ListBox(parent, name, Qt::WNoAutoErase)
{
#ifndef DESKTOP_VERSION
QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold );
#endif
mBlockDeselect = false;
mWT = new KNOWhatsThis(this);
resetOnFocusIn = true;
- setVScrollBarMode(QScrollView::AlwaysOff);
- setHScrollBarMode(QScrollView::AlwaysOff);
+ setVScrollBarMode(Q3ScrollView::AlwaysOff);
+ setHScrollBarMode(Q3ScrollView::AlwaysOff);
}
KNoScrollListBox::~KNoScrollListBox()
{
#if QT_VERSION >= 0x030000
#else
@@ -97,94 +109,94 @@ KNoScrollListBox::~KNoScrollListBox()
#endif
}
void KNoScrollListBox::focusInEvent ( QFocusEvent * e )
{
- QListBox::focusInEvent ( e );
+ Q3ListBox::focusInEvent ( e );
if ( count() ){
int ci = currentItem();
if ( ci < 0 ) ci = 0;
setCurrentItem( ci );
setSelected ( ci, true );
emit highlighted( item ( ci ) );
resetOnFocusIn = true;
if ( KOPrefs::instance()->mEnableMonthScroll || KOPrefs::instance()->mMonthViewWeek ) {
- QListBoxItem *fi = firstItem ();
+ Q3ListBoxItem *fi = firstItem ();
if (fi ) {
int ihei = fi->height( this );
int hei = numRows () * ihei;
if ( hei < height() - horizontalScrollBar()->height () ) {
- setVScrollBarMode(QScrollView::AlwaysOff);
+ setVScrollBarMode(Q3ScrollView::AlwaysOff);
}
else
- setVScrollBarMode(QScrollView::Auto);
+ setVScrollBarMode(Q3ScrollView::Auto);
if ( ihei *3 > height() ) {
- setHScrollBarMode(QScrollView::AlwaysOff);
+ setHScrollBarMode(Q3ScrollView::AlwaysOff);
}
else {
- setHScrollBarMode(QScrollView::Auto);
+ setHScrollBarMode(Q3ScrollView::Auto);
}
} else {
- setVScrollBarMode(QScrollView::Auto);
- setHScrollBarMode(QScrollView::Auto);
+ setVScrollBarMode(Q3ScrollView::Auto);
+ setHScrollBarMode(Q3ScrollView::Auto);
}
}
}
}
void KNoScrollListBox::focusOutEvent ( QFocusEvent * e )
{
if ( ! mBlockDeselect ) {
int i = currentItem ();
if ( i >= 0 ) {
setSelected ( i, false );
}
- QListBox::focusOutEvent ( e );
+ Q3ListBox::focusOutEvent ( e );
}
- setVScrollBarMode(QScrollView::AlwaysOff);
- setHScrollBarMode(QScrollView::AlwaysOff);
+ setVScrollBarMode(Q3ScrollView::AlwaysOff);
+ setHScrollBarMode(Q3ScrollView::AlwaysOff);
if ( ! mBlockDeselect )
emit highlightIncidence( 0, (MonthViewCell*)this, 0 );
mBlockDeselect = false;
}
QString KNoScrollListBox::getWhatsThisText(QPoint p)
{
- QListBoxItem* item = itemAt ( p );
+ Q3ListBoxItem* item = itemAt ( p );
if ( ! item ) {
return i18n("Click in the cell\nto add an event!");
}
return KIncidenceFormatter::instance()->getFormattedText(((MonthViewItem*) item)->incidence(),
KOPrefs::instance()->mWTshowDetails,
KOPrefs::instance()->mWTshowCreated,
KOPrefs::instance()->mWTshowChanged);
}
void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
{
//qDebug("KNoScrollListBox::keyPressEvent ");
switch(e->key()) {
- case Key_Right:
+ case Qt::Key_Right:
if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
{
e->ignore();
return;
}
scrollBy(10,0);
break;
- case Key_Left:
+ case Qt::Key_Left:
if (e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
{
e->ignore();
return;
}
scrollBy(-10,0);
break;
- case Key_Up:
+ case Qt::Key_Up:
if( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton) {
e->ignore();
break;
}
if ( count() ) {
if ( currentItem() == 0 ) {
@@ -198,13 +210,13 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
setTopItem(topItem()-1);
}
}
}
}
break;
- case Key_Down:
+ case Qt::Key_Down:
if(e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton) {
e->ignore();
break;
}
if ( count () ) {
if ( ((uint)currentItem()+1) == count () ) {
@@ -218,28 +230,28 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
setTopItem(topItem()+1);
}
}
}
}
break;
- case Key_I:
+ case Qt::Key_I:
QTimer::singleShot( 1, this, SLOT ( oneDown() ) );
e->ignore();
break;
- case Key_Return:
- case Key_Enter:
+ case Qt::Key_Return:
+ case Qt::Key_Enter:
{
if ( currentItem() >= 0 ) {
emit doubleClicked( item( currentItem() ) );
e->accept();
} else {
e->ignore();
}
}
break;
- case Key_Shift:
+ case Qt::Key_Shift:
emit shiftDown();
break;
default:
e->ignore();
break;
}
@@ -263,31 +275,31 @@ void KNoScrollListBox::oneDown()
}
}
}
void KNoScrollListBox::keyReleaseEvent(QKeyEvent *e)
{
switch(e->key()) {
- case Key_Shift:
+ case Qt::Key_Shift:
emit shiftUp();
break;
default:
break;
}
}
void KNoScrollListBox::mousePressEvent(QMouseEvent *e)
{
- QListBox::mousePressEvent(e);
+ Q3ListBox::mousePressEvent(e);
- if(e->button() == RightButton) {
+ if(e->button() == Qt::RightButton) {
emit rightClick();
}
}
MonthViewItem::MonthViewItem( Incidence *incidence, const QString & s)
- : QListBoxItem()
+ : Q3ListBoxItem()
{
mblockRepaint = true;
isWeekItem = KOPrefs::instance()->mMonthViewWeek;
recycle( incidence, s );
}
void MonthViewItem::recycle( Incidence *incidence, const QString & s)
@@ -392,20 +404,20 @@ void MonthViewItem::paint(QPainter *p)
if ( mMultiday ) {
int yyy = y+(size/2);
int sizeM = size+2;
p->setBrush( QBrush( textColor ) );
p->drawLine ( x+1, yyy, x +sizeM +sizeM/2-1, yyy ) ;
if ( mMultiday == 2 || mMultiday == 3 ) {
- QPointArray pa ( 3 );
+ Q3PointArray pa ( 3 );
pa.setPoint (0, x, yyy );
pa.setPoint (1, x+sizeM/2, yyy+sizeM/2 );
pa.setPoint (2, x+sizeM/2, yyy-sizeM/2 );
p->drawPolygon( pa );
}
if ( mMultiday == 2 || mMultiday == 1 ) {
- QPointArray pa ( 3 );
+ Q3PointArray pa ( 3 );
pa.setPoint (0, x+sizeM +sizeM/2, yyy );
pa.setPoint (1, x+sizeM, yyy+sizeM/2 );
pa.setPoint (2, x+sizeM, yyy-sizeM/2 );
p->drawPolygon( pa );
}
if ( mMultiday == 1 ) {
@@ -459,21 +471,21 @@ void MonthViewItem::paint(QPainter *p)
int wid = fm.width( pText );
p->drawLine( x, heihei/2 ,x+wid, heihei/2 );
}
}
}
-int MonthViewItem::height(const QListBox *lb) const
+int MonthViewItem::height(const Q3ListBox *lb) const
{
int ret = 10;
if ( lb )
ret = lb->fontMetrics().lineSpacing()+1;
return ret;
}
-int MonthViewItem::width(const QListBox *lb) const
+int MonthViewItem::width(const Q3ListBox *lb) const
{
if( KOPrefs::instance()->mEnableMonthScroll || isWeekItem ) {
int size = PIXMAP_SIZE;
if ( QApplication::desktop()->width() < 300 )
size = 3;
int x = 1;
@@ -511,44 +523,44 @@ MonthViewCell::MonthViewCell( KOMonthView *parent,QWidget* par )
// mLabel = new QLabel( this );QPushButton
mLabel = new QPushButton( this );
//mLabel->setFrameStyle( QFrame::Panel | QFrame::Plain );
//mLabel->setLineWidth( 1 );
//mLabel->setAlignment( AlignCenter );
mLabel->setFlat( true );
- mLabel->setFocusPolicy(NoFocus);
+ mLabel->setFocusPolicy(Qt::NoFocus);
//mItemList = new KNoScrollListBox( this );
setMinimumSize( 10, 10 );
- setFrameStyle( QFrame::Panel | QFrame::Plain );
+ setFrameStyle( Q3Frame::Panel | Q3Frame::Plain );
setLineWidth( 1 );
//topLayout->addWidget( mItemList );
mLabel->raise();
// QColor( 0,0,255 ) QColor( 160,1600,255 )
mStandardPalette = palette();
mStandardPalette.setColor(QColorGroup::Base, mStandardPalette.color( QPalette::Normal, QColorGroup::Background ) );
enableScrollBars( false );
updateConfig();
//connect( mLabel, SIGNAL( clicked( )), SLOT( newEvent() ));
connect( mLabel, SIGNAL( clicked( )), SLOT( showDay() ));
- connect( this , SIGNAL( doubleClicked( QListBoxItem *) ),
- SLOT( defaultAction( QListBoxItem * ) ) );
- connect( this, SIGNAL( rightButtonPressed( QListBoxItem *,
+ connect( this , SIGNAL( doubleClicked( Q3ListBoxItem *) ),
+ SLOT( defaultAction( Q3ListBoxItem * ) ) );
+ connect( this, SIGNAL( rightButtonPressed( Q3ListBoxItem *,
const QPoint &) ),
- SLOT( contextMenu( QListBoxItem * ) ) );
- connect( this, SIGNAL( highlighted( QListBoxItem *) ),
- SLOT( selection( QListBoxItem * ) ) );
+ SLOT( contextMenu( Q3ListBoxItem * ) ) );
+ connect( this, SIGNAL( highlighted( Q3ListBoxItem *) ),
+ SLOT( selection( Q3ListBoxItem * ) ) );
/*
connect( this, SIGNAL( clicked( QListBoxItem * ) ),
SLOT( selection( QListBoxItem * ) ) );
*/
}
#ifdef DESKTOP_VERSION
QToolTipGroup *MonthViewCell::toolTipGroup()
{
- if (!mToolTipGroup) mToolTipGroup = new QToolTipGroup(0);
+ /* TODO:hacker: if (!mToolTipGroup) mToolTipGroup = new QToolTipGroup(0); */
return mToolTipGroup;
}
#endif
void MonthViewCell::setDate( const QDate &date )
{
@@ -634,13 +646,13 @@ void MonthViewCell::setHoliday( const QString &holiday )
}
void MonthViewCell::startUpdateCell()
{
blockSignals( true );
mdayCount = 0;
- setFocusPolicy(NoFocus);
+ setFocusPolicy(Qt::NoFocus);
if ( !mMonthView->isUpdatePossible() )
return;
MonthViewItem *mitem = (MonthViewItem*) firstItem ();
while ( mitem ) {
mitem->setBlockRepaint( true );
mitem = (MonthViewItem *)mitem->next();
@@ -689,13 +701,13 @@ int MonthViewCell::insertEvent(Event *event)
{
bool useToolTips = true;
#ifndef DESKTOP_VERSION
useToolTips = false;
#endif
QString mToolTipText;
- setFocusPolicy(WheelFocus);
+ setFocusPolicy(Qt::WheelFocus);
if ( !(event->doesRecur() == Recurrence::rNone) ) {
if ( !KOPrefs::instance()->mMonthDailyRecur && event->doesRecur() == Recurrence::rDaily )
return mdayCount;
else
if ( !KOPrefs::instance()->mMonthWeeklyRecur && event->doesRecur() == Recurrence::rWeekly )
return mdayCount;
@@ -831,13 +843,13 @@ int MonthViewCell::insertEvent(Event *event)
if ( itcount > 1000 ) {
qDebug("KO: Bug in MonthViewCell::insertEvent %u ", itcount);
itcount = 0;
}
for ( i = pos; i < itcount;++i ) {
// qDebug("i %d mday %u count %d ",i,itcount,mdayCount );
- QListBoxItem* it = this->item ( i );
+ Q3ListBoxItem* it = this->item ( i );
if ( it && text < it->text() ) {
pos = i;
break;
}
++pos;
}
@@ -847,13 +859,13 @@ int MonthViewCell::insertEvent(Event *event)
mToolTip.append( mToolTipText );
}
return mdayCount;
}
void MonthViewCell::insertTodo(Todo *todo)
{
- setFocusPolicy(WheelFocus);
+ setFocusPolicy(Qt::WheelFocus);
QString text;
if (todo->hasDueDate()) {
if (!todo->doesFloat()) {
text += KGlobal::locale()->formatTime(todo->dtDue().time());
text += " ";
}
@@ -919,13 +931,13 @@ void MonthViewCell::finishUpdateCell()
#ifdef DESKTOP_VERSION
if (mToolTip.count() > 0 ) {
mToolTip.sort();
- QToolTip::add(this,mToolTip.join("\n"),toolTipGroup(),"");
+ /* TODO: hacker: QToolTip::add(this,mToolTip.join("\n"),toolTipGroup(),""); */
}
#endif
//sort();
//setMyPalette();
setMyPalette();
@@ -935,19 +947,19 @@ void MonthViewCell::finishUpdateCell()
void MonthViewCell::updateCell()
{
if ( !mMonthView->isUpdatePossible() )
return;
startUpdateCell();
//mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2);
- QPtrList<Event> events = mMonthView->calendar()->events( mDate, true );
+ Q3PtrList<Event> events = mMonthView->calendar()->events( mDate, true );
Event *event;
for( event = events.first(); event; event = events.next() ) { // for event
insertEvent(event);
}
// insert due todos
- QPtrList<Todo> todos = mMonthView->calendar()->todos( mDate );
+ Q3PtrList<Todo> todos = mMonthView->calendar()->todos( mDate );
Todo *todo;
for(todo = todos.first(); todo; todo = todos.next()) {
insertTodo( todo );
}
finishUpdateCell();
// if ( isVisible())
@@ -989,34 +1001,34 @@ void MonthViewCell::updateConfig( bool bigFont ) // = false
void MonthViewCell::enableScrollBars( bool enabled )
{
return;
if ( enabled ) {
- QListBoxItem *fi = firstItem ();
+ Q3ListBoxItem *fi = firstItem ();
if (fi ) {
int ihei = fi->height( this );
int hei = numRows () * ihei;
if ( hei < height() - horizontalScrollBar()->height () ) {
- setVScrollBarMode(QScrollView::AlwaysOff);
+ setVScrollBarMode(Q3ScrollView::AlwaysOff);
}
else
- setVScrollBarMode(QScrollView::Auto);
+ setVScrollBarMode(Q3ScrollView::Auto);
if ( ihei *3 > height() ) {
- setHScrollBarMode(QScrollView::AlwaysOff);
+ setHScrollBarMode(Q3ScrollView::AlwaysOff);
}
else {
- setHScrollBarMode(QScrollView::Auto);
+ setHScrollBarMode(Q3ScrollView::Auto);
}
} else {
- setVScrollBarMode(QScrollView::Auto);
- setHScrollBarMode(QScrollView::Auto);
+ setVScrollBarMode(Q3ScrollView::Auto);
+ setHScrollBarMode(Q3ScrollView::Auto);
}
} else {
- setVScrollBarMode(QScrollView::AlwaysOff);
- setHScrollBarMode(QScrollView::AlwaysOff);
+ setVScrollBarMode(Q3ScrollView::AlwaysOff);
+ setHScrollBarMode(Q3ScrollView::AlwaysOff);
}
}
Incidence *MonthViewCell::selectedIncidence()
{
int index = currentItem();
@@ -1080,13 +1092,13 @@ void MonthViewCell::resizeEvent ( QResizeEvent * e )
//mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2);
// mItemList->resize ( width(), height () );
if ( e )
KNoScrollListBox::resizeEvent ( e );
}
-void MonthViewCell::defaultAction( QListBoxItem *item )
+void MonthViewCell::defaultAction( Q3ListBoxItem *item )
{
if ( !item ) {
QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) );
emit newEventSignal( dt );
return;
@@ -1102,24 +1114,24 @@ void MonthViewCell::showDay()
}
void MonthViewCell::newEvent()
{
QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) );
emit newEventSignal( dt );
}
-void MonthViewCell::cellClicked( QListBoxItem *item )
+void MonthViewCell::cellClicked( Q3ListBoxItem *item )
{
mMonthView->setSelectedCell( this );
if ( item == 0 ) {
QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) );
emit newEventSignal( dt );
return;
}
}
-void MonthViewCell::contextMenu( QListBoxItem *item )
+void MonthViewCell::contextMenu( Q3ListBoxItem *item )
{
mMonthView->setPopupCell( this );
if ( !item ) {
mMonthView->showContextMenu( 0 );
return;
}
@@ -1130,13 +1142,13 @@ void MonthViewCell::contextMenu( QListBoxItem *item )
if ( incidence ) {
mBlockDeselect = true;
mMonthView->showContextMenu( incidence );
}
}
-void MonthViewCell::selection( QListBoxItem *item )
+void MonthViewCell::selection( Q3ListBoxItem *item )
{
if ( !item ) {
emit highlightIncidence( 0 , this, 0 );
return;
}
MonthViewItem * it = (static_cast<MonthViewItem *>( item ));
@@ -1182,14 +1194,14 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
mShortDayLabelsM = false;
mShortDayLabelsW = false;
skipResize = false;
clPending = true;
mPopupCell = 0;
mNavigatorBar = new NavigatorBar( QDate::currentDate(), this, "useBigPixmaps" );
- mWidStack = new QWidgetStack( this );
- QVBoxLayout* hb = new QVBoxLayout( this );
+ mWidStack = new Q3WidgetStack( this );
+ Q3VBoxLayout* hb = new Q3VBoxLayout( this );
mMonthView = new QWidget( mWidStack );
mWeekView = new QWidget( mWidStack );
#if QT_VERSION >= 0x030000
mWidStack->addWidget(mMonthView );
mWidStack->addWidget(mWeekView );
#else
@@ -1212,57 +1224,57 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
bfont.setBold( true );
int i;
for( i = 0; i < mDaysPerWeek; i++ ) {
QLabel *label = new QLabel( mMonthView );
label->setFont(bfont);
- label->setFrameStyle(QFrame::Panel|QFrame::Raised);
+ label->setFrameStyle(Q3Frame::Panel|Q3Frame::Raised);
label->setLineWidth(1);
- label->setAlignment(AlignCenter);
+ label->setAlignment(Qt::AlignCenter);
mDayLabels.insert( i, label );
label = new QLabel( mWeekView );
label->setFont(bfont);
- label->setFrameStyle(QFrame::Panel|QFrame::Raised);
+ label->setFrameStyle(Q3Frame::Panel|Q3Frame::Raised);
label->setLineWidth(1);
- label->setAlignment(AlignCenter);
+ label->setAlignment(Qt::AlignCenter);
mDayLabelsW.insert( i, label );
}
bfont.setBold( false );
mWeekLabels.resize( mNumWeeks+1 );
mWeekLabelsW.resize( 2 );
for( i = 0; i < mNumWeeks+1; i++ ) {
KOWeekButton *label = new KOWeekButton( mMonthView );
- label->setFocusPolicy(NoFocus);
+ label->setFocusPolicy(Qt::NoFocus);
label->setFont(bfont);
connect( label, SIGNAL( selectWeekNum ( int )),this, SLOT( selectInternalWeekNum ( int )) );
label->setFlat(true);
- QWhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed"));
+ Q3WhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed"));
//label->setFrameStyle(QFrame::Panel|QFrame::Raised);
//label->setLineWidth(1);
//label->setAlignment(AlignCenter);
mWeekLabels.insert( i, label );
}
mWeekLabels[mNumWeeks]->setText( i18n("W"));
- mWeekLabels[mNumWeeks]->setFocusPolicy(WheelFocus);
- QWhatsThis::add(mWeekLabels[mNumWeeks],i18n("Click on this to\nselect week number"));
+ mWeekLabels[mNumWeeks]->setFocusPolicy(Qt::WheelFocus);
+ Q3WhatsThis::add(mWeekLabels[mNumWeeks],i18n("Click on this to\nselect week number"));
for( i = 0; i < 1+1; i++ ) {
KOWeekButton *label = new KOWeekButton( mWeekView );
- label->setFocusPolicy(NoFocus);
+ label->setFocusPolicy(Qt::NoFocus);
label->setFont(bfont);
connect( label, SIGNAL( selectWeekNum ( int )),this, SLOT( selectInternalWeekNum ( int )) );
label->setFlat(true);
- QWhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed"));
+ Q3WhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed"));
//label->setFrameStyle(QFrame::Panel|QFrame::Raised);
//label->setLineWidth(1);
//label->setAlignment(AlignCenter);
mWeekLabelsW.insert( i, label );
}
mWeekLabelsW[1]->setText( i18n("W"));
- mWeekLabelsW[1]->setFocusPolicy(WheelFocus);
+ mWeekLabelsW[1]->setFocusPolicy(Qt::WheelFocus);
int row, col;
mCells.resize( mNumCells );
for( row = 0; row < mNumWeeks; ++row ) {
for( col = 0; col < mDaysPerWeek; ++col ) {
@@ -1302,19 +1314,19 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
SLOT( incidenceHighlighted( Incidence *, MonthViewCell *, int ) ));
cell->updateConfig(KOPrefs::instance()->mMonthViewUsesBigFont );
}
//connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), SLOT( switchView() ) );
mContextMenu = eventPopup();
- mContextMenu->addAdditionalItem(QIconSet(QPixmap()),
+ mContextMenu->addAdditionalItem(QIcon(QPixmap()),
i18n("New Event..."),this,
SLOT(slotNewEvent()),false);
- mContextMenu->addAdditionalItem(QIconSet(QPixmap()),
+ mContextMenu->addAdditionalItem(QIcon(QPixmap()),
i18n("New Todo..."),this,
SLOT(slotNewTodo()),false);
- mContextMenu->addAdditionalItem(QIconSet(QPixmap()),
+ mContextMenu->addAdditionalItem(QIcon(QPixmap()),
i18n("Journal"),this,
SLOT(slotEditJournal()),false);
connect (mContextMenu ,SIGNAL(categoryChanged( Incidence * )),this,
SLOT( catChanged( Incidence * ) ));
@@ -1322,13 +1334,13 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
QString pathString = "";
if ( !KOPrefs::instance()->mToolBarMiniIcons ) {
if ( QApplication::desktop()->width() < 480 )
pathString += "icons16/";
} else
pathString += "iconsmini/";
- mNewItemMenu = new QPopupMenu( this );
+ mNewItemMenu = new Q3PopupMenu( this );
mNewItemMenu->insertItem( SmallIcon( pathString +"newevent" ), i18n("New Event..."),this, SLOT(slotNewEvent()));
mNewItemMenu->insertItem( SmallIcon( pathString +"newtodo" ),i18n("New Todo..."),this,SLOT(slotNewTodo()),false);
mNewItemMenu->insertItem( SmallIcon( pathString +"journal" ),i18n("Journal"),this,SLOT(slotEditJournal()),false);
// updateConfig(); //useless here...
// ... but we need mWidthLongDayLabel computed
@@ -1394,13 +1406,13 @@ void KOMonthView::incidenceHighlighted( Incidence * inc , MonthViewCell* mc, int
if ( mCellsW[i] == mc ) {
weekview = true;
index = i;
break;
}
}
- QPtrVector<MonthViewCell> *cells;
+ Q3PtrVector<MonthViewCell> *cells;
if ( weekview )
cells = &mCellsW;
else {
for (uint i = 0; i < mCells.count(); ++i) {
if ( mCells[i] == mc ) {
index = i;
@@ -1492,15 +1504,15 @@ int KOMonthView::maxDatesHint()
int KOMonthView::currentDateCount()
{
return mNumCells;
}
-QPtrList<Incidence> KOMonthView::selectedIncidences()
+Q3PtrList<Incidence> KOMonthView::selectedIncidences()
{
- QPtrList<Incidence> selected;
+ Q3PtrList<Incidence> selected;
if ( mSelectedCell ) {
Incidence *incidence = mSelectedCell->selectedIncidence();
if ( incidence ) selected.append( incidence );
}
@@ -1558,21 +1570,21 @@ void KOMonthView::updateConfig()
}
for (uint i = 0; i < mCellsW.count(); ++i) {
mCellsW[i]->updateConfig(KOPrefs::instance()->mMonthViewUsesBigFont);
}
#ifdef DESKTOP_VERSION
- MonthViewCell::toolTipGroup()->setEnabled(KOPrefs::instance()->mEnableToolTips);
+ /* TODO:hacker: MonthViewCell::toolTipGroup()->setEnabled(KOPrefs::instance()->mEnableToolTips); */
#endif
updateView();
}
void KOMonthView::updateDayLabels()
{
- QPtrVector<QLabel> *mDayLabelsT;
+ Q3PtrVector<QLabel> *mDayLabelsT;
mDayLabelsT = &mDayLabelsW;
for (int i = 0; i < 7; i++) {
{
bool show = mShortDayLabelsW;
if ( i > 4 && mShowSatSunComp && mWidthLongDayLabel > (*mDayLabelsT)[i]->width() )
@@ -1607,15 +1619,15 @@ void KOMonthView::clearList()
}
}
void KOMonthView::showDates(const QDate &start, const QDate &)
{
// kdDebug() << "KOMonthView::showDates(): " << start.toString() << endl;
- QPtrVector<MonthViewCell> *cells;
- QPtrVector<QLabel> *dayLabels;
- QPtrVector<KOWeekButton> *weekLabels;
+ Q3PtrVector<MonthViewCell> *cells;
+ Q3PtrVector<QLabel> *dayLabels;
+ Q3PtrVector<KOWeekButton> *weekLabels;
uint weekNum = 6;
mStartDate = start;
if ( mShowWeekView ) {
weekNum = 1;
cells = &mCellsW;
dayLabels = &mDayLabelsW;
@@ -1665,13 +1677,13 @@ void KOMonthView::showDates(const QDate &start, const QDate &)
(*weekLabels)[i]->setWeekNum( wno );
date = date.addDays( 7 );
}
updateView();
}
-void KOMonthView::showEvents(QPtrList<Event>)
+void KOMonthView::showEvents(Q3PtrList<Event>)
{
qDebug("KOMonthView::selectEvents is not implemented yet. ");
}
void KOMonthView::changeEventDisplay(Event *, int)
{
@@ -1687,13 +1699,13 @@ void KOMonthView::updateView()
if ( !updatePossible )
return;
//qDebug("UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU ");
//QTime ti;
//ti.start();
clearSelection();
- QPtrVector<MonthViewCell> *cells;
+ Q3PtrVector<MonthViewCell> *cells;
if ( mShowWeekView ) {
cells = &mCellsW;
} else {
cells = &mCells;
}
#if 1
@@ -1702,13 +1714,13 @@ void KOMonthView::updateView()
if ( KOPrefs::instance()->mMonthViewWeek )
timeSpan = 6;
for( i = 0; i < timeSpan + 1; ++i ) {
(*cells)[i]->startUpdateCell();
}
- QPtrList<Event> events = calendar()->events();
+ Q3PtrList<Event> events = calendar()->events();
Event *event;
QDateTime dt;
QDate endDate = mStartDate.addDays( timeSpan );
for( event = events.first(); event; event = events.next() ) { // for event
if ( event->doesRecur() ) {
bool last;
@@ -1766,13 +1778,13 @@ void KOMonthView::updateView()
(*cells)[iii]->insertEvent( event );
}
}
}
}
// insert due todos
- QPtrList<Todo> todos = calendar()->todos( );
+ Q3PtrList<Todo> todos = calendar()->todos( );
Todo *todo;
for(todo = todos.first(); todo; todo = todos.next()) {
//insertTodo( todo );
if ( todo->hasDueDate() ) {
int day = mStartDate.daysTo( todo->dtDue().date() );
if ( day >= 0 && day < timeSpan + 1) {
@@ -2222,13 +2234,13 @@ void KOMonthView::setSelectedCell( MonthViewCell *cell )
else
emit incidenceSelected( mSelectedCell->selectedIncidence() );
}
void KOMonthView::processSelectionChange()
{
- QPtrList<Incidence> incidences = selectedIncidences();
+ Q3PtrList<Incidence> incidences = selectedIncidences();
if (incidences.count() > 0) {
emit incidenceSelected( incidences.first() );
} else {
emit incidenceSelected( 0 );
clearSelection();
}
@@ -2258,43 +2270,43 @@ void KOMonthView::keyPressEvent ( QKeyEvent * e )
e->accept();
return;
}
if (! e->isAutoRepeat() )
mFlagKeyPressed = true;
switch(e->key()) {
- case Key_Up:
+ case Qt::Key_Up:
{
if ( mShowWeekView ) {
emit selectWeekNum ( currentWeek() - 1 );
}
else {
emit prevMonth();
}
}
e->accept();
break;
- case Key_Down:
+ case Qt::Key_Down:
{
if ( mShowWeekView ) {
emit selectWeekNum ( currentWeek() +1);
}
else {
emit nextMonth();
}
}
e->accept();
break;
- case Key_Return:
- case Key_Enter:
+ case Qt::Key_Return:
+ case Qt::Key_Enter:
{
selectInternalWeekNum ( currentWeek() );
}
e->accept();
break;
- case Key_D:
+ case Qt::Key_D:
if ( mSelectedCell ) {
mSelectedCell->showDay();
e->accept();
} else {
e->ignore();
}
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index 1a9d16d..bca76e5 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -18,23 +18,30 @@
*/
#ifndef _KOMONTHVIEW_H
#define _KOMONTHVIEW_H
#include <qlabel.h>
-#include <qframe.h>
+#include <q3frame.h>
#include <qdatetime.h>
-#include <qlistbox.h>
+#include <q3listbox.h>
#include <qpoint.h>
-#include <qwidgetstack.h>
+#include <q3widgetstack.h>
#include <qlayout.h>
#include <qtimer.h>
-#include <qintdict.h>
+#include <q3intdict.h>
#include <qpushbutton.h>
-#include <qvaluelist.h>
-#include <qptrvector.h>
+#include <q3valuelist.h>
+#include <q3ptrvector.h>
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <QFocusEvent>
+#include <QMouseEvent>
+#include <Q3PtrList>
+#include <Q3PopupMenu>
+#include <QKeyEvent>
#include <libkcal/calendar.h>
#include <libkcal/event.h>
#include "koeventview.h"
#include "navigatorbar.h"
@@ -69,13 +76,13 @@ private:
}
private slots :
void bottonClicked() { if ( mNumber > 0 ) emit selectWeekNum ( mNumber ); }
};
-class KNoScrollListBox: public QListBox
+class KNoScrollListBox: public Q3ListBox
{
Q_OBJECT
public:
KNoScrollListBox(QWidget *parent=0, const char *name=0);
~KNoScrollListBox();
QString getWhatsThisText(QPoint p) ;
@@ -100,13 +107,13 @@ class KNoScrollListBox: public QListBox
private:
bool resetOnFocusIn;
KNOWhatsThis * mWT;
};
-class MonthViewItem: public QListBoxItem
+class MonthViewItem: public Q3ListBoxItem
{
public:
MonthViewItem( Incidence *,const QString & title );
void recycle( Incidence *incidence, const QString & s);
void setRecur(bool on) { mRecur = on; }
void setAlarm(bool on) { mAlarm = on; }
@@ -123,14 +130,14 @@ class MonthViewItem: public QListBoxItem
QPalette palette() const { return mPalette; }
bool setHighlightedFalse();
Incidence *incidence() const { return mIncidence; }
protected:
virtual void paint(QPainter *);
- virtual int height(const QListBox *) const;
- virtual int width(const QListBox *) const;
+ virtual int height(const Q3ListBox *) const;
+ virtual int width(const Q3ListBox *) const;
private:
int mdayPos;
bool isWeekItem;
bool mblockRepaint;
int mMultiday;
@@ -195,21 +202,21 @@ class MonthViewCell : public KNoScrollListBox
public slots:
void showDay();
void deHighLight();
void repaintfinishUpdateCell();
protected slots:
- void defaultAction( QListBoxItem * );
- void contextMenu( QListBoxItem * );
- void selection( QListBoxItem * );
- void cellClicked( QListBoxItem * );
+ void defaultAction( Q3ListBoxItem * );
+ void contextMenu( Q3ListBoxItem * );
+ void selection( Q3ListBoxItem * );
+ void cellClicked( Q3ListBoxItem * );
void newEvent();
private:
int mdayCount;
- QPtrList <MonthViewItem> mAvailItemList;
+ Q3PtrList <MonthViewItem> mAvailItemList;
KOMonthView *mMonthView;
int currentPalette;
QDate mDate;
bool mPrimary;
bool mHoliday;
@@ -244,13 +251,13 @@ class KOMonthView: public KOEventView
virtual int maxDatesHint();
/** Returns number of currently shown dates. */
virtual int currentDateCount();
/** returns the currently selected events */
- virtual QPtrList<Incidence> selectedIncidences();
+ virtual Q3PtrList<Incidence> selectedIncidences();
/** returns dates of the currently selected events */
virtual DateList selectedDates();
#if 0
virtual void printPreview(CalPrinter *calPrinter,
const QDate &, const QDate &);
@@ -266,13 +273,13 @@ class KOMonthView: public KOEventView
void incidenceHighlighted( Incidence *, MonthViewCell*, int );
void nextCell();
void prevCell();
virtual void updateView();
virtual void updateConfig();
virtual void showDates(const QDate &start, const QDate &end);
- virtual void showEvents(QPtrList<Event> eventList);
+ virtual void showEvents(Q3PtrList<Event> eventList);
void changeEventDisplay(Event *, int);
void clearSelection();
void showContextMenu( Incidence * );
@@ -308,13 +315,13 @@ class KOMonthView: public KOEventView
private:
int mKBFcounter;
QTimer* mComputeLayoutTimer;
NavigatorBar* mNavigatorBar;
int currentWeek();
bool clPending;
- QWidgetStack * mWidStack;
+ Q3WidgetStack * mWidStack;
QWidget* mMonthView;
QWidget* mWeekView;
bool mShowWeekView;
bool updatePossible;
int mDaysPerWeek;
int mNumWeeks;
@@ -322,30 +329,30 @@ class KOMonthView: public KOEventView
//bool mWeekStartsMonday;
bool mShowSatSunComp;
void computeLayout();
void computeLayoutWeek();
void doComputeLayoutWeek();
- QPtrVector<MonthViewCell> mCells;
- QPtrVector<QLabel> mDayLabels;
- QPtrVector<KOWeekButton> mWeekLabels;
- QPtrVector<MonthViewCell> mCellsW;
- QPtrVector<QLabel> mDayLabelsW;
- QPtrVector<KOWeekButton> mWeekLabelsW;
+ Q3PtrVector<MonthViewCell> mCells;
+ Q3PtrVector<QLabel> mDayLabels;
+ Q3PtrVector<KOWeekButton> mWeekLabels;
+ Q3PtrVector<MonthViewCell> mCellsW;
+ Q3PtrVector<QLabel> mDayLabelsW;
+ Q3PtrVector<KOWeekButton> mWeekLabelsW;
bool mShortDayLabelsM;
bool mShortDayLabelsW;
int mWidthLongDayLabel;
QDate mStartDate;
MonthViewCell *mSelectedCell;
MonthViewCell *mPopupCell;
bool mFlagKeyPressed;
KOEventPopupMenu *mContextMenu;
- QPopupMenu *mNewItemMenu;
+ Q3PopupMenu *mNewItemMenu;
void keyPressEvent ( QKeyEvent * ) ;
void keyReleaseEvent ( QKeyEvent * ) ;
};
#endif
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 5078c57..0bd46ea 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -23,13 +23,13 @@
#include <time.h>
#ifndef _WIN32_
#include <unistd.h>
#endif
#include <qdir.h>
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <qtextcodec.h>
#include <qstring.h>
#include <qregexp.h>
#include <qfont.h>
#include <qcolor.h>
#include <qstringlist.h>
@@ -302,19 +302,19 @@ KOPrefs::KOPrefs() :
addItemBool("CompactDialogs",&mCompactDialogs,false);
addItemBool("VerticalScreen",&mVerticalScreen,true);
KPrefs::setCurrentGroup("KOrganizer Plugins");
- addItemStringList("SelectedPlugins",&mSelectedPlugins,"holidays");
+ addItemStringList("SelectedPlugins",&mSelectedPlugins,QStringList("holidays"));
KPrefs::setCurrentGroup("Group Scheduling");
addItemInt("IMIPScheduler",&mIMIPScheduler,IMIPKMail);
addItemInt("IMIPSend",&mIMIPSend,IMIPdirectsend);
- addItemStringList("AdditionalMails",&mAdditionalMails,"");
+ addItemStringList("AdditionalMails",&mAdditionalMails,QStringList());
addItemInt("IMIP auto refresh",&mIMIPAutoRefresh,neverAuto);
addItemInt("IMIP auto insert request",&mIMIPAutoInsertRequest,neverAuto);
addItemInt("IMIP auto insert reply",&mIMIPAutoInsertReply,neverAuto);
addItemInt("IMIP auto FreeBusy",&mIMIPAutoFreeBusy,neverAuto);
addItemInt("IMIP auto save FreeBusy",&mIMIPAutoFreeBusyReply,neverAuto);
@@ -563,13 +563,13 @@ void KOPrefs::usrWriteConfig()
config()->setGroup("Personal Settings");
config()->writeEntry("user_name",mName);
config()->writeEntry("user_email",mEmail);
config()->setGroup("Category Colors");
- QDictIterator<QColor> it(mCategoryColors);
+ Q3DictIterator<QColor> it(mCategoryColors);
while (it.current()) {
config()->writeEntry(it.currentKey(),*(it.current()));
++it;
}
KConfig fc (locateLocal("config","kopicalendarrc"));
fc.setGroup("CC");
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h
index 94bdd33..35c6110 100644
--- a/korganizer/koprefs.h
+++ b/korganizer/koprefs.h
@@ -22,15 +22,18 @@
*/
#ifndef KOPREFS_H
#define KOPREFS_H
#include <libkdepim/kpimprefs.h>
-#include <qdict.h>
+#include <q3dict.h>
#include <qdir.h>
#include <qobject.h>
+#include <QDateTime>
+//Added by qt3to4:
+#include <Q3PtrList>
class KConfig;
class QFont;
class QColor;
class QStringList;
@@ -344,13 +347,13 @@ class KOPrefs : public KPimPrefs
bool mEVshowChanged;
bool mWTshowDetails;
bool mWTshowCreated;
bool mWTshowChanged;
int mCurrentDisplayedView;
- QPtrList<KopiCalendarFile> mCalendars;
+ Q3PtrList<KopiCalendarFile> mCalendars;
int mNextAvailableCalendar;
bool mGlobalUpdateDisabled;
bool mDetectConflicts;
bool mIncludeFree;
@@ -359,14 +362,14 @@ class KOPrefs : public KPimPrefs
bool mCheckConflictsNonADAllDay;
bool mCheckConflictsNonADNonAD;
QString mFilterConflictEditItem;
QString mFilterConflictAllItem;
private:
- QDict<QColor> mCategoryColors;
- QArray<KopiCalendarFile*> mDefCalColors;
+ Q3Dict<QColor> mCategoryColors;
+ QVector<KopiCalendarFile*> mDefCalColors;
QColor mDefaultCategoryColor;
QFont mDefaultTimeBarFont;
QFont mDefaultViewFont;
QFont mDefaultMonthViewFont;
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index f1a6c3d..43c488f 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -20,30 +20,36 @@
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#include <qlayout.h>
#include <qlabel.h>
-#include <qgroupbox.h>
-#include <qbuttongroup.h>
+#include <q3groupbox.h>
+#include <q3buttongroup.h>
#include <qlineedit.h>
#include <qfont.h>
#include <qslider.h>
#include <qfile.h>
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <qcombobox.h>
-#include <qvbox.h>
-#include <qhbox.h>
+#include <q3vbox.h>
+#include <q3hbox.h>
#include <qregexp.h>
#include <qspinbox.h>
#include <qdatetime.h>
#include <qcheckbox.h>
#include <qradiobutton.h>
#include <qpushbutton.h>
-#include <qstrlist.h>
+#include <q3strlist.h>
#include <qapplication.h>
+#include <QDesktopWidget>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
+#include <Q3GridLayout>
+#include <QPixmap>
+#include <Q3Frame>
#include <kcolorbutton.h>
#include <kdebug.h>
#include <klocale.h>
#include <kglobal.h>
#include <kfontdialog.h>
@@ -113,14 +119,14 @@ void KOPrefsDialog::setupGlobalTab()
}
void KOPrefsDialog::setupLocaleDateTab()
{
#if 0
-QFrame *topFrame = addPage(i18n("Date Format"),0,0);
- QGridLayout *topLayout = new QGridLayout(topFrame,3,2);
+Q3Frame *topFrame = addPage(i18n("Date Format"),0,0);
+ Q3GridLayout *topLayout = new Q3GridLayout(topFrame,3,2);
topLayout->setSpacing(mSpacingHint);
topLayout->setMargin(mMarginHint);
int iii = 0;
KPrefsDialogWidRadios *syncPrefsGroup =
@@ -169,14 +175,14 @@ QFrame *topFrame = addPage(i18n("Date Format"),0,0);
}
void KOPrefsDialog::setupLocaleTab()
{
#if 0
- QFrame *topFrame = addPage(i18n("Locale"),0,0);
- QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
+ Q3Frame *topFrame = addPage(i18n("Locale"),0,0);
+ Q3GridLayout *topLayout = new Q3GridLayout(topFrame,4,2);
topLayout->setSpacing(mSpacingHint);
topLayout->setMargin(mMarginHint);
int iii = 0;
KPrefsDialogWidRadios *syncPrefsGroup =
addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame);
syncPrefsGroup->addRadio(i18n("English"));
@@ -208,13 +214,13 @@ void KOPrefsDialog::setupLocaleTab()
addWidBool(i18n("Use short date in (WN/E) view"),
&(KOPrefs::instance()->mShortDateInViewer),topFrame);
topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
}
else {
QWidget * hb = new QWidget( topFrame );
- QHBoxLayout *hbLayout = new QHBoxLayout(hb);
+ Q3HBoxLayout *hbLayout = new Q3HBoxLayout(hb);
sb =
addWidBool(i18n("Week starts on Sunday"),
&(KOPrefs::instance()->mWeekStartsOnSunday),hb);
hbLayout->addWidget(sb->checkBox() );
sb =
addWidBool(i18n("Use short date in (WN/E) view"),
@@ -233,16 +239,16 @@ void KOPrefsDialog::setupLocaleTab()
#endif
#endif
}
void KOPrefsDialog::setupMainTab()
{
- QFrame *topFrame = addPage(i18n("General"),0,0);
+ Q3Frame *topFrame = addPage(i18n("General"),0,0);
// DesktopIcon("identity",KIcon::SizeMedium));
- QGridLayout *topLayout = new QGridLayout(topFrame,5,2);
+ Q3GridLayout *topLayout = new Q3GridLayout(topFrame,5,2);
topLayout->setSpacing(mSpacingHint);
topLayout->setMargin(mMarginHint);
// KPrefsDialogWidBool *emailControlCenter =
// addWidBool(i18n("&Use email settings from Control Center"),
// &(KOPrefs::instance()->mEmailControlCenter),topFrame);
@@ -284,18 +290,18 @@ void KOPrefsDialog::setupMainTab()
widbool = addWidBool(i18n("Block popup until mouse button release"),
&(KOPrefs::instance()->mBlockPopupMenu),topFrame);
topLayout->addMultiCellWidget( widbool->checkBox(), iii,iii,0,1);
++iii;
if ( QApplication::desktop()->height() <= 240 ) {
topFrame = addPage(i18n("General") +" 2",0,0);
- topLayout = new QGridLayout(topFrame,4,2);
+ topLayout = new Q3GridLayout(topFrame,4,2);
topLayout->setSpacing(2);
topLayout->setMargin(3);
iii = 0;
}
- QHBox *dummy = new QHBox(topFrame);
+ Q3HBox *dummy = new Q3HBox(topFrame);
new QLabel(i18n("Days in Next-X-Days:"),dummy);
mNextXDaysSpin = new QSpinBox(2,14,1,dummy);
topLayout->addMultiCellWidget(dummy,iii,iii,0,1);
++iii;
@@ -310,13 +316,13 @@ void KOPrefsDialog::setupMainTab()
// QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame);
//topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1);
// addWidBool(i18n("Enable automatic saving of calendar"),
// &(KOPrefs::instance()->mAutoSave),autoSaveGroup);
- QHBox *intervalBox = new QHBox(topFrame);
+ Q3HBox *intervalBox = new Q3HBox(topFrame);
// intervalBox->setSpacing(mSpacingHint);
topLayout->addMultiCellWidget(intervalBox,iii,iii,0,1);
++iii;
QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox);
mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox);
autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin);
@@ -399,20 +405,20 @@ void KOPrefsDialog::setupMainTab()
*/
}
void KOPrefsDialog::setupTimeTab()
{
- QFrame *topFrame = addPage(i18n("Time"),0,0);
+ Q3Frame *topFrame = addPage(i18n("Time"),0,0);
// DesktopIcon("clock",KIcon::SizeMedium));
- QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
+ Q3GridLayout *topLayout = new Q3GridLayout(topFrame,4,2);
topLayout->setSpacing(mSpacingHint);
topLayout->setMargin(mMarginHint);
- QHBox *dummy = new QHBox(topFrame);
+ Q3HBox *dummy = new Q3HBox(topFrame);
KPrefsDialogWidTime *dayBegins =
addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins),
dummy);
//topLayout->addWidget(dayBegins->label(),2,0);
//topLayout->addWidget(dayBegins->spinBox(),2,1);
@@ -438,34 +444,34 @@ void KOPrefsDialog::setupTimeTab()
mAlarmTimeCombo = new QComboBox(topFrame);
mAlarmTimeCombo->insertStringList(alarmList);
topLayout->addWidget(mAlarmTimeCombo,3,1);
int iii = 4;
if ( QApplication::desktop()->height() <= 240 ) {
topFrame = addPage(i18n("Time") +" 2",0,0);
- topLayout = new QGridLayout(topFrame,1,2);
+ topLayout = new Q3GridLayout(topFrame,1,2);
topLayout->setSpacing(2);
topLayout->setMargin(3);
iii = 0;
}
- QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal,
+ Q3GroupBox *workingHoursGroup = new Q3GroupBox(1,Qt::Horizontal,
i18n("Working Hours"),
topFrame);
topLayout->addMultiCellWidget(workingHoursGroup,iii,iii,0,1);
workingHoursGroup->layout()->setSpacing( 0 );
workingHoursGroup->layout()->setMargin( 4 );
- QHBox *workStartBox = new QHBox(workingHoursGroup);
+ Q3HBox *workStartBox = new Q3HBox(workingHoursGroup);
// workStartBox->setMargin( 0 );
addWidTime(i18n("Daily starting hour:"),
&(KOPrefs::instance()->mWorkingHoursStart),workStartBox);
- QHBox *workEndBox = new QHBox(workingHoursGroup);
+ Q3HBox *workEndBox = new Q3HBox(workingHoursGroup);
//workEndBox->setMargin( 0 );
addWidTime(i18n("Daily ending hour:"),
&(KOPrefs::instance()->mWorkingHoursEnd),workEndBox);
- QVBox *excludeBox = new QVBox(workingHoursGroup);
+ Q3VBox *excludeBox = new Q3VBox(workingHoursGroup);
//excludeBox->setMargin( 0 );
addWidBool(i18n("Exclude holidays"),
&(KOPrefs::instance()->mExcludeHolidays),excludeBox);
addWidBool(i18n("Exclude Saturdays"),
&(KOPrefs::instance()->mExcludeSaturdays),excludeBox);
@@ -479,16 +485,16 @@ void KOPrefsDialog::setupTimeTab()
}
void KOPrefsDialog::setupViewsTab()
{
- QFrame *topFrame = addPage(i18n("Views"),0,0);
+ Q3Frame *topFrame = addPage(i18n("Views"),0,0);
// DesktopIcon("viewmag",KIcon::SizeMedium));
- QGridLayout *topLayout = new QGridLayout(topFrame,6,1);
+ Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,1);
topLayout->setSpacing(mSpacingHint);
topLayout->setMargin(mMarginHint);
// QBoxLayout *dayBeginsLayout = new QHBoxLayout;
// topLayout->addLayout(dayBeginsLayout,0,0);
@@ -527,13 +533,13 @@ void KOPrefsDialog::setupViewsTab()
#if 0
topFrame = addPage(i18n("ViewChange"),0,0);
// DesktopIcon("viewmag",KIcon::SizeMedium));
- topLayout = new QGridLayout(topFrame,6,1);
+ topLayout = new Q3GridLayout(topFrame,6,1);
topLayout->setSpacing(mSpacingHint);
topLayout->setMargin(mMarginHint);
ii = 0;
#endif
@@ -591,13 +597,13 @@ void KOPrefsDialog::setupViewsTab()
#endif
// *********************************************************
topFrame = addPage(i18n("Agenda View"),0,0);
// DesktopIcon("viewmag",KIcon::SizeMedium));
- topLayout = new QGridLayout(topFrame,5,1);
+ topLayout = new Q3GridLayout(topFrame,5,1);
topLayout->setSpacing(mSpacingHint);
topLayout->setMargin(mMarginHint);
ii = 0;
dummy =
@@ -649,18 +655,18 @@ void KOPrefsDialog::setupViewsTab()
topFrame = addPage(i18n("Month View"),0,0);
// DesktopIcon("viewmag",KIcon::SizeMedium));
- topLayout = new QGridLayout(topFrame,5,1);
+ topLayout = new Q3GridLayout(topFrame,5,1);
topLayout->setSpacing(mSpacingHint);
topLayout->setMargin(mMarginHint);
ii = 0;
QLabel *lab;
- QHBox *habo = new QHBox( topFrame );
+ Q3HBox *habo = new Q3HBox( topFrame );
if ( QApplication::desktop()->width() <= 480 ) {
lab = new QLabel ( i18n("Show events that recur "), topFrame );
topLayout->addMultiCellWidget(lab,ii, ii,0,1);
ii++;
} else {
new QLabel ( i18n("Show events that recur "), habo );
@@ -674,13 +680,13 @@ void KOPrefsDialog::setupViewsTab()
addWidBool(i18n("weekly"),
&(KOPrefs::instance()->mMonthWeeklyRecur),habo);
topLayout->addMultiCellWidget(habo,ii, ii,0,1);
ii++;
- habo = new QHBox( topFrame );
+ habo = new Q3HBox( topFrame );
if ( QApplication::desktop()->width() <= 480 ) {
lab = new QLabel (i18n("Show in every cell ") , topFrame );
topLayout->addMultiCellWidget(lab,ii, ii,0,1);
ii++;
} else {
@@ -727,13 +733,13 @@ void KOPrefsDialog::setupViewsTab()
topLayout->addWidget(dummy->checkBox(),ii++,0);
if ( QApplication::desktop()->height() <= 240 ) {
topFrame = addPage(i18n("Month View") +" 2",0,0);
- topLayout = new QGridLayout(topFrame,4,1);
+ topLayout = new Q3GridLayout(topFrame,4,1);
topLayout->setSpacing(2);
topLayout->setMargin(1);
ii = 0;
}
@@ -761,25 +767,25 @@ void KOPrefsDialog::setupViewsTab()
topLayout->addWidget(holidayColor->label(),ii,0);
topLayout->addWidget(holidayColor->button(),ii++,1);
// *********************** What'sNext View
topFrame = addPage(i18n("What's Next View"),0,0);
// DesktopIcon("viewmag",KIcon::SizeMedium));
- topLayout = new QGridLayout(topFrame,4,1);
+ topLayout = new Q3GridLayout(topFrame,4,1);
topLayout->setSpacing(mSpacingHint);
topLayout->setMargin(mMarginHint);
ii = 0;
- QHBox* hdummy = new QHBox(topFrame);
+ Q3HBox* hdummy = new Q3HBox(topFrame);
new QLabel(i18n("Days in What's Next:"),hdummy);
mWhatsNextSpin = new QSpinBox(1,14,1,hdummy);
topLayout->addWidget(hdummy,ii++,0);
- QHBox *prioBox = new QHBox(topFrame);
+ Q3HBox *prioBox = new Q3HBox(topFrame);
// intervalBox->setSpacing(mSpacingHint);
topLayout->addWidget(prioBox,ii++,0);
QLabel *prioLabel = new QLabel(i18n("Number of max.displayed todo prios:"), prioBox);
mPrioSpin = new QSpinBox(0,5,1,prioBox);
if ( QApplication::desktop()->width() < 300 )
@@ -815,13 +821,13 @@ void KOPrefsDialog::setupViewsTab()
// *********************** Todo View
topFrame = addPage(i18n("Todo View"),0,0);
// DesktopIcon("viewmag",KIcon::SizeMedium));
- topLayout = new QGridLayout(topFrame,4,1);
+ topLayout = new Q3GridLayout(topFrame,4,1);
topLayout->setSpacing(mSpacingHint);
topLayout->setMargin(mMarginHint);
ii = 0;
dummy =
addWidBool(i18n("Hide not running Todos in To-do view"),
&(KOPrefs::instance()->mHideNonStartedTodos),topFrame);
@@ -852,31 +858,31 @@ dummy =
QWidget* wid = new QWidget( topFrame );
// Todo run today color
KPrefsDialogWidColor *todoRunColor =
addWidColor(i18n("Color for running todos:"),
&(KOPrefs::instance()->mTodoRunColor),wid);
- QHBoxLayout *widLayout = new QHBoxLayout(wid);
+ Q3HBoxLayout *widLayout = new Q3HBoxLayout(wid);
widLayout->addWidget( todoRunColor->label() );
widLayout->addWidget( todoRunColor->button() );
topLayout->addWidget(wid,ii++,0);
wid = new QWidget( topFrame );
// Todo due today color
KPrefsDialogWidColor *todoDueTodayColor =
addWidColor(i18n("Todo due today color:"),
&(KOPrefs::instance()->mTodoDueTodayColor),wid);
- widLayout = new QHBoxLayout(wid);
+ widLayout = new Q3HBoxLayout(wid);
widLayout->addWidget( todoDueTodayColor->label() );
widLayout->addWidget( todoDueTodayColor->button() );
topLayout->addWidget(wid,ii++,0);
//topLayout->addWidget(todoDueTodayColor->button(),ii++,1);
// Todo overdue color
wid = new QWidget( topFrame );
- widLayout = new QHBoxLayout(wid);
+ widLayout = new Q3HBoxLayout(wid);
KPrefsDialogWidColor *todoOverdueColor =
addWidColor(i18n("Todo overdue color:"),
&(KOPrefs::instance()->mTodoOverdueColor),wid);
widLayout->addWidget(todoOverdueColor->label());
widLayout->addWidget(todoOverdueColor->button());
topLayout->addWidget(wid,ii++,0);
@@ -887,13 +893,13 @@ dummy =
topLayout->addWidget(dummy->checkBox(),ii++,0);
topFrame = addPage(i18n("View Options"),0,0);
- topLayout = new QGridLayout(topFrame,4,1);
+ topLayout = new Q3GridLayout(topFrame,4,1);
topLayout->setSpacing(mSpacingHint);
topLayout->setMargin(mMarginHint);
ii = 0;
dummy =
addWidBool(i18n("Show Sync Events"),
@@ -926,22 +932,22 @@ dummy =
dummy = addWidBool(i18n("Last modified time"),
&(KOPrefs::instance()->mWTshowChanged),topFrame);
topLayout->addWidget(dummy->checkBox(),ii++,0);
topFrame = addPage(i18n("Conflict detection"),0,0);
- topLayout = new QGridLayout(topFrame,2,1);
+ topLayout = new Q3GridLayout(topFrame,2,1);
topLayout->setSpacing(mSpacingHint);
topLayout->setMargin(mMarginHint);
ii = 0;
dummy = addWidBool(i18n("Enable conflict detection"),
&(KOPrefs::instance()->mDetectConflicts),topFrame);
topLayout->addWidget(dummy->checkBox(), ii++,0);
- topFrame = new QFrame( topFrame );
+ topFrame = new Q3Frame( topFrame );
topLayout->addWidget(topFrame ,ii++,0);
- topLayout = new QGridLayout(topFrame,4,1);
+ topLayout = new Q3GridLayout(topFrame,4,1);
connect ( dummy->checkBox(), SIGNAL( toggled( bool ) ), topFrame, SLOT ( setEnabled( bool ) ) );
dummy = addWidBool(i18n("Include events which \"show as free\""),
&(KOPrefs::instance()->mIncludeFree),topFrame);
topLayout->addWidget(dummy->checkBox(), ii++,0);
topLayout->addWidget( new QLabel ( i18n("Conflict detection checks an <b>edited event</b> with <b>other events</b> for overlapping."), topFrame ) , ii++,0);
@@ -967,13 +973,13 @@ dummy =
topFrame = addPage(i18n("Alarm"),0,0);
// DesktopIcon("viewmag",KIcon::SizeMedium));
- topLayout = new QGridLayout(topFrame,2,1);
+ topLayout = new Q3GridLayout(topFrame,2,1);
topLayout->setSpacing(mSpacingHint);
topLayout->setMargin(mMarginHint);
int iii = 0;
dummy =
addWidBool(i18n("Use internal alarm notification"),
@@ -986,39 +992,39 @@ dummy =
topLayout->addWidget(lab ,iii++,0);
}
#ifndef DESKTOP_VERSION
lab->setAlignment( AlignLeft|WordBreak|AlignTop);
#else
- lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop);
+ lab->setAlignment( Qt::AlignLeft|Qt::TextWrapAnywhere|Qt::TextWordWrap|Qt::AlignTop);
lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) );
#endif
- QHBox* dummyBox = new QHBox(topFrame);
+ Q3HBox* dummyBox = new Q3HBox(topFrame);
new QLabel(i18n("Play beeps count:"),dummyBox);
mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox);
topLayout->addWidget(dummyBox,iii++,0);
- dummyBox = new QHBox(topFrame);
+ dummyBox = new Q3HBox(topFrame);
new QLabel(i18n("Beeps interval in sec:"),dummyBox);
mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox);
topLayout->addWidget(dummyBox,iii++,0);
- dummyBox = new QHBox(topFrame);
+ dummyBox = new Q3HBox(topFrame);
new QLabel(i18n("Default suspend time in min:"),dummyBox);
mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox);
topLayout->addWidget(dummyBox,iii++,0);
- dummyBox = new QHBox(topFrame);
+ dummyBox = new Q3HBox(topFrame);
new QLabel(i18n("Auto suspend count:"),dummyBox);
mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox);
topLayout->addWidget(dummyBox,iii++,0);
- QHBox* hbo = new QHBox ( topFrame );
+ Q3HBox* hbo = new Q3HBox ( topFrame );
mDefaultAlarmFile = new QLineEdit(hbo);
QPushButton * loadTemplate = new QPushButton(hbo);
QPixmap icon;
if ( QApplication::desktop()->width() < 321 )
icon = SmallIcon("fileimport16");
else
@@ -1052,16 +1058,16 @@ void KOPrefsDialog::selectSoundFile()
if ( fileName.length() > 0 )
mDefaultAlarmFile->setText( fileName );
}
void KOPrefsDialog::setupFontsTab()
{
- QFrame *topFrame = addPage(i18n("Fonts"),0,0);
+ Q3Frame *topFrame = addPage(i18n("Fonts"),0,0);
// DesktopIcon("fonts",KIcon::SizeMedium));
- QGridLayout *topLayout = new QGridLayout(topFrame,7,3);
+ Q3GridLayout *topLayout = new Q3GridLayout(topFrame,7,3);
topLayout->setSpacing(1);
topLayout->setMargin(3);
KPrefsDialogWidFont * tVFont;
int i = 0;
KPrefsDialogWidFont *timeLabelsFont =
addWidFont(i18n("23"),i18n("DateNavigator:(nr)"),
@@ -1122,13 +1128,13 @@ void KOPrefsDialog::setupFontsTab()
i = 0;
topFrame = addPage(i18n("View Fonts"),0,
DesktopIcon("fonts",KIcon::SizeMedium));
- topLayout = new QGridLayout(topFrame,7,3);
+ topLayout = new Q3GridLayout(topFrame,7,3);
topLayout->setSpacing(1);
topLayout->setMargin(3);
tVFont =
addWidFont(i18n("Configure KO"),i18n("What's Next View:"),
&(KOPrefs::instance()->mWhatsNextFont),topFrame);
@@ -1190,26 +1196,26 @@ void KOPrefsDialog::setupFontsTab()
}
void KOPrefsDialog::setupColorsTab()
{
- QFrame *topFrame = addPage(i18n("Colors"),0,0);
+ Q3Frame *topFrame = addPage(i18n("Colors"),0,0);
// DesktopIcon("colorize",KIcon::SizeMedium));
- QGridLayout *topLayout = new QGridLayout(topFrame,5,2);
+ Q3GridLayout *topLayout = new Q3GridLayout(topFrame,5,2);
// topLayout->setSpacing(mSpacingHint);
// topLayout->setMargin(mMarginHint);
topLayout->setSpacing(2);
topLayout->setMargin(3);
int ii = 1;
- QGroupBox *categoryGroup ;
+ Q3GroupBox *categoryGroup ;
- categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"),
+ categoryGroup = new Q3GroupBox(1,Qt::Vertical,i18n("Categories"),
topFrame);
topLayout->addMultiCellWidget(categoryGroup,0,0,0,1);
mCategoryCombo = new QComboBox(categoryGroup);
mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories);
connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor()));
@@ -1247,13 +1253,13 @@ void KOPrefsDialog::setupColorsTab()
topLayout->addWidget(eventColor->button(),ii++,1);
if ( QApplication::desktop()->height() <= 240 ) {
topFrame = addPage(i18n("Colors") +" 2",0,0);
// DesktopIcon("colorize",KIcon::SizeMedium));
- topLayout = new QGridLayout(topFrame,5,2);
+ topLayout = new Q3GridLayout(topFrame,5,2);
// topLayout->setSpacing(mSpacingHint);
// topLayout->setMargin(mMarginHint);
topLayout->setSpacing(2);
topLayout->setMargin(3);
}
@@ -1314,26 +1320,26 @@ void KOPrefsDialog::updateCategoryColor()
void KOPrefsDialog::setupPrinterTab()
{
mPrinterTab = addPage(i18n("Printing"),0,
DesktopIcon("fileprint",KIcon::SizeMedium));
- QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2);
+ Q3GridLayout *topLayout = new Q3GridLayout(mPrinterTab,5,2);
topLayout->setSpacing(mSpacingHint);
topLayout->setMargin(mMarginHint);
topLayout->setRowStretch(4,1);
}
void KOPrefsDialog::setupGroupSchedulingTab()
{
#if 0
- QFrame *topFrame = addPage(i18n("Group Scheduling"),0,
+ Q3Frame *topFrame = addPage(i18n("Group Scheduling"),0,
DesktopIcon("personal",KIcon::SizeMedium));
- QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
+ Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2);
topLayout->setSpacing(mSpacingHint);
topLayout->setMargin(mMarginHint);
#if 0
KPrefsDialogWidRadios *schedulerGroup =
addWidRadios(i18n("Scheduler Mail Client"),&(KOPrefs::instance()->mIMIPScheduler),
@@ -1350,13 +1356,13 @@ void KOPrefsDialog::setupGroupSchedulingTab()
sendGroup->addRadio(i18n("Send to outbox"));
sendGroup->addRadio(i18n("Send directly"));
topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1);
topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1);
- mAMails = new QListView(topFrame);
+ mAMails = new Q3ListView(topFrame);
mAMails->addColumn(i18n("Email"),300);
topLayout->addMultiCellWidget(mAMails,3,3,0,1);
topLayout->addWidget(new QLabel(i18n("Additional email address:"),topFrame),4,0);
aEmailsEdit = new QLineEdit(topFrame);
aEmailsEdit->setEnabled(false);
@@ -1368,23 +1374,23 @@ void KOPrefsDialog::setupGroupSchedulingTab()
topLayout->addWidget(del,5,1);
//topLayout->setRowStretch(2,1);
connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) );
connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) );
connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem()));
- connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput()));
+ connect(mAMails,SIGNAL(selectionChanged(Q3ListViewItem *)),SLOT(updateInput()));
#endif
}
void KOPrefsDialog::setupGroupAutomationTab()
{
return;
- QFrame *topFrame = addPage(i18n("Group Automation"),0,
+ Q3Frame *topFrame = addPage(i18n("Group Automation"),0,
DesktopIcon("personal",KIcon::SizeMedium));
- QGridLayout *topLayout = new QGridLayout(topFrame,5,1);
+ Q3GridLayout *topLayout = new Q3GridLayout(topFrame,5,1);
topLayout->setSpacing(mSpacingHint);
topLayout->setMargin(mMarginHint);
KPrefsDialogWidRadios *autoRefreshGroup =
addWidRadios(i18n("Auto Send Refresh"),
&(KOPrefs::instance()->mIMIPAutoRefresh),topFrame);
@@ -1512,13 +1518,13 @@ void KOPrefsDialog::usrWriteConfig()
while ( iii < cat.count() ) {
if ( *KOPrefs::instance()->categoryColor( cat[ iii ] ) == mCatDefaultColor )
KOPrefs::instance()->setCategoryColor( cat[ iii ], KOPrefs::instance()->mEventColor );
++iii;
}
}
- QDictIterator<QColor> it(mCategoryDict);
+ Q3DictIterator<QColor> it(mCategoryDict);
while (it.current()) {
KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current());
++it;
}
KOPrefs::instance()->mNextXDays = mNextXDaysSpin->value();
diff --git a/korganizer/koprefsdialog.h b/korganizer/koprefsdialog.h
index ee7a7aa..ccc1726 100644
--- a/korganizer/koprefsdialog.h
+++ b/korganizer/koprefsdialog.h
@@ -20,16 +20,18 @@
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#ifndef _KOPREFSDIALOG_H
#define _KOPREFSDIALOG_H
-#include <qframe.h>
-#include <qdict.h>
+#include <q3frame.h>
+#include <q3dict.h>
#include <qcolor.h>
-#include <qlistview.h>
+#include <q3listview.h>
+//Added by qt3to4:
+#include <QLabel>
#include <kdialogbase.h>
#include <libkdepim/kprefsdialog.h>
#include <libkdepim/kdateedit.h>
#include <kcmconfigs/kdepimconfigwidget.h>
@@ -91,13 +93,13 @@ class KOPrefsDialog : public KPrefsDialog
private:
QColor mCatDefaultColor;
KPrefsDialogWidBool *mEnableGroupScheduling;
KPrefsDialogWidBool *mEnableProjectView;
- QFrame *mPrinterTab;
+ Q3Frame *mPrinterTab;
QLineEdit *nameEdit;
QLineEdit *emailEdit;
QComboBox *timeCombo;
QComboBox *tzCombo;
@@ -118,13 +120,13 @@ class KOPrefsDialog : public KPrefsDialog
QSpinBox *mStartTimeSpin;
QSpinBox *mDefaultDurationSpin;
QComboBox *mAlarmTimeCombo;
QComboBox *mCategoryCombo;
KColorButton *mCategoryButton;
- QDict<QColor> mCategoryDict;
+ Q3Dict<QColor> mCategoryDict;
QSlider *mHourSizeSlider;
QSpinBox *mNextXDaysSpin;
QSpinBox *mWhatsNextSpin;
diff --git a/korganizer/korganizer.pro b/korganizer/korganizer.pro
index df8f8d7..0f3b328 100644
--- a/korganizer/korganizer.pro
+++ b/korganizer/korganizer.pro
@@ -1,8 +1,8 @@
TEMPLATE = app
-CONFIG = qt warn_on
+CONFIG += qt warn_on
TARGET = kopi
OBJECTS_DIR = _obj/
MOC_DIR = _moc
DESTDIR= ../bin
include( ../variables.pri )
@@ -14,48 +14,48 @@ DEFINES += KORG_NODCOP KORG_NOKALARMD KORG_NORESOURCEVIEW KORG_NOSPLITTER
#KORG_NOPRINTER KORG_NOKABC KORG_NODND
DEFINES += KORG_NOLVALTERNATION
DEFINES += DESKTOP_VERSION
unix : {
staticlib: {
TARGET = kopi_linux
-LIBS += ../bin/libmicrokabc_qtopia.a
-LIBS += ../bin/libmicrokabc_file.a
-LIBS += ../bin/libmicrokabc_dir.a
-LIBS += ../bin/libmicrokdepim.a
-LIBS += ../bin/libmicrokcal.a
-LIBS += ../bin/libmicrokabc.a
-LIBS += ../bin/libmicrokde.a
-LIBS += ../bin/libmicrokabc_qtopia.a
-LIBS += ../bin/libmicrokabc_file.a
-LIBS += ../bin/libmicrokabc_dir.a
-LIBS += ../bin/libmicrokdepim.a
-LIBS += ../bin/libmicrokcal.a
-LIBS += ../bin/libmicrokabc.a
-LIBS += ../bin/libmicrokde.a
+LIBS += ../bin/libxmicrokabc_qtopia.a
+LIBS += ../bin/libxmicrokabc_file.a
+LIBS += ../bin/libxmicrokabc_dir.a
+LIBS += ../bin/libxmicrokdepim.a
+LIBS += ../bin/libxmicrokcal.a
+LIBS += ../bin/libxmicrokabc.a
+LIBS += ../bin/libxmicrokde.a
+LIBS += ../bin/libxmicrokabc_qtopia.a
+LIBS += ../bin/libxmicrokabc_file.a
+LIBS += ../bin/libxmicrokabc_dir.a
+LIBS += ../bin/libxmicrokdepim.a
+LIBS += ../bin/libxmicrokcal.a
+LIBS += ../bin/libxmicrokabc.a
+LIBS += ../bin/libxmicrokde.a
LIBS += ../libical/lib/libical.a
LIBS += ../libical/lib/libicalss.a
} else {
-LIBS += ../bin/libmicrokdepim.so
-LIBS += ../bin/libmicrokcal.so
-LIBS += ../bin/libmicrokde.so
-LIBS += ../bin/libmicrokabc.so
+LIBS += ../bin/libxmicrokdepim.so
+LIBS += ../bin/libxmicrokcal.so
+LIBS += ../bin/libxmicrokde.so
+LIBS += ../bin/libxmicrokabc.so
#LIBS += -lbluetooth
#LIBS += -lsdp
#LIBS += -lldap
}
OBJECTS_DIR = obj/unix
MOC_DIR = moc/unix
}
win32: {
RC_FILE = winicons.rc
DEFINES += _WIN32_
-LIBS += ../bin/microkdepim.lib
-LIBS += ../bin/microkcal.lib
-LIBS += ../bin/microkde.lib
-LIBS += ../bin/microkabc.lib
+LIBS += ../bin/xmicrokdepim.lib
+LIBS += ../bin/xmicrokcal.lib
+LIBS += ../bin/xmicrokde.lib
+LIBS += ../bin/xmicrokabc.lib
LIBS += ../libical/lib/ical.lib
LIBS += ../libical/lib/icalss.lib
#LIBS += atls.lib
QMAKE_LINK += /NODEFAULTLIB:LIBC
OBJECTS_DIR = obj/win
MOC_DIR = moc/win
@@ -82,13 +82,14 @@ TARGET = kopi_xp
TARGET = kopi_me
}
}
-INTERFACES = kofilterview_base.ui
+#The following line was changed from INTERFACES to FORMS3 by qt3to4
+FORMS3 = kofilterview_base.ui
#filteredit_base.ui
# kdateedit.h \
HEADERS += datenavigatorcontainer.h \
filteredit_base.h \
@@ -207,12 +208,18 @@ filteredit_base.cpp \
statusdialog.cpp \
timeline.cpp \
timespanview.cpp \
../kalarmd/alarmdialog.cpp
HEADERS += calprintbase.h calprinter.h calprintplugins.h cellitem.h
-INTERFACES += calprintdayconfig_base.ui \
+#The following line was changed from INTERFACES to FORMS3 by qt3to4
+FORMS3 += calprintdayconfig_base.ui \
calprintmonthconfig_base.ui \
calprinttodoconfig_base.ui \
calprintweekconfig_base.ui
SOURCES += calprintbase.cpp calprinter.cpp calprintplugins.cpp cellitem.cpp
+#The following line was inserted by qt3to4
+QT += xml qt3support
+#The following line was inserted by qt3to4
+CONFIG += uic3
+
diff --git a/korganizer/korganizerE.pro b/korganizer/korganizerE.pro
index 553c265..2c1cd42 100644
--- a/korganizer/korganizerE.pro
+++ b/korganizer/korganizerE.pro
@@ -8,15 +8,15 @@ DESTDIR=$(QPEDIR)/bin
INCLUDEPATH += $(KDEPIMDIR) $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/microkde/kdeui $(KDEPIMDIR)/qtcompat $(KDEPIMDIR)/libkdepim interfaces $(KDEPIMDIR)/kabc $(QPEDIR)/include
DEFINES += KORG_NODND KORG_NOPLUGINS KORG_NOARCHIVE KORG_NOMAIL
DEFINES += KORG_NOPRINTER KORG_NODCOP KORG_NOKALARMD KORG_NORESOURCEVIEW KORG_NOSPLITTER
DEFINES += KORG_NOLVALTERNATION
#KORG_NOKABC
-LIBS += -lmicrokdepim
-LIBS += -lmicrokcal
-LIBS += -lmicrokde
+LIBS += -lxmicrokdepim
+LIBS += -lxmicrokcal
+LIBS += -lxmicrokde
LIBS += -lmicroqtcompat
LIBS += $(GCC3EXTRALIB1)
LIBS += $(GCC3EXTRALIB2)
diff --git a/korganizer/kotimespanview.cpp b/korganizer/kotimespanview.cpp
index 3265a3a..a214720 100644
--- a/korganizer/kotimespanview.cpp
+++ b/korganizer/kotimespanview.cpp
@@ -1,20 +1,24 @@
#include <qlayout.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
+#include <Q3ValueList>
+#include <Q3PtrList>
#include <kconfig.h>
#include "timespanview.h"
#include "koglobals.h"
#include "kotimespanview.h"
KOTimeSpanView::KOTimeSpanView(Calendar *calendar, QWidget *parent,
const char *name) :
KOEventView( calendar, parent, name )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
mTimeSpanView = new TimeSpanView( this );
topLayout->addWidget( mTimeSpanView );
connect( mTimeSpanView, SIGNAL( dateRangeChanged() ), SLOT( updateView() ) );
}
@@ -31,25 +35,25 @@ void KOTimeSpanView::readSettings()
void KOTimeSpanView::readSettings(KConfig *config)
{
// kdDebug() << "KOTimeSpanView::readSettings()" << endl;
config->setGroup("Views");
- QValueList<int> sizes = config->readIntListEntry("Separator TimeSpanView");
+ Q3ValueList<int> sizes = config->readIntListEntry("Separator TimeSpanView");
if (sizes.count() == 2) {
mTimeSpanView->setSplitterSizes(sizes);
}
}
void KOTimeSpanView::writeSettings(KConfig *config)
{
// kdDebug() << "KOTimeSpanView::writeSettings()" << endl;
config->setGroup("Views");
- QValueList<int> list = mTimeSpanView->splitterSizes();
+ Q3ValueList<int> list = mTimeSpanView->splitterSizes();
config->writeEntry("Separator TimeSpanView",list);
}
int KOTimeSpanView::maxDatesHint()
{
return 0;
@@ -57,15 +61,15 @@ int KOTimeSpanView::maxDatesHint()
int KOTimeSpanView::currentDateCount()
{
return 0;
}
-QPtrList<Incidence> KOTimeSpanView::selectedIncidences()
+Q3PtrList<Incidence> KOTimeSpanView::selectedIncidences()
{
- QPtrList<Incidence> selected;
+ Q3PtrList<Incidence> selected;
return selected;
}
void KOTimeSpanView::updateView()
{
@@ -81,15 +85,15 @@ void KOTimeSpanView::showDates(const QDate &start, const QDate &end)
insertItems( s, e );
}
void KOTimeSpanView::insertItems(const QDate &start, const QDate &end)
{
mTimeSpanView->clear();
- mTimeSpanView->setDateRange( start, end );
+ mTimeSpanView->setDateRange( (QDateTime)start, (QDateTime)end );
- QPtrList<Event> events = calendar()->events( start, end );
+ Q3PtrList<Event> events = calendar()->events( start, end );
Event *event = events.first();
while( event ) {
// kdDebug() << "KOTimeSpanView::showDates() add event: " << event->summary()
// << endl;
mTimeSpanView->addItem( event );
@@ -97,13 +101,13 @@ void KOTimeSpanView::insertItems(const QDate &start, const QDate &end)
event = events.next();
}
mTimeSpanView->updateView();
}
-void KOTimeSpanView::showEvents(QPtrList<Event> eventList)
+void KOTimeSpanView::showEvents(Q3PtrList<Event> eventList)
{
}
void KOTimeSpanView::changeEventDisplay(Event *, int)
{
}
diff --git a/korganizer/kotimespanview.h b/korganizer/kotimespanview.h
index c682ed8..c3e4b41 100644
--- a/korganizer/kotimespanview.h
+++ b/korganizer/kotimespanview.h
@@ -1,10 +1,12 @@
#ifndef KOTIMESPANVIEW_H
#define KOTIMESPANVIEW_H
#include "koeventview.h"
+//Added by qt3to4:
+#include <Q3PtrList>
class KConfig;
class TimeSpanView;
class KOTimeSpanView : public KOEventView
{
@@ -13,25 +15,25 @@ class KOTimeSpanView : public KOEventView
KOTimeSpanView(Calendar *calendar, QWidget *parent = 0,
const char *name = 0);
~KOTimeSpanView();
virtual int maxDatesHint();
virtual int currentDateCount();
- virtual QPtrList<Incidence> selectedIncidences();
+ virtual Q3PtrList<Incidence> selectedIncidences();
DateList selectedDates()
{DateList q;
return q;}
void readSettings();
void readSettings( KConfig * );
void writeSettings( KConfig * );
public slots:
virtual void updateView();
virtual void showDates(const QDate &start, const QDate &end);
- virtual void showEvents(QPtrList<Event> eventList);
+ virtual void showEvents(Q3PtrList<Event> eventList);
void changeEventDisplay(Event *, int);
private:
void insertItems( const QDate &start, const QDate & end );
diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp
index 20a35d2..aeab92a 100644
--- a/korganizer/kotodoeditor.cpp
+++ b/korganizer/kotodoeditor.cpp
@@ -20,21 +20,26 @@
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 <qlayout.h>
-#include <qhbox.h>
+#include <q3hbox.h>
#include <qtimer.h>
#include <qdir.h>
#include <qdatetime.h>
#include <qapplication.h>
+#include <QDesktopWidget>
#include <qtabwidget.h>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
+#include <Q3PtrList>
+#include <Q3VBoxLayout>
#include <kiconloader.h>
#include <klocale.h>
#include <kfiledialog.h>
#include <kstandarddirs.h>
#include <kmessagebox.h>
@@ -78,14 +83,14 @@ void KOTodoEditor::init()
mRecurrence->setDateTimeStr( i18n("<i>The recurrence is computed from the start datetime!</i>") );
connect(mGeneral,SIGNAL(dateTimesChanged(QDateTime,QDateTime)),
mRecurrence,SLOT(setDefaultsDates(QDateTime,QDateTime)));
}
void KOTodoEditor::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 KOTodoEditor::setCategories( QString s )
@@ -108,15 +113,15 @@ void KOTodoEditor::setupGeneral()
// connect(mGeneral,SIGNAL(openCategoryDialog()),mCategoryDialog,SLOT(show()));
//connect(mCategoryDialog, SIGNAL(categoriesSelected(const QString &)),
// mGeneral,SLOT(setCategories(const QString &)));
if (KOPrefs::instance()->mCompactDialogs) {
- QFrame *topFrame = addPage(i18n("General"));
+ Q3Frame *topFrame = addPage(i18n("General"));
- QBoxLayout *topLayout = new QVBoxLayout(topFrame);
+ Q3BoxLayout *topLayout = new Q3VBoxLayout(topFrame);
if ( QApplication::desktop()->width() < 480 ) {
topLayout->setMargin(marginHintSmall());
topLayout->setSpacing(spacingHintSmall());
} else {
topLayout->setMargin(marginHint());
topLayout->setSpacing(spacingHint());
@@ -128,23 +133,23 @@ void KOTodoEditor::setupGeneral()
topLayout->addStretch( 1 );
mGeneral->initAlarm(topFrame,topLayout);
topLayout->addStretch( 1 );
mGeneral->enableAlarm( false );
- QBoxLayout *priorityLayout;
+ Q3BoxLayout *priorityLayout;
if ( QApplication::desktop()->width() < 500 )
- priorityLayout = new QVBoxLayout( topLayout );
+ priorityLayout = new Q3VBoxLayout( topLayout );
else
- priorityLayout = new QHBoxLayout( topLayout );
+ priorityLayout = new Q3HBoxLayout( topLayout );
QWidget* prioWidget = new QWidget (topFrame);
priorityLayout->addWidget( prioWidget );
- QHBoxLayout* priorityLayout2 = new QHBoxLayout( prioWidget);
+ Q3HBoxLayout* priorityLayout2 = new Q3HBoxLayout( prioWidget);
- QIconSet icon;
+ QIcon icon;
if ( QApplication::desktop()->width() < 321 )
icon = SmallIcon("fileimport16");
else
icon = SmallIcon("fileimport");
QPushButton * loadTemplate = new QPushButton( prioWidget);
loadTemplate->setIconSet (icon ) ;
@@ -161,19 +166,19 @@ void KOTodoEditor::setupGeneral()
priorityLayout2->addWidget(loadTemplate);
priorityLayout2->addWidget(saveTemplate);
mGeneral->initPriority(prioWidget,priorityLayout2);
mGeneral->initCategories( topFrame, priorityLayout );
topLayout->addStretch(1);
- QFrame *topFrame2 = addPage(i18n("Details"));
+ Q3Frame *topFrame2 = addPage(i18n("Details"));
- QBoxLayout *topLayout2 = new QVBoxLayout(topFrame2);
+ Q3BoxLayout *topLayout2 = new Q3VBoxLayout(topFrame2);
topLayout2->setMargin(marginHint());
topLayout2->setSpacing(spacingHint());
- QHBoxLayout *completionLayout = new QHBoxLayout( topLayout2 );
+ Q3HBoxLayout *completionLayout = new Q3HBoxLayout( topLayout2 );
mGeneral->initCompletion(topFrame2,completionLayout);
mGeneral->initSecrecy( topFrame2, topLayout2 );
mGeneral->initDescription(topFrame2,topLayout2);
@@ -182,24 +187,24 @@ void KOTodoEditor::setupGeneral()
// hb->setSpacing( 3 );
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);
mGeneral->initStatus(topFrame,topLayout);
- QBoxLayout *alarmLineLayout = new QHBoxLayout(topLayout);
+ Q3BoxLayout *alarmLineLayout = new Q3HBoxLayout(topLayout);
mGeneral->initAlarm(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();
}
@@ -424,13 +429,13 @@ void KOTodoEditor::slotLoadTemplate()
ICalFormat format;
if ( !format.load( &cal, fileName ) ) {
KMessageBox::error( this, i18n("Error loading template file\n '%1'.")
.arg( fileName ) );
return ;
}
- QPtrList<Todo> todos = cal.todos();
+ Q3PtrList<Todo> todos = cal.todos();
Todo * todo = todos.first();
if ( !todo ) {
KMessageBox::error( this,
i18n("Template does not\ncontain a valid Todo."));
} else {
readTodo( todo );
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index ba94057..2b8fbd3 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -18,23 +18,39 @@
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 <QDesktopWidget>
+
#include <qlayout.h>
-#include <qheader.h>
+#include <q3header.h>
#include <qcursor.h>
-#include <qwhatsthis.h>
+#include <q3whatsthis.h>
#include <qdialog.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include <qinputdialog.h>
-#include <qvbox.h>
+#include <q3vbox.h>
+//Added by qt3to4:
+#include <QWheelEvent>
+#include <QFocusEvent>
+#include <QDragLeaveEvent>
+#include <QMouseEvent>
+#include <QDragEnterEvent>
+#include <QKeyEvent>
+#include <Q3HBoxLayout>
+#include <Q3VBoxLayout>
+#include <QDropEvent>
+#include <QDragMoveEvent>
+#include <QPaintEvent>
+#include <Q3PopupMenu>
+#include <Q3PtrList>
#include <kdebug.h>
#include "koprefs.h"
#include <klocale.h>
#include <kglobal.h>
#include <kdateedit.h>
#include "ktimeedit.h"
@@ -65,18 +81,18 @@ using namespace KOrg;
KOStartTodoPrefs::KOStartTodoPrefs( QString sum, QWidget *parent, const char *name ) :
QDialog( parent, name, true )
{
mStopAll = true;
setCaption( i18n("Start todo") );
- QVBoxLayout* lay = new QVBoxLayout( this );
+ Q3VBoxLayout* lay = new Q3VBoxLayout( this );
lay->setSpacing( 3 );
lay->setMargin( 3 );
QLabel * lab = new QLabel( i18n("<b>%1\n</b>").arg( sum ), this );
lay->addWidget( lab );
- lab->setAlignment( AlignCenter );
+ lab->setAlignment( Qt::AlignCenter );
QPushButton * ok = new QPushButton( i18n("Start this todo\nand stop all running"), this );
lay->addWidget( ok );
ok->setDefault( true );
QPushButton * start = new QPushButton( i18n("Start todo"), this );
lay->addWidget( start );
@@ -95,26 +111,26 @@ void KOStartTodoPrefs::doStop()
}
KOStopTodoPrefs::KOStopTodoPrefs( Todo* todo, QWidget *parent, const char *name ) :
QDialog( parent, name, true )
{
mTodo = todo;
setCaption( i18n("Stop todo") );
- QVBoxLayout* lay = new QVBoxLayout( this );
+ Q3VBoxLayout* lay = new Q3VBoxLayout( this );
lay->setSpacing( 3 );
lay->setMargin( 3 );
QLabel * lab = new QLabel( i18n("<b>%1\n</b>").arg( todo->summary() ), this );
lay->addWidget( lab );
- lab->setAlignment( AlignHCenter );
+ lab->setAlignment( Qt::AlignHCenter );
lab = new QLabel( i18n("Additional Comment:"), this );
lay->addWidget( lab );
mComment = new QLineEdit( this );
lay->addWidget( mComment );
- QHBox * start = new QHBox ( this );
+ Q3HBox * start = new Q3HBox ( this );
lay->addWidget( start );
lab = new QLabel( i18n("Start:"), start );
- QHBox * end = new QHBox ( this );
+ Q3HBox * end = new Q3HBox ( this );
lay->addWidget( end );
lab = new QLabel( i18n("End:"), end );
sde = new KDateEdit( start );
ste = new KOTimeEdit( start );
connect ( sde,SIGNAL(setTimeTo( QTime ) ),ste , SLOT ( setTime(QTime ) ) );
ede = new KDateEdit( end );
@@ -170,16 +186,16 @@ void KOStopTodoPrefs::doNotSave()
if (result != KMessageBox::Continue) return;
mTodo->stopRunning();
QDialog::accept();
}
-class KOTodoViewWhatsThis :public QWhatsThis
+class KOTodoViewWhatsThis :public Q3WhatsThis
{
public:
- KOTodoViewWhatsThis( QWidget *wid, KOTodoView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { };
+ KOTodoViewWhatsThis( QWidget *wid, KOTodoView* view ) : Q3WhatsThis( wid ), _wid(wid),_view (view) { };
protected:
virtual QString text( const QPoint& p)
{
return _view->getWhatsThisText(p) ;
}
@@ -211,13 +227,13 @@ KOTodoListView::KOTodoListView(Calendar *calendar,QWidget *parent,
void KOTodoListView::contentsDragEnterEvent(QDragEnterEvent *e)
{
#ifndef KORG_NODND
// kdDebug() << "KOTodoListView::contentsDragEnterEvent" << endl;
if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) &&
- !QTextDrag::canDecode( e ) ) {
+ !Q3TextDrag::canDecode( e ) ) {
e->ignore();
return;
}
mOldCurrent = currentItem();
#endif
@@ -227,13 +243,13 @@ void KOTodoListView::contentsDragEnterEvent(QDragEnterEvent *e)
void KOTodoListView::contentsDragMoveEvent(QDragMoveEvent *e)
{
#ifndef KORG_NODND
// kdDebug() << "KOTodoListView::contentsDragMoveEvent" << endl;
if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) &&
- !QTextDrag::canDecode( e ) ) {
+ !Q3TextDrag::canDecode( e ) ) {
e->ignore();
return;
}
e->accept();
#endif
@@ -252,13 +268,13 @@ void KOTodoListView::contentsDragLeaveEvent(QDragLeaveEvent *)
void KOTodoListView::contentsDropEvent(QDropEvent *e)
{
#ifndef KORG_NODND
// kdDebug() << "KOTodoListView::contentsDropEvent" << endl;
if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) &&
- !QTextDrag::canDecode( e ) ) {
+ !Q3TextDrag::canDecode( e ) ) {
e->ignore();
return;
}
DndFactory factory( mCalendar );
Todo *todo = factory.createDropTodo(e);
@@ -297,13 +313,13 @@ void KOTodoListView::contentsDropEvent(QDropEvent *e)
if ( destinationEvent )
reparentTodoSignal( destinationEvent, todo );
}
}
else {
QString text;
- if (QTextDrag::decode(e,text)) {
+ if (Q3TextDrag::decode(e,text)) {
//QListViewItem *qlvi = itemAt( contentsToViewport(e->pos()) );
KOTodoViewItem *todoi = static_cast<KOTodoViewItem *>(itemAt( contentsToViewport(e->pos()) ));
qDebug("Dropped : " + text);
QStringList emails = QStringList::split(",",text);
for(QStringList::ConstIterator it = emails.begin();it!=emails.end();++it) {
int pos = (*it).find("<");
@@ -320,20 +336,20 @@ void KOTodoListView::contentsDropEvent(QDropEvent *e)
}
}
#endif
}
void KOTodoListView::wheelEvent (QWheelEvent *e)
{
- QListView::wheelEvent (e);
+ Q3ListView::wheelEvent (e);
}
void KOTodoListView::contentsMousePressEvent(QMouseEvent* e)
{
QPoint p(contentsToViewport(e->pos()));
- QListViewItem *i = itemAt(p);
+ Q3ListViewItem *i = itemAt(p);
bool rootClicked = true;
if (i) {
// if the user clicked into the root decoration of the item, don't
// try to start a drag!
int X = p.x();
//qDebug("%d %d %d", X, header()->sectionPos(0), treeStepSize() );
@@ -345,41 +361,41 @@ void KOTodoListView::contentsMousePressEvent(QMouseEvent* e)
}
} else {
rootClicked = false;
}
#ifndef KORG_NODND
mMousePressed = false;
- if (! rootClicked && !( e->button() == RightButton) ) {
+ if (! rootClicked && !( e->button() == Qt::RightButton) ) {
mPressPos = e->pos();
mMousePressed = true;
} else {
mMousePressed = false;
}
#endif
//qDebug("KOTodoListView::contentsMousePressEvent %d", rootClicked);
#ifndef DESKTOP_VERSION
if (!( e->button() == RightButton && rootClicked) )
- QListView::contentsMousePressEvent(e);
+ Q3ListView::contentsMousePressEvent(e);
#else
- QListView::contentsMousePressEvent(e);
+ Q3ListView::contentsMousePressEvent(e);
#endif
}
void KOTodoListView::paintEvent(QPaintEvent* e)
{
emit paintNeeded();
- QListView::paintEvent( e);
+ Q3ListView::paintEvent( e);
}
void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e)
{
#ifndef KORG_NODND
//QListView::contentsMouseMoveEvent(e);
if (mMousePressed && (mPressPos - e->pos()).manhattanLength() >
QApplication::startDragDistance()*3) {
mMousePressed = false;
- QListViewItem *item = itemAt(contentsToViewport(mPressPos));
+ Q3ListViewItem *item = itemAt(contentsToViewport(mPressPos));
if (item) {
DndFactory factory( mCalendar );
ICalDrag *vd = factory.createDrag(
((KOTodoViewItem *)item)->todo(),viewport());
internalDrop = false;
// we cannot do any senseful here, because the DnD is still broken in Qt
@@ -419,19 +435,19 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e )
e->ignore();
// qDebug(" ignore %d",e->isAutoRepeat() );
return;
}
if (! e->isAutoRepeat() )
mFlagKeyPressed = true;
- QListViewItem* cn;
+ Q3ListViewItem* cn;
if ( (e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter) && mName != "todolistsmall") {
cn = currentItem();
if ( cn ) {
KOTodoViewItem* ci = (KOTodoViewItem*)( cn );
if ( ci ){
- if ( e->state() == ShiftButton )
+ if ( e->state() == Qt::ShiftButton )
ci->setOn( false );
else
ci->setOn( true );
cn = cn->itemBelow();
if ( cn ) {
setCurrentItem ( cn );
@@ -446,18 +462,18 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e )
}
if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton || mName != "todolistsmall" ) {
switch ( e->key() ) {
case Qt::Key_Down:
case Qt::Key_Up:
- QListView::keyPressEvent ( e );
+ Q3ListView::keyPressEvent ( e );
e->accept();
break;
case Qt::Key_Left:
case Qt::Key_Right:
- QListView::keyPressEvent ( e );
+ Q3ListView::keyPressEvent ( e );
e->accept();
return;
break;
default:
e->ignore();
break;
@@ -465,23 +481,23 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e )
return;
}
e->ignore();
}
void KOTodoListView::contentsMouseReleaseEvent(QMouseEvent *e)
{
- QListView::contentsMouseReleaseEvent(e);
+ Q3ListView::contentsMouseReleaseEvent(e);
mMousePressed = false;
}
void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e)
{
if (!e) return;
QPoint vp = contentsToViewport(e->pos());
- QListViewItem *item = itemAt(vp);
+ Q3ListViewItem *item = itemAt(vp);
emit double_Clicked(item);
if (!item) return;
emit doubleClicked(item,vp,0);
}
@@ -489,13 +505,13 @@ void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e)
/////////////////////////////////////////////////////////////////////////////
KOQuickTodo::KOQuickTodo(QWidget *parent) :
QLineEdit(parent)
{
setText(i18n("Click to add new Todo"));
- setFocusPolicy ( QWidget::ClickFocus );
+ setFocusPolicy ( Qt::ClickFocus );
}
void KOQuickTodo::focusInEvent(QFocusEvent *ev)
{
if ( text()==i18n("Click to add new Todo") )
setText("");
@@ -520,20 +536,20 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
mCurItemAbove = 0;
mActiveItem = 0;
mCategoryPopupMenu = 0;
mPendingUpdateBeforeRepaint = false;
isFlatDisplay = false;
mNavigator = 0;
- QBoxLayout *topLayout = new QVBoxLayout(this);
+ Q3BoxLayout *topLayout = new Q3VBoxLayout(this);
mName = QString ( name );
mBlockUpdate = false;
mQuickBar = new QWidget( this );
topLayout->addWidget(mQuickBar);
mQuickAdd = new KOQuickTodo(mQuickBar);
- QBoxLayout *quickLayout = new QHBoxLayout(mQuickBar);
+ Q3BoxLayout *quickLayout = new Q3HBoxLayout(mQuickBar);
quickLayout->addWidget( mQuickAdd );
mNewSubBut = new QPushButton( "sub",mQuickBar );
QPushButton * s_done = new QPushButton( "D",mQuickBar );
QPushButton * s_run = new QPushButton( "R",mQuickBar );
QPushButton * allopen = new QPushButton( "O",mQuickBar );
QPushButton * allclose = new QPushButton( "C",mQuickBar );
@@ -565,25 +581,25 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
s_done->setFixedHeight(fixhei );
allopen->setFixedHeight(fixhei );
allclose->setFixedHeight(fixhei );
s_run->setFixedHeight(fixhei );
mNewSubBut->setFixedHeight(fixhei );
- flat->setFocusPolicy( NoFocus );
- s_done->setFocusPolicy( NoFocus );
- allopen->setFocusPolicy( NoFocus );
- allclose->setFocusPolicy( NoFocus );
- s_run->setFocusPolicy( NoFocus );
- mNewSubBut->setFocusPolicy( NoFocus );
+ flat->setFocusPolicy( Qt::NoFocus );
+ s_done->setFocusPolicy( Qt::NoFocus );
+ allopen->setFocusPolicy( Qt::NoFocus );
+ allclose->setFocusPolicy( Qt::NoFocus );
+ s_run->setFocusPolicy( Qt::NoFocus );
+ mNewSubBut->setFocusPolicy( Qt::NoFocus );
- QWhatsThis::add( flat, i18n("Click this button to display all todos in a <b>flat</b> hierarchy" ) );
- QWhatsThis::add( allopen, i18n("Click this button to display all todos <b>openend</b>" ) );
- QWhatsThis::add( allclose, i18n("Click this button to display all todos <b>closed</b>" ) );
- QWhatsThis::add( s_run, i18n("Click this button to toggle show/hide <b>running</b> todos" ) );
- QWhatsThis::add( mNewSubBut, i18n("Click this button to add a new subtodo to the currently selected todo" ) );
- QWhatsThis::add( s_done, i18n("Click this button to toggle show/hide <b>completed</b> todos" ) );
+ Q3WhatsThis::add( flat, i18n("Click this button to display all todos in a <b>flat</b> hierarchy" ) );
+ Q3WhatsThis::add( allopen, i18n("Click this button to display all todos <b>openend</b>" ) );
+ Q3WhatsThis::add( allclose, i18n("Click this button to display all todos <b>closed</b>" ) );
+ Q3WhatsThis::add( s_run, i18n("Click this button to toggle show/hide <b>running</b> todos" ) );
+ Q3WhatsThis::add( mNewSubBut, i18n("Click this button to add a new subtodo to the currently selected todo" ) );
+ Q3WhatsThis::add( s_done, i18n("Click this button to toggle show/hide <b>completed</b> todos" ) );
quickLayout->addWidget( mNewSubBut );
quickLayout->addWidget( s_done );
quickLayout->addWidget( s_run );
quickLayout->addWidget( allopen );
quickLayout->addWidget( allclose );
@@ -598,77 +614,77 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
mTodoListView->setAllColumnsShowFocus(true);
mTodoListView->setShowSortIndicator(true);
mTodoListView->addColumn(i18n("Todo"));
mTodoListView->addColumn(i18n("Prio"));
- mTodoListView->setColumnAlignment(1,AlignHCenter);
+ mTodoListView->setColumnAlignment(1,Qt::AlignHCenter);
mTodoListView->addColumn(i18n("Complete"));
- mTodoListView->setColumnAlignment(2,AlignCenter);
+ mTodoListView->setColumnAlignment(2,Qt::AlignCenter);
mTodoListView->addColumn(i18n("Due Date"));
- mTodoListView->setColumnAlignment(3,AlignLeft);
+ mTodoListView->setColumnAlignment(3,Qt::AlignLeft);
mTodoListView->addColumn(i18n("Due Time"));
- mTodoListView->setColumnAlignment(4,AlignHCenter);
+ mTodoListView->setColumnAlignment(4,Qt::AlignHCenter);
mTodoListView->addColumn(i18n("Start Date"));
- mTodoListView->setColumnAlignment(5,AlignLeft);
+ mTodoListView->setColumnAlignment(5,Qt::AlignLeft);
mTodoListView->addColumn(i18n("Start Time"));
- mTodoListView->setColumnAlignment(6,AlignHCenter);
+ mTodoListView->setColumnAlignment(6,Qt::AlignHCenter);
//mTodoListView->addColumn(i18n("Cancelled"));
mTodoListView->addColumn(i18n("Categories"));
mTodoListView->addColumn(i18n("Calendar"));
mTodoListView->addColumn(i18n("Last Modified"));
mTodoListView->addColumn(i18n("Created"));
mTodoListView->addColumn(i18n("Last Modified Sub"));
#if 0
mTodoListView->addColumn(i18n("Sort Id"));
- mTodoListView->setColumnAlignment(4,AlignHCenter);
+ mTodoListView->setColumnAlignment(4,Qt::AlignHCenter);
#endif
mTodoListView->setMinimumHeight( 60 );
mTodoListView->setItemsRenameable( true );
mTodoListView->setRenameable( 0 );
mTodoListView->setColumnWidth( 0, 120 );
int iii = 0;
for ( iii = 0; iii< 12 ; ++iii )
- mTodoListView->setColumnWidthMode( iii, QListView::Manual );
+ mTodoListView->setColumnWidthMode( iii, Q3ListView::Manual );
mKOTodoViewWhatsThis = new KOTodoViewWhatsThis(mTodoListView->viewport(),this);
- mPriorityPopupMenu = new QPopupMenu(this);
+ mPriorityPopupMenu = new Q3PopupMenu(this);
for (int i = 1; i <= 5; i++) {
QString label = QString ("%1").arg (i);
mPriority[mPriorityPopupMenu->insertItem (label)] = i;
}
connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int)));
- mPercentageCompletedPopupMenu = new QPopupMenu(this);
+ mPercentageCompletedPopupMenu = new Q3PopupMenu(this);
for (int i = 0; i <= 100; i+=20) {
QString label = QString ("%1 %").arg (i);
mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i;
}
connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int)));
- mCategoryPopupMenu = new QPopupMenu (this);
+ mCategoryPopupMenu = new Q3PopupMenu (this);
mCategoryPopupMenu->setCheckable (true);
connect (mCategoryPopupMenu, SIGNAL (activated (int)), SLOT (changedCategories (int)));
connect (mCategoryPopupMenu, SIGNAL (aboutToShow ()), SLOT (fillCategories ()));
- mCalPopupMenu = new QPopupMenu (this);
+ mCalPopupMenu = new Q3PopupMenu (this);
mCalPopupMenu->setCheckable (true);
connect (mCalPopupMenu, SIGNAL (activated (int)), SLOT (changedCal (int)));
connect (mCalPopupMenu, SIGNAL (aboutToShow ()), SLOT (fillCal ()));
- mItemPopupMenu = new QPopupMenu(this);
+ mItemPopupMenu = new Q3PopupMenu(this);
mItemPopupMenu->insertItem(i18n("Show"), this,
SLOT (showTodo()));
mItemPopupMenu->insertItem(i18n("Edit..."), this,
SLOT (editTodo()));
mItemPopupMenu->insertItem( i18n("Delete..."), this,
SLOT (deleteTodo()));
@@ -707,13 +723,13 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
mItemPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"),
this, SLOT( toggleQuickTodo() ),0, 34 );
mItemPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"),
this, SLOT( toggleRunning() ),0, 35 );
#endif
- mPopupMenu = new QPopupMenu(this);
+ mPopupMenu = new Q3PopupMenu(this);
mPopupMenu->insertItem(SmallIconSet("todo"), i18n("New Todo..."), this,
SLOT (newTodo()),0,1);
mPopupMenu->insertItem(i18n("delete completed To-Dos","Purge Completed..."),
this, SLOT(purgeCompleted()),0,2);
mPopupMenu->insertItem(i18n("Show Completed"),
this, SLOT( toggleCompleted() ),0,3 );
@@ -743,44 +759,44 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos);
mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos );
// Double clicking conflicts with opening/closing the subtree
- connect( mTodoListView, SIGNAL( doubleClicked( QListViewItem *) ),
- SLOT( editItem( QListViewItem *) ) );
+ connect( mTodoListView, SIGNAL( doubleClicked( Q3ListViewItem *) ),
+ SLOT( editItem( Q3ListViewItem *) ) );
/*
connect( mTodoListView, SIGNAL( rightButtonClicked ( QListViewItem *,
const QPoint &,int ) ),
SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) );
*/
- connect( mTodoListView, SIGNAL( contextRequest ( QListViewItem *,
+ connect( mTodoListView, SIGNAL( contextRequest ( Q3ListViewItem *,
const QPoint &,int ) ),
- SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) );
- connect( mTodoListView, SIGNAL( clicked( QListViewItem * ) ),
- SLOT( itemClicked( QListViewItem * ) ) );
- connect( mTodoListView, SIGNAL( double_Clicked( QListViewItem * ) ),
- SLOT( itemDoubleClicked( QListViewItem * ) ) );
+ SLOT( popupMenu( Q3ListViewItem *, const QPoint & ,int) ) );
+ connect( mTodoListView, SIGNAL( clicked( Q3ListViewItem * ) ),
+ SLOT( itemClicked( Q3ListViewItem * ) ) );
+ connect( mTodoListView, SIGNAL( double_Clicked( Q3ListViewItem * ) ),
+ SLOT( itemDoubleClicked( Q3ListViewItem * ) ) );
connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ),
SLOT( updateView() ) );
connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ),
SLOT( todoModified(Todo *, int) ) );
- connect( mTodoListView, SIGNAL( expanded( QListViewItem * ) ),
- SLOT( itemStateChanged( QListViewItem * ) ) );
- connect( mTodoListView, SIGNAL( collapsed( QListViewItem * ) ),
- SLOT( itemStateChanged( QListViewItem * ) ) );
+ connect( mTodoListView, SIGNAL( expanded( Q3ListViewItem * ) ),
+ SLOT( itemStateChanged( Q3ListViewItem * ) ) );
+ connect( mTodoListView, SIGNAL( collapsed( Q3ListViewItem * ) ),
+ SLOT( itemStateChanged( Q3ListViewItem * ) ) );
connect( mTodoListView, SIGNAL( paintNeeded() ),
SLOT( paintNeeded()) );
#if 0
- connect(mTodoListView,SIGNAL(selectionChanged(QListViewItem *)),
- SLOT(selectionChanged(QListViewItem *)));
- connect(mTodoListView,SIGNAL(clicked(QListViewItem *)),
- SLOT(selectionChanged(QListViewItem *)));
- connect(mTodoListView,SIGNAL(pressed(QListViewItem *)),
- SLOT(selectionChanged(QListViewItem *)));
+ connect(mTodoListView,SIGNAL(selectionChanged(Q3ListViewItem *)),
+ SLOT(selectionChanged(Q3ListViewItem *)));
+ connect(mTodoListView,SIGNAL(clicked(Q3ListViewItem *)),
+ SLOT(selectionChanged(Q3ListViewItem *)));
+ connect(mTodoListView,SIGNAL(pressed(Q3ListViewItem *)),
+ SLOT(selectionChanged(Q3ListViewItem *)));
#endif
connect( mTodoListView, SIGNAL(reparentTodoSignal( Todo *,Todo * ) ), SIGNAL(reparentTodoSignal( Todo *,Todo * ) ));
connect( mTodoListView, SIGNAL(unparentTodoSignal(Todo *) ), SIGNAL(unparentTodoSignal(Todo *) ));
connect( mTodoListView, SIGNAL( deleteTodo(Todo *) ), SIGNAL(deleteTodoSignal(Todo *) ));
@@ -878,13 +894,13 @@ void KOTodoView::updateView()
}
}
mTodoListView->setFont( fo );
// QFontMetrics fm ( KOPrefs::instance()->mTodoViewFont );
//mTodoListView->header()->setMaximumHeight(fm.height());
- QPtrList<Todo> todoList = calendar()->todos();
+ Q3PtrList<Todo> todoList = calendar()->todos();
/*
kdDebug() << "KOTodoView::updateView(): Todo List:" << endl;
Event *t;
for(t = todoList.first(); t; t = todoList.next()) {
kdDebug() << " " << t->getSummary() << endl;
@@ -1041,13 +1057,13 @@ bool KOTodoView::checkTodo( Todo * todo )
if ( mNavigator->selectedDates().first() > todo->dtDue().date() )
return false;
}
return true;
}
-void KOTodoView::restoreItemState( QListViewItem *item )
+void KOTodoView::restoreItemState( Q3ListViewItem *item )
{
pendingSubtodo = 0;
while( item ) {
KOTodoViewItem *todoItem = (KOTodoViewItem *)item;
todoItem->setOpen( mDocPrefs->readBoolEntry( todoItem->todo()->uid() ) );
if( item->childCount() > 0 ) restoreItemState( item->firstChild() );
@@ -1093,26 +1109,26 @@ KOTodoView::insertTodoItem(Todo *todo)
void KOTodoView::updateConfig()
{
updateView();
mTodoListView->repaintContents();
}
-QPtrList<Incidence> KOTodoView::selectedIncidences()
+Q3PtrList<Incidence> KOTodoView::selectedIncidences()
{
- QPtrList<Incidence> selected;
+ Q3PtrList<Incidence> selected;
KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem());
// if (!item) item = mActiveItem;
if (item) selected.append(item->todo());
return selected;
}
-QPtrList<Todo> KOTodoView::selectedTodos()
+Q3PtrList<Todo> KOTodoView::selectedTodos()
{
- QPtrList<Todo> selected;
+ Q3PtrList<Todo> selected;
KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem());
// if (!item) item = mActiveItem;
if (item) selected.append(item->todo());
return selected;
@@ -1124,38 +1140,38 @@ void KOTodoView::changeEventDisplay(Event *, int)
}
void KOTodoView::showDates(const QDate &, const QDate &)
{
}
-void KOTodoView::showEvents(QPtrList<Event>)
+void KOTodoView::showEvents(Q3PtrList<Event>)
{
kdDebug() << "KOTodoView::selectEvents(): not yet implemented" << endl;
}
void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd,
const QDate &td)
{
#ifndef KORG_NOPRINTER
calPrinter->preview(CalPrinter::Todolist, fd, td);
#endif
}
-void KOTodoView::editItem(QListViewItem *item )
+void KOTodoView::editItem(Q3ListViewItem *item )
{
if ( item )
emit editTodoSignal(((KOTodoViewItem *)item)->todo());
}
-void KOTodoView::showItem(QListViewItem *item,const QPoint &,int)
+void KOTodoView::showItem(Q3ListViewItem *item,const QPoint &,int)
{
if ( item )
emit showTodoSignal(((KOTodoViewItem *)item)->todo());
}
-void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column)
+void KOTodoView::popupMenu(Q3ListViewItem *item,const QPoint &p,int column)
{
pendingSubtodo = 0;
mActiveItem = (KOTodoViewItem *)item;
if (item) {
switch (column){
case 1:
@@ -1358,13 +1374,13 @@ void KOTodoView::toggleRunningItemQuick()
} else {
t->setRunning( true );
mActiveItem->construct();
topLevelWidget()->setCaption(i18n("Todo started! Double click again to stop!"));
}
}
-void KOTodoView::itemDoubleClicked(QListViewItem *item)
+void KOTodoView::itemDoubleClicked(Q3ListViewItem *item)
{
if ( pendingSubtodo != 0 ) {
topLevelWidget()->setCaption(i18n("Reparenting aborted!"));
}
pendingSubtodo = 0;
//int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() );
@@ -1425,26 +1441,26 @@ void KOTodoView::toggleRunningItem()
t->setRunning( true );
updateTodo ( t, KOGlobals::EVENTEDITED );
}
}
}
-void KOTodoView::itemClicked(QListViewItem *item)
+void KOTodoView::itemClicked(Q3ListViewItem *item)
{
//qDebug("KOTodoView::itemClicked %d", item);
if (!item) {
if ( pendingSubtodo != 0 ) {
topLevelWidget()->setCaption(i18n("Reparenting aborted!"));
}
pendingSubtodo = 0;
return;
}
KOTodoViewItem *todoItem = (KOTodoViewItem *)item;
if ( pendingSubtodo != 0 ) {
bool allowReparent = true;
- QListViewItem *par = item;
+ Q3ListViewItem *par = item;
while ( par ) {
if ( par == pendingSubtodo ) {
allowReparent = false;
break;
}
par = par->parent();
@@ -1466,13 +1482,13 @@ void KOTodoView::itemClicked(QListViewItem *item)
void KOTodoView::setDocumentId( const QString &id )
{
mDocPrefs->setDoc( id );
}
-void KOTodoView::itemStateChanged( QListViewItem *item )
+void KOTodoView::itemStateChanged( Q3ListViewItem *item )
{
if (!item) return;
KOTodoViewItem *todoItem = (KOTodoViewItem *)item;
// kdDebug() << "KOTodoView::itemStateChanged(): " << todoItem->todo()->summary() << endl;
@@ -1539,13 +1555,13 @@ void KOTodoView::setAllClose()
} else {
storeCurrentItem();
}
setOpen(mTodoListView->firstChild(), false);
resetCurrentItem();
}
-void KOTodoView::setOpen( QListViewItem* item, bool setOpenI)
+void KOTodoView::setOpen( Q3ListViewItem* item, bool setOpenI)
{
while ( item ) {
setOpen( item->firstChild(), setOpenI );
item->setOpen( setOpenI );
item = item->nextSibling();
@@ -1560,13 +1576,13 @@ void KOTodoView::displayAllFlat()
if ( mBlockUpdate ) {
return;
}
clearList ();
mPopupMenu->setItemChecked( 8,true );
isFlatDisplay = true;
- QPtrList<Todo> todoList = calendar()->todos();
+ Q3PtrList<Todo> todoList = calendar()->todos();
Todo *todo;
for(todo = todoList.first(); todo; todo = todoList.next()) {
if ( checkTodo( todo ) ) {
KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this);
mTodoMap.insert(todo,todoItem);
}
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h
index 0cbc087..a9e7f30 100644
--- a/korganizer/kotodoview.h
+++ b/korganizer/kotodoview.h
@@ -23,21 +23,31 @@
#ifndef KOTODOVIEW_H
#define KOTODOVIEW_H
#include <qfont.h>
#include <qfontmetrics.h>
#include <qlineedit.h>
-#include <qptrlist.h>
-#include <qstrlist.h>
-#include <qlistbox.h>
-#include <qpopupmenu.h>
+#include <q3ptrlist.h>
+#include <q3strlist.h>
+#include <q3listbox.h>
+#include <q3popupmenu.h>
#include <qlabel.h>
#include <qmap.h>
#include <qdialog.h>
#include <qlabel.h>
-#include <qlistview.h>
+#include <q3listview.h>
+//Added by qt3to4:
+#include <QDragMoveEvent>
+#include <QDropEvent>
+#include <QDragLeaveEvent>
+#include <QWheelEvent>
+#include <QPaintEvent>
+#include <QFocusEvent>
+#include <QMouseEvent>
+#include <QKeyEvent>
+#include <QDragEnterEvent>
#include <klistview.h>
#include <libkcal/calendar.h>
#include <libkcal/todo.h>
#include <korganizer/baseview.h>
@@ -98,13 +108,13 @@ class KOTodoListView : public KListView
KOTodoListView(Calendar *,QWidget *parent=0,const char *name=0);
virtual ~KOTodoListView() {}
signals:
void paintNeeded();
void todoDropped(Todo *, int);
- void double_Clicked(QListViewItem *item);
+ void double_Clicked(Q3ListViewItem *item);
void reparentTodoSignal( Todo *,Todo * );
void unparentTodoSignal(Todo *);
void deleteTodo( Todo * );
protected:
void wheelEvent (QWheelEvent *e);
void contentsDragEnterEvent(QDragEnterEvent *);
@@ -121,13 +131,13 @@ class KOTodoListView : public KListView
void paintEvent(QPaintEvent * pevent);
bool internalDrop;
QString mName;
Calendar *mCalendar;
QPoint mPressPos;
bool mMousePressed;
- QListViewItem *mOldCurrent;
+ Q3ListViewItem *mOldCurrent;
bool mFlagKeyPressed;
void keyPressEvent ( QKeyEvent * ) ;
void keyReleaseEvent ( QKeyEvent * ) ;
};
@@ -154,14 +164,14 @@ class KOTodoView : public KOrg::BaseView
{
Q_OBJECT
public:
KOTodoView(Calendar *, QWidget* parent=0, const char* name=0 );
~KOTodoView();
- QPtrList<Incidence> selectedIncidences();
- QPtrList<Todo> selectedTodos();
+ Q3PtrList<Incidence> selectedIncidences();
+ Q3PtrList<Todo> selectedTodos();
DateList selectedDates()
{DateList q;
return q;}
/** Return number of shown dates. TodoView does not show dates, */
@@ -181,20 +191,20 @@ class KOTodoView : public KOrg::BaseView
void updateView();
void updateConfig();
void changeEventDisplay(Event *, int);
void showDates(const QDate &start, const QDate &end);
- void showEvents(QPtrList<Event> eventList);
+ void showEvents(Q3PtrList<Event> eventList);
void clearSelection();
void jumpToDate ();
- void editItem(QListViewItem *item);
- void showItem(QListViewItem *item,const QPoint &,int);
- void popupMenu(QListViewItem *item,const QPoint &,int);
+ void editItem(Q3ListViewItem *item);
+ void showItem(Q3ListViewItem *item,const QPoint &,int);
+ void popupMenu(Q3ListViewItem *item,const QPoint &,int);
void newTodo();
void newSubTodo();
void unparentTodo();
void reparentTodo();
void showTodo();
void editTodo();
@@ -216,16 +226,16 @@ class KOTodoView : public KOrg::BaseView
void purgeCompleted();
void toggleCompleted();
void toggleRunning();
void toggleQuickTodo();
void updateTodo( Todo *, int );
- void itemClicked(QListViewItem *);
- void itemStateChanged(QListViewItem *);
+ void itemClicked(Q3ListViewItem *);
+ void itemStateChanged(Q3ListViewItem *);
void modified(bool);
- void itemDoubleClicked(QListViewItem *item);
+ void itemDoubleClicked(Q3ListViewItem *item);
void resetFocusToList();
void fillCategories ();
void fillCal ();
void changedCal (int);
signals:
@@ -270,24 +280,24 @@ class KOTodoView : public KOrg::BaseView
KOTodoViewWhatsThis* mKOTodoViewWhatsThis;
friend class KOTodoListView;
void paintEvent(QPaintEvent * pevent);
bool mPendingUpdateBeforeRepaint;
friend class KOTodoViewItem;
QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo);
- void restoreItemState( QListViewItem * );
+ void restoreItemState( Q3ListViewItem * );
bool checkTodo( Todo * );
bool isFlatDisplay;
- void setOpen( QListViewItem*, bool setOpen);
+ void setOpen( Q3ListViewItem*, bool setOpen);
KOTodoListView *mTodoListView;
- QPopupMenu *mItemPopupMenu;
- QPopupMenu *mPopupMenu;
- QPopupMenu *mPriorityPopupMenu;
- QPopupMenu *mPercentageCompletedPopupMenu;
- QPopupMenu *mCategoryPopupMenu;
- QPopupMenu *mCalPopupMenu;
+ Q3PopupMenu *mItemPopupMenu;
+ Q3PopupMenu *mPopupMenu;
+ Q3PopupMenu *mPriorityPopupMenu;
+ Q3PopupMenu *mPercentageCompletedPopupMenu;
+ Q3PopupMenu *mCategoryPopupMenu;
+ Q3PopupMenu *mCalPopupMenu;
QMap<int, int> mPercentage;
QMap<int, int> mPriority;
QMap<int, QString> mCategory;
KOTodoViewItem *mActiveItem;
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp
index 519bb16..c21816d 100644
--- a/korganizer/kotodoviewitem.cpp
+++ b/korganizer/kotodoviewitem.cpp
@@ -16,28 +16,32 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <klocale.h>
#include <kdebug.h>
-#include <qapp.h>
+#include <qapplication.h>
+#include <QDesktopWidget>
+//Added by qt3to4:
+#include <Q3PointArray>
+#include <QPixmap>
#include <kglobal.h>
#include <kiconloader.h>
#include "kotodoviewitem.h"
#include "kotodoview.h"
#include "koprefs.h"
-KOTodoViewItem::KOTodoViewItem( QListView *parent, Todo *todo, KOTodoView *kotodo)
- : QCheckListItem( parent , "", CheckBox ), mTodo( todo ), mTodoView( kotodo )
+KOTodoViewItem::KOTodoViewItem( Q3ListView *parent, Todo *todo, KOTodoView *kotodo)
+ : Q3CheckListItem( parent , "", CheckBox ), mTodo( todo ), mTodoView( kotodo )
{
construct();
}
KOTodoViewItem::KOTodoViewItem( KOTodoViewItem *parent, Todo *todo, KOTodoView *kotodo )
- : QCheckListItem( parent, "", CheckBox ), mTodo( todo ), mTodoView( kotodo )
+ : Q3CheckListItem( parent, "", CheckBox ), mTodo( todo ), mTodoView( kotodo )
{
construct();
}
QString KOTodoViewItem::key(int column,bool) const
{
@@ -77,13 +81,13 @@ void KOTodoViewItem::setSortKey(int column,const QString &key)
}
#if QT_VERSION >= 0x030000
void KOTodoViewItem::paintBranches(QPainter *p,const QColorGroup & cg,int w,
int y,int h)
{
- QListViewItem::paintBranches(p,cg,w,y,h);
+ Q3ListViewItem::paintBranches(p,cg,w,y,h);
}
#else
#endif
void KOTodoViewItem::construct()
{
@@ -313,22 +317,22 @@ void KOTodoViewItem::stateChange(bool state)
}
else {
if (mTodo->isCompleted()) setSortKey(2,QString::number(999));
else setSortKey(2,QString::number(99));
}
if ( state ) {
- QListViewItem * myChild = firstChild();
+ Q3ListViewItem * myChild = firstChild();
KOTodoViewItem *item;
while( myChild ) {
//qDebug("stateCH ");
item = static_cast<KOTodoViewItem*>(myChild);
item->stateChange(state);
myChild = myChild->nextSibling();
}
} else {
- QListViewItem * myChild = parent();
+ Q3ListViewItem * myChild = parent();
if ( myChild )
(static_cast<KOTodoViewItem*>(myChild))->stateChange(state);
}
mTodoView->modified(true);
setMyPixmap();
mTodoView->setTodoModified( mTodo );
@@ -380,18 +384,18 @@ bool KOTodoViewItem::isAlternate()
m_odd = above ? !above->m_odd : false;
}
else
{
KOTodoViewItem *item;
bool previous = true;
- if (QListViewItem::parent())
+ if (Q3ListViewItem::parent())
{
- item = static_cast<KOTodoViewItem *>(QListViewItem::parent());
+ item = static_cast<KOTodoViewItem *>(Q3ListViewItem::parent());
if (item)
previous = item->m_odd;
- item = static_cast<KOTodoViewItem *>(QListViewItem::parent()->firstChild());
+ item = static_cast<KOTodoViewItem *>(Q3ListViewItem::parent()->firstChild());
}
else
{
KOTodoListView *lv = static_cast<KOTodoListView *>(listView());
item = static_cast<KOTodoViewItem *>(lv->firstChild());
}
@@ -473,36 +477,36 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i
p->fillRect( 0, 0, width, height(), _cg.base() ); // background
// p->setPen(Qt::black ); //border
// p->setBrush( KOPrefs::instance()->mHighlightColorKGlobalSettings::baseColor() ); //filling
QColor fc = KOPrefs::instance()->mHighlightColor;
if ( mTodo->percentComplete() == 100 )
- fc = darkGreen;
+ fc = Qt::darkGreen;
p->drawRect( 2, 2, width-4, height()-4);
p->fillRect( 3, 3, progress, height()-6,
fc );
p->restore();
} else {
- QCheckListItem::paintCell(p, _cg, column, width, alignment);
+ Q3CheckListItem::paintCell(p, _cg, column, width, alignment);
}
return;
}
int align = alignment;
if ( !p )
return;
p->fillRect( 0, 0, width, height(), _cg.brush( QColorGroup::Base ) );
- QListView *lv = listView();
+ Q3ListView *lv = listView();
if ( !lv )
return;
int marg = 2;//lv->itemMargin();
int r = 0;
- QCheckListItem::Type myType = QCheckListItem::CheckBox;
+ Q3CheckListItem::Type myType = Q3CheckListItem::CheckBox;
int BoxSize = 20;
int boxOffset = 2;
int xOffset = 2;
if (qApp->desktop()->width() < 300 ) {
BoxSize = 14;
boxOffset = -1;
@@ -519,13 +523,13 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i
int lineStart = 5;
if ( myType == Controller ) {
if ( !pixmap( 0 ) )
r += BoxSize + 4;
} else {
- ASSERT( lv ); //###
+ Q_ASSERT( lv ); //###
// QFontMetrics fm( lv->font() );
// int d = fm.height();
int x = 0;
int y = (height() - BoxSize) / 2;
// p->setPen( QPen( _cg.text(), winStyle ? 2 : 1 ) );
if ( myType == CheckBox ) {
@@ -536,13 +540,13 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i
p->drawRect( x+marg, y+2, BoxSize-4, BoxSize-4 );
lineStart = x+marg;
/////////////////////
x++;
y++;
if ( isOn() ) {
- QPointArray a( 7*2 );
+ Q3PointArray a( 7*2 );
int i, xx, yy;
xx = x+xOffset+marg+(boxOffset/2);
yy = y+5+boxOffset;
for ( i=0; i<3; i++ ) {
a.setPoint( 2*i, xx, yy );
a.setPoint( 2*i+1, xx, yy+2 );
@@ -552,25 +556,25 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i
yy -= 2;
for ( i=3; i<7; i++ ) {
a.setPoint( 2*i, xx, yy );
a.setPoint( 2*i+1, xx, yy+2 );
xx++; yy--;
}
- p->setPen( darkGreen );
+ p->setPen( Qt::darkGreen );
p->drawLineSegments( a );
}
////////////////////////
}
r += BoxSize + 4;
}
p->translate( r, 0 );
p->setPen( QPen( _cg.text() ) );
- QListViewItem::paintCell( p, _cg, column, width - r, align );
+ Q3ListViewItem::paintCell( p, _cg, column, width - r, align );
if ( mTodo->cancelled () ) {
- p->setPen( black );
+ p->setPen( Qt::black );
QRect br = p->boundingRect( 1,1,1,1,0,mTodo->summary() );
int wid = br.width() +lineStart;
if ( wid > width-3 )
wid = width-3;
p->drawLine( lineStart, height()/2+1, wid, height()/2+1 );
diff --git a/korganizer/kotodoviewitem.h b/korganizer/kotodoviewitem.h
index bd024c8..62a635c 100644
--- a/korganizer/kotodoviewitem.h
+++ b/korganizer/kotodoviewitem.h
@@ -19,19 +19,19 @@
#ifndef KOTODOVIEWITEM_H
#define KOTODOVIEWITEM_H
#include <qfont.h>
#include <qfontmetrics.h>
#include <qlineedit.h>
-#include <qptrlist.h>
-#include <qstrlist.h>
-#include <qlistbox.h>
-#include <qpopupmenu.h>
+#include <q3ptrlist.h>
+#include <q3strlist.h>
+#include <q3listbox.h>
+#include <q3popupmenu.h>
#include <qlabel.h>
#include <qmap.h>
-#include <qlistview.h>
+#include <q3listview.h>
#include <qpainter.h>
#include <libkcal/calendar.h>
#include <libkcal/todo.h>
using namespace KCal;
@@ -42,22 +42,22 @@ class KOTodoView;
This class provides a way of displaying a single Event of Todo-Type in a
KTodoView.
@author Cornelius Schumacher <schumacher@kde.org>
@see KOTodoView
*/
-class KOTodoViewItem : public QCheckListItem
+class KOTodoViewItem : public Q3CheckListItem
{
public:
/**
Constructor.
@param parent is the list view to which this item belongs.
@param ev is the event to have the item display information for.
*/
- KOTodoViewItem(QListView *parent, Todo *todo, KOTodoView *kotodo);
+ KOTodoViewItem(Q3ListView *parent, Todo *todo, KOTodoView *kotodo);
KOTodoViewItem(KOTodoViewItem *parent, Todo *todo, KOTodoView *kotodo);
//~KOTodoViewItem() { qDebug("~KOTodoViewItem() %s ", text(0).latin1() );}
void construct();
Todo *todo() { return mTodo; }
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index 4057ae0..07c4295 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -20,13 +20,15 @@
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 <qwidgetstack.h>
+#include <q3widgetstack.h>
+//Added by qt3to4:
+#include <Q3PtrList>
#include <kconfig.h>
#include <kglobal.h>
#ifndef DESKTOP_VERSION
#include <qpe/qpeapplication.h>
#else
@@ -454,14 +456,14 @@ void KOViewManager::showListView()
connect( mListView, SIGNAL( cancelIncidenceSignal( Incidence * ) ),
mMainView, SLOT ( cancelIncidence( Incidence * ) ) );
connect( mListView, SIGNAL( moveIncidenceSignal( Incidence * ) ),
mMainView, SLOT ( moveIncidence( Incidence * ) ) );
connect( mListView, SIGNAL( beamIncidenceSignal( Incidence * ) ),
mMainView, SLOT ( beamIncidence( Incidence * ) ) );
- connect( mListView, SIGNAL( beamIncidenceList( QPtrList<Incidence> ) ),
- mMainView, SLOT ( beamIncidenceList( QPtrList<Incidence> ) ) );
+ connect( mListView, SIGNAL( beamIncidenceList( Q3PtrList<Incidence> ) ),
+ mMainView, SLOT ( beamIncidenceList( Q3PtrList<Incidence> ) ) );
}
// bool temp = mFlagShowNextxDays;
//globalFlagBlockPainting = true;
globalFlagBlockAgenda = 1;
if ( KOPrefs::instance()->mListViewMonthTimespan ) {
mMainView->setBlockShowDates( true );
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp
index f88403c..bfe930f 100644
--- a/korganizer/kowhatsnextview.cpp
+++ b/korganizer/kowhatsnextview.cpp
@@ -15,20 +15,26 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <qlayout.h>
-#include <qtextbrowser.h>
+#include <q3textbrowser.h>
#include <qtextcodec.h>
#include <qfileinfo.h>
#include <qlabel.h>
#include <qapplication.h>
+#include <QDesktopWidget>
#ifdef DESKTOP_VERSION
-#include <qpaintdevicemetrics.h>
+#include <q3paintdevicemetrics.h>
+//Added by qt3to4:
+#include <Q3PtrList>
+#include <QHideEvent>
+#include <Q3VBoxLayout>
+#include <QShowEvent>
#endif
#include <kglobal.h>
#include <klocale.h>
#include <kdebug.h>
#include <kiconloader.h>
#include <kmessagebox.h>
@@ -39,13 +45,13 @@
#include "calprinter.h"
#endif
#include "koglobals.h"
#include "koprefs.h"
#include "koeventviewerdialog.h"
#include "koeventviewer.h"
-#include <qstylesheet.h>
+#include <q3stylesheet.h>
#include "kowhatsnextview.h"
using namespace KOrg;
void WhatsNextTextBrowser::setSource(const QString& n)
{
@@ -53,13 +59,13 @@ void WhatsNextTextBrowser::setSource(const QString& n)
emit showIncidence(n);
return;
} else if (n.startsWith("todo:")) {
emit showIncidence(n);
return;
} else {
- QTextBrowser::setSource(n);
+ Q3TextBrowser::setSource(n);
}
}
void WhatsNextTextBrowser::printMe()
{
#ifdef DESKTOP_VERSION
KOPrintPrefs pp ( this );
@@ -69,13 +75,13 @@ void WhatsNextTextBrowser::printMe()
QPrinter printer;
if (!printer.setup() )
return;
QPainter p;
p.begin ( &printer );
- QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer );
+ Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer );
float dx, dy;
int wid = (m.width() * 9)/10;
dx = (float) wid/(float)contentsWidth ();
dy = (float)(m.height()) / (float)contentsHeight ();
float scale;
// scale to fit the width or height of the paper
@@ -100,25 +106,25 @@ KOWhatsNextView::KOWhatsNextView(Calendar *calendar, QWidget *parent,
// new QLabel(KGlobal::locale()->formatDate(QDate::currentDate()),this);
// mDateLabel->setMargin(2);
// mDateLabel->setAlignment(AlignCenter);
setFont( KOPrefs::instance()->mWhatsNextFont );
mView = new WhatsNextTextBrowser(this);
connect(mView,SIGNAL(showIncidence(const QString &)),SLOT(showIncidence(const QString &)));
- QStyleSheet* stsh = mView->styleSheet();
- QStyleSheetItem * style ;
+ Q3StyleSheet* stsh = mView->styleSheet();
+ Q3StyleSheetItem * style ;
style = stsh->item ("h2" );
if ( style ) {
- style->setMargin(QStyleSheetItem::MarginAll,0);
+ style->setMargin(Q3StyleSheetItem::MarginAll,0);
}
style = stsh->item ("h3" );
if ( style ) {
- style->setMargin(QStyleSheetItem::MarginAll,0);
+ style->setMargin(Q3StyleSheetItem::MarginAll,0);
}
mEventViewer = 0;
- QBoxLayout *topLayout = new QVBoxLayout(this);
+ Q3BoxLayout *topLayout = new Q3VBoxLayout(this);
// topLayout->addWidget(mDateLabel);
topLayout->addWidget(mView);
mTimer = new QTimer( this );
connect(mTimer,SIGNAL( timeout() ),this, SLOT(updateView()));
connect(mView->horizontalScrollBar (),SIGNAL( sliderReleased () ),this, SLOT(restartTimer()));
@@ -141,15 +147,15 @@ int KOWhatsNextView::currentDateCount()
void KOWhatsNextView::clearList()
{
mTimer->stop();
mView->setText(" ");
}
-QPtrList<Incidence> KOWhatsNextView::selectedIncidences()
+Q3PtrList<Incidence> KOWhatsNextView::selectedIncidences()
{
- QPtrList<Incidence> eventList;
+ Q3PtrList<Incidence> eventList;
return eventList;
}
void KOWhatsNextView::printMe()
{
@@ -216,14 +222,14 @@ void KOWhatsNextView::updateView()
#else
mText += "<font color=\"#FFFFFF\"> <em>" + KGlobal::locale()->formatDate( mEventDate , false )+"</em></font></h2>";
#endif
mText += "</td></tr>\n<tr bgcolor=\"#EAF8FA\"><td>";
int iii;
mTodos.clear();
- QPtrList<Event> events;
- QPtrList<Todo> todos = calendar()->todos();
+ Q3PtrList<Event> events;
+ Q3PtrList<Todo> todos = calendar()->todos();
Todo * todo;
//mText += "<h2>" + i18n("Events: ") + "</h2>\n";
int daysToShow = KOPrefs::instance()->mWhatsNextDays ;
bool itemAdded = false;
for ( iii = 0; iii < daysToShow; ++iii ) {
QString date;
@@ -451,13 +457,13 @@ void KOWhatsNextView::appendDay( int i, QDate eventDate )
void KOWhatsNextView::showDates(const QDate &, const QDate &)
{
updateView();
}
-void KOWhatsNextView::showEvents(QPtrList<Event>)
+void KOWhatsNextView::showEvents(Q3PtrList<Event>)
{
}
void KOWhatsNextView::changeEventDisplay(Event *, int action)
{
switch(action) {
@@ -738,13 +744,13 @@ bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub )
mText += "</p>\n";
}
else {
ind += "-";
mText += "</li>\n";
}
- QPtrList<Incidence> Relations = ev->relations();
+ Q3PtrList<Incidence> Relations = ev->relations();
Incidence *to;
for (to=Relations.first();to;to=Relations.next()) {
if (!((Todo*)to)->isCompleted() && ((Todo*)to)->priority() <= mCurrentMaxPrio )
appendTodo( to, ind , true );
}
diff --git a/korganizer/kowhatsnextview.h b/korganizer/kowhatsnextview.h
index 93574ef..49fc448 100644
--- a/korganizer/kowhatsnextview.h
+++ b/korganizer/kowhatsnextview.h
@@ -16,28 +16,34 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef KOWHATSNEXTVIEW_H
#define KOWHATSNEXTVIEW_H
-#include <qtextbrowser.h>
+#include <q3textbrowser.h>
#include <qtimer.h>
+//Added by qt3to4:
+#include <QShowEvent>
+#include <QHideEvent>
+#include <QLabel>
+#include <Q3ValueList>
+#include <Q3PtrList>
#include <korganizer/baseview.h>
-class QListView;
+class Q3ListView;
class QLabel;
class KOEventViewerDialog;
#include <qpainter.h>
#include <qwidget.h>
-class WhatsNextTextBrowser : public QTextBrowser {
+class WhatsNextTextBrowser : public Q3TextBrowser {
Q_OBJECT
public:
- WhatsNextTextBrowser(QWidget *parent) : QTextBrowser(parent) {};
+ WhatsNextTextBrowser(QWidget *parent) : Q3TextBrowser(parent) {};
void setSource(const QString &);
void printMe();
signals:
void showIncidence(const QString &uid);
@@ -55,25 +61,25 @@ class KOWhatsNextView : public KOrg::BaseView
const char *name = 0);
~KOWhatsNextView();
virtual int maxDatesHint();
virtual int currentDateCount();
void setEventViewer(KOEventViewerDialog* v );
- virtual QPtrList<Incidence> selectedIncidences();
+ virtual Q3PtrList<Incidence> selectedIncidences();
void clearList();
DateList selectedDates()
{DateList q;
return q;}
virtual void printPreview(CalPrinter *calPrinter,
const QDate &, const QDate &);
public slots:
virtual void updateView();
void printMe();
virtual void showDates(const QDate &start, const QDate &end);
- virtual void showEvents(QPtrList<Event> eventList);
+ virtual void showEvents(Q3PtrList<Event> eventList);
void updateConfig();
void changeEventDisplay(Event *, int);
protected:
bool appendEvent(Incidence *, bool reply=false, bool notRed = true, bool appendTable = false);
bool appendTodo(Incidence *, QString ind = "", bool isSub = false );
@@ -93,10 +99,10 @@ class KOWhatsNextView : public KOrg::BaseView
QTimer* mTimer;
WhatsNextTextBrowser *mView;
QString mText;
// QLabel *mDateLabel;
KOEventViewerDialog *mEventViewer;
- QValueList<Incidence *> mTodos;
+ Q3ValueList<Incidence *> mTodos;
};
#endif
diff --git a/korganizer/ktimeedit.cpp b/korganizer/ktimeedit.cpp
index df9b2fc..e2ae4a6 100644
--- a/korganizer/ktimeedit.cpp
+++ b/korganizer/ktimeedit.cpp
@@ -18,18 +18,21 @@
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 <qkeycode.h>
+#include <qnamespace.h>
#include <qcombobox.h>
#include <qdatetime.h>
#include <qlineedit.h>
-#include <qlistbox.h>
+#include <q3listbox.h>
#include <qapplication.h>
+#include <QDesktopWidget>
+//Added by qt3to4:
+#include <QKeyEvent>
#include <kmessagebox.h>
#include <kglobal.h>
#include <kdebug.h>
#include <klocale.h>
#include <kpimglobalprefs.h>
@@ -42,13 +45,13 @@
// Mostly locale aware. Author: David Faure <faure@kde.org>
// KTimeWidget/QTimeEdit provide nicer editing, but don't provide a combobox.
// Difficult to get all in one...
// But Qt-3.2 will offer QLineEdit::setMask, so a "99:99" mask would help.
KOTimeEdit::KOTimeEdit(QWidget *parent, QTime qt, const char *name)
- : QComboBox(TRUE, parent, name)
+ : Q3ComboBox(TRUE, parent, name)
{
setInsertionPolicy(NoInsertion);
mFlagKeyPressed = false;
if ( QApplication::desktop()->height() <= 480 ) {
setSizeLimit ( 6 );
} else {
@@ -61,18 +64,18 @@ KOTimeEdit::KOTimeEdit(QWidget *parent, QTime qt, const char *name)
// Fill combo box with selection of times in localized format.
QTime timeEntry(0,0,0);
do {
insertItem(KGlobal::locale()->formatTime(timeEntry));
timeEntry = timeEntry.addSecs(60*15);
- } while (!timeEntry.isNull());
+ } while ( !( timeEntry.hour() || timeEntry.minute() ) );
// Add end of day.
insertItem( KGlobal::locale()->formatTime( QTime( 23, 59, 59 ) ) );
updateText();
- setFocusPolicy(QWidget::StrongFocus);
+ setFocusPolicy(Qt::StrongFocus);
connect(this, SIGNAL(activated(int)), this, SLOT(activ(int)));
connect(this, SIGNAL(highlighted(int)), this, SLOT(hilit(int)));
connect(this,SIGNAL(textChanged(const QString&)),this,SLOT(changedText()));
QFontMetrics fm ( font() );
QString timeString = "24:00";
@@ -205,30 +208,30 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
return;
}
if (! e->isAutoRepeat() ) {
mFlagKeyPressed = true;
}
// Tap -> Focus Next Widget
- if ( e->key() == Key_Tab ) {
- QComboBox::keyPressEvent(e);
+ if ( e->key() == Qt::Key_Tab ) {
+ Q3ComboBox::keyPressEvent(e);
return;
}
// save Text from QLineEdit and CursorPosition
QString text = lineEdit()->text();
int cpos = lineEdit()->cursorPosition();
// qDebug("cpos %d ", cpos);
// Switch for arrows, backspace and escape
switch(e->key()) {
- case Key_Escape:
+ case Qt::Key_Escape:
lineEdit()->deselect();
- case Key_Tab:
- QComboBox::keyPressEvent(e);
+ case Qt::Key_Tab:
+ Q3ComboBox::keyPressEvent(e);
break;
- case Key_Up:
+ case Qt::Key_Up:
if ( e->state () == Qt::ControlButton ) {
addTime(QTime(0,15,0), false );
lineEdit()->setCursorPosition(3);
setSelect( 3 , 2 );
}
else
@@ -264,13 +267,13 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
case 0:
addTime(QTime(1,0,0), false );
setSelect ( 0, 2 );
break;
}
break;
- case Key_Down:
+ case Qt::Key_Down:
if ( e->state () == Qt::ControlButton ) {
subTime(QTime(0,15,0), false );
lineEdit()->setCursorPosition(3);
setSelect( 3 , 2 );
}
else
@@ -307,55 +310,55 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
subTime(QTime(1,0,0), false );
setSelect ( 0 , 2 );
break;
}
break;
// set cursor to correct place
- case Key_Left:
+ case Qt::Key_Left:
if ( cpos == 3 )
--cpos;
if ( cpos > 0) {
lineEdit()->setCursorPosition(--cpos);
setSelect ( cpos , 1 );
}
else
setSelect ( 0 , 1 );
break;
// set cursor to correct place
- case Key_Right:
+ case Qt::Key_Right:
if ( cpos == 1 )
++cpos;
if ( cpos < maxpos ) {
lineEdit()->setCursorPosition(++cpos);
setSelect ( cpos , 1 );
}
break;
// rest
- case Key_Prior:
+ case Qt::Key_Prior:
subTime(QTime(1,0,0));
break;
- case Key_Next:
+ case Qt::Key_Next:
addTime(QTime(1,0,0));
break;
- case Key_Backspace:
+ case Qt::Key_Backspace:
if ( cpos > 0) {
if ( cpos == 3 )
--cpos;
if ( cpos > 5)
cpos = 5;
- text.at( cpos-1 ) = '0';
+ text[ cpos-1 ] = '0';
lineEdit()->setText( text );
lineEdit()->setCursorPosition(--cpos);
setSelect ( cpos , 1 );
changedText();
}
break;
} // switch arrows
// if cursor at string end, alltext market and keyEvent don't ArrowLeft -> deselect and cpos
- if( cpos > 4 && lineEdit()->markedText().length() == 5 && e->key() != Key_Left ) {
+ if( cpos > 4 && lineEdit()->markedText().length() == 5 && e->key() != Qt::Key_Left ) {
lineEdit()->deselect();
cpos = 0;
lineEdit()->setCursorPosition(cpos);
setSelect(cpos , 1);
}
@@ -364,77 +367,77 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
}
// num keys when cursorPos preEnd
if ( cpos < 5 ) {
// switch another keys
switch(e->key()) {
- case Key_Delete:
- text.at( cpos ) = '0';
+ case Qt::Key_Delete:
+ text[ cpos ] = '0';
lineEdit()->setText( text );
lineEdit()->setCursorPosition(cpos);
setSelect ( cpos , 1 );
changedText();
break;
- case Key_9:
- case Key_8:
- case Key_7:
- case Key_6:
+ case Qt::Key_9:
+ case Qt::Key_8:
+ case Qt::Key_7:
+ case Qt::Key_6:
if ( !(cpos == 1 || cpos == 4) )
return;
if ( cpos == 1 && text.at( 0 ) > '1')
- text.at( 0 ) = '1';
- case Key_5:
- case Key_4:
- case Key_3:
+ text[ 0 ] = '1';
+ case Qt::Key_5:
+ case Qt::Key_4:
+ case Qt::Key_3:
if ( cpos < 1 )
return;
if ( hour12Format && cpos == 1 )
return;
- case Key_2:
+ case Qt::Key_2:
if ( hour12Format && cpos == 0 )
return;
if ( cpos == 0 && text.at( 1 ) > '3')
- text.at( 1 ) = '3';
- case Key_1:
- case Key_0:
+ text[ 1 ] = '3';
+ case Qt::Key_1:
+ case Qt::Key_0:
if ( hour12Format ) {
- if ( e->key() == Key_0 && cpos == 1 && text.at( 0 ) == '0' )
+ if ( e->key() == Qt::Key_0 && cpos == 1 && text.at( 0 ) == '0' )
return;
- if ( e->key() == Key_0 && cpos == 0 && text.at( 1 ) == '0' )
- text.at( 1 ) = '1';
+ if ( e->key() == Qt::Key_0 && cpos == 0 && text.at( 1 ) == '0' )
+ text[ 1 ] = '1';
}
- text.at( cpos ) = QChar ( e->key() );
+ text[ cpos ] = QChar ( e->key() );
lineEdit()->setText( text );
if ( cpos == 1 )
++cpos;
if ( cpos < 5)
lineEdit()->setCursorPosition(++cpos);
setSelect( cpos , 1 );
changedText();
break;
- case Key_Home:
+ case Qt::Key_Home:
lineEdit()->setCursorPosition(0);
setSelect( cpos , 1 );
break;
- case Key_End:
+ case Qt::Key_End:
lineEdit()->setCursorPosition(5);
lineEdit()->deselect();
break;
default:
// QComboBox::keyPressEvent(e);
break;
} // switch num keys
} else if ( cpos == 5 ) {// if cpos < 5
if ( hour12Format ) {
- if ( e->key() == Key_A ) {
- text.at( 5 ) = 'a';
+ if ( e->key() == Qt::Key_A ) {
+ text[ 5 ] = 'a';
lineEdit()->setText( text );
lineEdit()->setCursorPosition(5);
- } else if ( e->key() == Key_P ) {
- text.at( 5 ) = 'p';
+ } else if ( e->key() == Qt::Key_P ) {
+ text[ 5 ] = 'p';
lineEdit()->setText( text );
lineEdit()->setCursorPosition(5);
}
}
}
diff --git a/korganizer/ktimeedit.h b/korganizer/ktimeedit.h
index b3d842d..1c7d18d 100644
--- a/korganizer/ktimeedit.h
+++ b/korganizer/ktimeedit.h
@@ -21,27 +21,30 @@
without including the source code for Qt in the source distribution.
*/
#ifndef _KTIMEEDIT_H
#define _KTIMEEDIT_H
#include <qevent.h>
-#include <qkeycode.h>
+#include <qnamespace.h>
#include <qstring.h>
#include <qdatetime.h>
#include <qcombobox.h>
+#include <Q3ComboBox>
+//Added by qt3to4:
+#include <QKeyEvent>
#include <kapplication.h>
/**
This is a class that provides an easy, user friendly way to edit times.
up/down/ increase or decrease time, respectively.
@short Provides a way to edit times in a user-friendly manner.
@author Preston Brown, Ian Dawes
*/
-class KOTimeEdit : public QComboBox
+class KOTimeEdit : public Q3ComboBox
{
Q_OBJECT
public:
/** constructs a new time edit. */
KOTimeEdit(QWidget *parent=0, QTime qt=QTime(12,0), const char *name=0);
diff --git a/korganizer/lineview.cpp b/korganizer/lineview.cpp
index e72e41c..012455e 100644
--- a/korganizer/lineview.cpp
+++ b/korganizer/lineview.cpp
@@ -4,13 +4,13 @@
#include "koprefs.h"
#include "lineview.h"
LineView::LineView( QWidget *parent, const char *name ) :
- QScrollView( parent, name )
+ Q3ScrollView( parent, name )
{
mPixelWidth = 1000;
mLines.setAutoDelete( true );
resizeContents( mPixelWidth, contentsHeight() );
diff --git a/korganizer/lineview.h b/korganizer/lineview.h
index aa34dbc..52ae9cf 100644
--- a/korganizer/lineview.h
+++ b/korganizer/lineview.h
@@ -1,13 +1,13 @@
#ifndef LINEVIEW_H
#define LINEVIEW_H
-#include <qscrollview.h>
-#include <qptrlist.h>
+#include <q3scrollview.h>
+#include <q3ptrlist.h>
-class LineView : public QScrollView
+class LineView : public Q3ScrollView
{
Q_OBJECT
public:
LineView( QWidget *parent = 0, const char *name = 0 );
virtual ~LineView();
@@ -25,12 +25,12 @@ class LineView : public QScrollView
Line( int c, int s, int e ) : column( c ), start( s ), end( e ) {}
int column;
int start;
int end;
};
- QPtrList<Line> mLines;
+ Q3PtrList<Line> mLines;
int mPixelWidth;
};
#endif
diff --git a/korganizer/main.cpp b/korganizer/main.cpp
index 4a0e24f..211fde6 100644
--- a/korganizer/main.cpp
+++ b/korganizer/main.cpp
@@ -1,19 +1,19 @@
#ifndef DESKTOP_VERSION
#include <qpe/qpeapplication.h>
#include <qcopchannel_qws.h>
#include <qpe/global.h>
+//Added by qt3to4:
+#include <Q3CString>
#include <stdlib.h>
#else
#include <qapplication.h>
#include <qstring.h>
#include <qwindowsstyle.h>
-#include <qplatinumstyle.h>
-#include <qsgistyle.h>
#include <stdlib.h>
#endif
#include <qtextcodec.h>
#include <qdir.h>
#include <kstandarddirs.h>
@@ -23,18 +23,18 @@
#include <libkdepim/kpimglobalprefs.h>
void dumpMissing();
int main( int argc, char **argv )
{
+ if(!getenv("QPEDIR")) putenv("QPEDIR=/usr/lib/kdepimpi");
#ifndef DESKTOP_VERSION
QPEApplication a( argc, argv );
a.setKeepRunning ();
#else
QApplication a( argc, argv );
- QApplication::setStyle( new QPlatinumStyle ());
#ifdef _WIN32_
QString hdir ( getenv( "HOME") );
if ( hdir.isEmpty() ) {
QString hd ("C:/" );
//QMessageBox::information(0,"hh",QDir::homeDirPath()+" xx" +hd );
if ( QDir::homeDirPath().lower() == hd.lower() ) {
@@ -86,22 +86,22 @@ int main( int argc, char **argv )
QApplication::setFont( KPimGlobalPrefs::instance()->mApplicationFont );
KPimGlobalPrefs::instance()->setGlobalConfig();
MainWindow m;
#ifndef DESKTOP_VERSION
- QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(receiveStart( const QCString&, const QByteArray& )));
+ QObject::connect( &a, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )),&m, SLOT(receiveStart( const Q3CString&, const QByteArray& )));
a.showMainWidget(&m );
#else
a.setMainWidget(&m );
m.show();
//m.resize( 800, 600 );
//QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
#endif
if ( argc > 1 ) {
- QCString command = argv[1];
+ Q3CString command = argv[1];
if ( argc > 2 )
command += argv[2];
m.recieve(command, QByteArray() );
}
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 69ccde1..2004939 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1,38 +1,48 @@
#include <stdlib.h>
#include <qaction.h>
-#include <qpopupmenu.h>
+#include <Q3Action>
+#include <q3popupmenu.h>
#include <qpainter.h>
-#include <qwhatsthis.h>
+#include <q3whatsthis.h>
#include <qpushbutton.h>
#include <qmessagebox.h>
#include <qlineedit.h>
#include <qtextcodec.h>
#include <qfile.h>
#include <qdir.h>
-#include <qapp.h>
+#include <qapplication.h>
#include <qfileinfo.h>
#include <qlabel.h>
#include <qspinbox.h>
#include <qcheckbox.h>
#include <qmap.h>
-#include <qwmatrix.h>
-#include <qtextbrowser.h>
-#include <qtextstream.h>
+#include <qmatrix.h>
+#include <q3textbrowser.h>
+#include <q3textstream.h>
#ifndef DESKTOP_VERSION
#include <qpe/global.h>
#include <qpe/qpetoolbar.h>
#include <qpe/resource.h>
#include <qpe/qpeapplication.h>
#include <qtopia/alarmserver.h>
#include <qtopia/qcopenvelope_qws.h>
//#include <unistd.h> // for sleep
#else
-#include <qtoolbar.h>
+#include <q3toolbar.h>
#include <qapplication.h>
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <QPixmap>
+#include <QCloseEvent>
+#include <QKeyEvent>
+#include <Q3VBoxLayout>
+#include <QHideEvent>
+#include <Q3CString>
+#include <Q3PtrList>
//#include <resource.h>
#endif
#include <libkcal/calendarlocal.h>
#include <libkcal/todo.h>
#include <libkcal/phoneformat.h>
@@ -77,41 +87,41 @@ class KOex2phonePrefs : public QDialog
{
public:
KOex2phonePrefs( QWidget *parent=0, const char *name=0 ) :
QDialog( parent, name, true )
{
setCaption( i18n("Export to phone options") );
- QVBoxLayout* lay = new QVBoxLayout( this );
+ Q3VBoxLayout* lay = new Q3VBoxLayout( this );
lay->setSpacing( 3 );
lay->setMargin( 3 );
QLabel *lab;
lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) );
- lab->setAlignment (AlignHCenter );
- QHBox* temphb;
- temphb = new QHBox( this );
+ lab->setAlignment (Qt::AlignHCenter );
+ Q3HBox* temphb;
+ temphb = new Q3HBox( this );
new QLabel( i18n("I/O device: "), temphb );
mPhoneDevice = new QLineEdit( temphb);
lay->addWidget( temphb );
- temphb = new QHBox( this );
+ temphb = new Q3HBox( this );
new QLabel( i18n("Connection: "), temphb );
mPhoneConnection = new QLineEdit( temphb);
lay->addWidget( temphb );
- temphb = new QHBox( this );
+ temphb = new Q3HBox( this );
new QLabel( i18n("Model(opt.): "), temphb );
mPhoneModel = new QLineEdit( temphb);
lay->addWidget( temphb );
mWriteBackFuture= new QCheckBox( i18n("Write back events in future only"), this );
mWriteBackFuture->setChecked( true );
lay->addWidget( mWriteBackFuture );
- temphb = new QHBox( this );
+ temphb = new Q3HBox( this );
new QLabel( i18n("Max. weeks in future: ") , temphb );
mWriteBackFutureWeeks= new QSpinBox(1,104, 1, temphb);
mWriteBackFutureWeeks->setValue( 8 );
lay->addWidget( temphb );
lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ntodo/calendar data on phone!"), this ) );
- lab->setAlignment (AlignHCenter );
+ lab->setAlignment (Qt::AlignHCenter );
QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this );
lay->addWidget( ok );
QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
lay->addWidget( cancel );
connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
@@ -131,13 +141,13 @@ public:
QPixmap* sgListViewCompletedPix[6];
QPixmap* sgListViewJournalPix;
int globalFlagBlockStartup;
MainWindow::MainWindow( QWidget *parent, const char *name ) :
- QMainWindow( parent, name )
+ Q3MainWindow( parent, name )
{
sgListViewCompletedPix[5] = &listviewPix;
sgListViewCompletedPix[0] = &listviewPix0;
sgListViewCompletedPix[1] = &listviewPix20;
sgListViewCompletedPix[2] = &listviewPix40;
sgListViewCompletedPix[3] = &listviewPix60;
@@ -182,24 +192,24 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
setCaption("KO/Pi");
KOPrefs *p = KOPrefs::instance();
//KPimGlobalPrefs::instance()->setGlobalConfig();
p->mCurrentDisplayedView = 0;
if ( p->mHourSize > 22 )
p->mHourSize = 22;
- QMainWindow::ToolBarDock tbd;
+ Qt::ToolBarDock tbd;
if ( p->mToolBarHor ) {
if ( p->mToolBarUp )
- tbd = Bottom;
+ tbd = Qt::Bottom;
else
- tbd = Top;
+ tbd = Qt::Top;
}
else {
if ( p->mToolBarUp )
- tbd = Right;
+ tbd = Qt::Right;
else
- tbd = Left;
+ tbd = Qt::Left;
}
if ( KOPrefs::instance()->mUseAppColors )
QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true );
globalFlagBlockStartup = 1;
iconToolBar = new QPEToolBar( this );
addToolBar (iconToolBar , tbd );
@@ -210,30 +220,30 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
if ( KOPrefs::instance()->mShowIconFilter || ( !p->mShowIconOnetoolbar &&!p->mShowIconFilterview ) )
#endif
{
if ( p->mToolBarHorF ) {
if ( p->mToolBarUpF )
- tbd = Bottom;
+ tbd = Qt::Bottom;
else
- tbd = Top;
+ tbd = Qt::Top;
}
else {
if ( p->mToolBarUpF )
- tbd = Right;
+ tbd = Qt::Right;
else
- tbd = Left;
+ tbd = Qt::Left;
}
filterToolBar = new QPEToolBar ( this );
filterMenubar = new KMenuBar( 0 );
QFontMetrics fm ( filterMenubar->font() );
#ifndef DESKTOP_VERSION
filterToolBar->setFocusPolicy( NoFocus );
filterMenubar->setFocusPolicy( NoFocus );
#endif
- filterPopupMenu = new QPopupMenu( this );
+ filterPopupMenu = new Q3PopupMenu( this );
filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 );
QString addTest = "A";
filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) );
#ifdef DESKTOP_VERSION
addTest = "AAAAAABBBCCCx";
#else
@@ -256,35 +266,35 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
} else {
#ifndef DESKTOP_VERSION
setToolBarsMovable( false );
#endif
if ( p->mToolBarHorV ) {
if ( p->mToolBarUpV )
- tbd = Bottom;
+ tbd = Qt::Bottom;
else
- tbd = Top;
+ tbd = Qt::Top;
}
else {
if ( p->mToolBarUpV )
- tbd = Right;
+ tbd = Qt::Right;
else
- tbd = Left;
+ tbd = Qt::Left;
}
viewToolBar = new QPEToolBar( this );
addToolBar (viewToolBar , tbd );
if ( p->mToolBarHorN ) {
if ( p->mToolBarUpN )
- tbd = Bottom;
+ tbd = Qt::Bottom;
else
- tbd = Top;
+ tbd = Qt::Top;
}
else {
if ( p->mToolBarUpN )
- tbd = Right;
+ tbd = Qt::Right;
else
- tbd = Left;
+ tbd = Qt::Left;
}
navigatorToolBar = new QPEToolBar( this );
addToolBar (navigatorToolBar , tbd );
}
@@ -437,15 +447,15 @@ void MainWindow::loadDataAfterStart()
processIncidenceSelection( 0 );
connect( mView, SIGNAL( incidenceSelected( Incidence * ) ),
SLOT( processIncidenceSelection( Incidence * ) ) );
connect( mView, SIGNAL( modifiedChanged( bool ) ),
SLOT( slotModifiedChanged( bool ) ) );
#ifndef DESKTOP_VERSION
- connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
- connect( qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT(recieve( const QCString&, const QByteArray& )));
- disconnect( qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT(receiveStart( const QCString&, const QByteArray& )));
+ connect(qApp, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const Q3CString &, const QByteArray & )));
+ connect( qApp, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )), this, SLOT(recieve( const Q3CString&, const QByteArray& )));
+ disconnect( qApp, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )), this, SLOT(receiveStart( const Q3CString&, const QByteArray& )));
if ( !mCStringMess.isEmpty() )
recieve( mCStringMess, mByteData );
#endif
QTimer::singleShot( 1000, mView, SLOT ( checkFiles() ));
}
@@ -506,13 +516,13 @@ void MainWindow::toggleBeamReceive()
brAction->setOn(false);
return;
}
qDebug("KO: Enable BeamReceive ");
brAction->setOn(true);
infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ;
- QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& )));
+ QObject::connect( infrared, SIGNAL (received ( const Q3CString &, const QByteArray & )),this, SLOT(recieve( const Q3CString&, const QByteArray& )));
#endif
}
void MainWindow::showMaximized ()
{
#ifndef DESKTOP_VERSION
if ( ! globalFlagBlockStartup )
@@ -597,28 +607,28 @@ void MainWindow::closeEvent( QCloseEvent* ce )
default:
break;
}
}
-void MainWindow::receiveStart( const QCString& cmsg, const QByteArray& data )
+void MainWindow::receiveStart( const Q3CString& cmsg, const QByteArray& data )
{
qDebug("KO: QCOP start message received: %s ", cmsg.data() );
mCStringMess = cmsg;
mByteData = data;
}
-void MainWindow::recieve( const QCString& cmsg, const QByteArray& data )
+void MainWindow::recieve( const Q3CString& cmsg, const QByteArray& data )
{
- QDataStream stream( data, IO_ReadOnly );
+ QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly );
// QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" );
//QString datamess;
//qDebug("message ");
qDebug("KO: QCOP message received: %s ", cmsg.data() );
if ( cmsg == "setDocument(QString)" ) {
- QDataStream stream( data, IO_ReadOnly );
+ QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly );
QString fileName;
stream >> fileName;
//qDebug("filename %s ", fileName.latin1());
showMaximized();
raise();
KOPrefs::instance()->mLastSyncedLocalFile = fileName ;
@@ -741,27 +751,27 @@ void MainWindow::initActions()
{
//KOPrefs::instance()->mShowFullMenu
iconToolBar->clear();
KOPrefs *p = KOPrefs::instance();
//QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar );
- QPopupMenu *viewMenu = new QPopupMenu( this );
- QPopupMenu *actionMenu = new QPopupMenu( this );
- mCurrentItemMenu = new QPopupMenu ( this );
- QPopupMenu *nextConflictMenu = new QPopupMenu ( this );
- QPopupMenu *importMenu = new QPopupMenu( this );
- QPopupMenu *importMenu_X = new QPopupMenu( this );
- QPopupMenu *exportMenu_X = new QPopupMenu( this );
- QPopupMenu *beamMenu_X = new QPopupMenu( this );
- selectFilterMenu = new QPopupMenu( this );
+ Q3PopupMenu *viewMenu = new Q3PopupMenu( this );
+ Q3PopupMenu *actionMenu = new Q3PopupMenu( this );
+ mCurrentItemMenu = new Q3PopupMenu ( this );
+ Q3PopupMenu *nextConflictMenu = new Q3PopupMenu ( this );
+ Q3PopupMenu *importMenu = new Q3PopupMenu( this );
+ Q3PopupMenu *importMenu_X = new Q3PopupMenu( this );
+ Q3PopupMenu *exportMenu_X = new Q3PopupMenu( this );
+ Q3PopupMenu *beamMenu_X = new Q3PopupMenu( this );
+ selectFilterMenu = new Q3PopupMenu( this );
selectFilterMenu->setCheckable( true );
- syncMenu = new QPopupMenu( this );
- configureAgendaMenu = new QPopupMenu( this );
- configureToolBarMenu = new QPopupMenu( this );
- QPopupMenu *helpMenu = new QPopupMenu( this );
- QIconSet icon;
+ syncMenu = new Q3PopupMenu( this );
+ configureAgendaMenu = new Q3PopupMenu( this );
+ configureToolBarMenu = new Q3PopupMenu( this );
+ Q3PopupMenu *helpMenu = new Q3PopupMenu( this );
+ QIcon icon;
int pixWid = 22, pixHei = 22;
QString pathString = "";
if ( !p->mToolBarMiniIcons ) {
if ( QApplication::desktop()->width() < 480 /*|| QApplication::desktop()->height() < 320*/) {
pathString += "icons16/";
pixWid = 18; pixHei = 16;
@@ -788,13 +798,13 @@ void MainWindow::initActions()
#endif
//menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu );
menuBar1->insertItem( i18n("Filter"),selectFilterMenu );
menuBar1->insertItem( i18n("Help"), helpMenu );
} else {
menuBar1 = new KMenuBar( iconToolBar );
- QPopupMenu *menuBar = new QPopupMenu( this );
+ Q3PopupMenu *menuBar = new Q3PopupMenu( this );
icon = loadPixmap( pathString + "z_menu" );
menuBar1->insertItem( icon.pixmap(), menuBar);
//menuBar1->insertItem( i18n("ME"), menuBar);
menuBar->insertItem( i18n("File"), importMenu );
menuBar->insertItem( i18n("View"), viewMenu );
menuBar->insertItem( i18n("Edit"), mCurrentItemMenu );
@@ -815,13 +825,13 @@ void MainWindow::initActions()
mWeekBgColor = iconToolBar->backgroundColor();
mWeekPixmap.resize( pixWid , pixHei );
mWeekPixmap.fill( mWeekBgColor );
icon = mWeekPixmap;
- mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this );
+ mWeekAction = new Q3Action( i18n("Select week number"),icon, i18n("Select week number"), 0, this );
if ( p-> mShowIconWeekNum )
mWeekAction->addTo( iconToolBar );
mWeekFont = font();
int fontPoint = mWeekFont.pointSize();
QFontMetrics f( mWeekFont );
@@ -837,24 +847,24 @@ void MainWindow::initActions()
connect( mWeekAction, SIGNAL( activated() ),
this, SLOT( weekAction() ) );
connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) );
if ( p->mShowIconFilterview ) {
icon = loadPixmap( pathString + "filter" );
- actionFilterMenuTB = new QAction( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this );
+ actionFilterMenuTB = new Q3Action( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this );
connect( actionFilterMenuTB, SIGNAL( activated() ),
this, SLOT( fillFilterMenuTB() ) );
actionFilterMenuTB->addTo( iconToolBar );
- selectFilterMenuTB = new QPopupMenu( this );
+ selectFilterMenuTB = new Q3PopupMenu( this );
selectFilterMenuTB->setCheckable( true );
connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) );
}
//#endif
// ******************
- QAction *action;
+ Q3Action *action;
// QPopupMenu *configureMenu= new QPopupMenu( menuBar );
configureToolBarMenu->setCheckable( true );
configureAgendaMenu->setCheckable( true );
int iii ;
@@ -863,58 +873,58 @@ void MainWindow::initActions()
}
//configureMenu->insertItem( "AgendaSize",configureAgendaMenu );
connect( configureAgendaMenu, SIGNAL( aboutToShow()),
this, SLOT( showConfigureAgenda( ) ) );
icon = loadPixmap( pathString + "today" );
- QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this );
+ Q3Action* today_action = new Q3Action( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this );
today_action->addTo( actionMenu );
connect( today_action, SIGNAL( activated() ),
mView, SLOT( goToday() ) );
icon = loadPixmap( pathString + "picker" );
- QAction* dPickerAction = new QAction( i18n("Select Date..."), icon, i18n("Select Date..."), 0, this );
+ Q3Action* dPickerAction = new Q3Action( i18n("Select Date..."), icon, i18n("Select Date..."), 0, this );
dPickerAction->addTo( actionMenu );
connect( dPickerAction, SIGNAL( activated() ),
mView, SLOT( showDatePicker() ) );
icon = loadPixmap( pathString + "search" );
- QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this );
+ Q3Action* search_action = new Q3Action( i18n("Search"), icon, i18n("Search..."), 0, this );
search_action->addTo( actionMenu );
connect( search_action, SIGNAL( activated() ),
mView->dialogManager(), SLOT( showSearchDialog() ) );
actionMenu->insertItem( i18n("Show next conflict for"), nextConflictMenu );
- action = new QAction( "Undo Delete", i18n("All events"), 0, this );
+ action = new Q3Action( "Undo Delete", i18n("All events"), 0, this );
action->addTo( nextConflictMenu );
connect( action, SIGNAL( activated() ),
mView, SLOT( conflictAll() ) );
- action = new QAction( "Undo Delete", i18n("Allday events"), 0, this );
+ action = new Q3Action( "Undo Delete", i18n("Allday events"), 0, this );
action->addTo( nextConflictMenu );
connect( action, SIGNAL( activated() ),
mView, SLOT( conflictAllday() ) );
- action = new QAction( "Undo Delete", i18n("Events with time"), 0, this );
+ action = new Q3Action( "Undo Delete", i18n("Events with time"), 0, this );
action->addTo( nextConflictMenu );
connect( action, SIGNAL( activated() ),
mView, SLOT( conflictNotAll() ) );
actionMenu->insertSeparator();
icon = loadPixmap( pathString + "newevent" );
- QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this );
+ Q3Action* ne_action = new Q3Action( i18n("New Event..."), icon, i18n("New Event..."), 0, this );
ne_action->addTo( mCurrentItemMenu );
connect( ne_action, SIGNAL( activated() ),
mView, SLOT( newEvent() ) );
icon = loadPixmap( pathString + "newtodo" );
- QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this );
+ Q3Action* nt_action = new Q3Action( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this );
nt_action->addTo( mCurrentItemMenu );
connect( nt_action, SIGNAL( activated() ),
mView, SLOT( newTodo() ) );
- mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0,
+ mNewSubTodoAction = new Q3Action( "new_subtodo", i18n("New Sub-Todo..."), 0,
this );
mNewSubTodoAction->addTo( mCurrentItemMenu );
connect( mNewSubTodoAction, SIGNAL( activated() ),
mView, SLOT( newSubTodo() ) );
mCurrentItemMenu->insertSeparator();
@@ -927,84 +937,84 @@ void MainWindow::initActions()
configureToolBarMenu->insertItem(i18n("Week Number"), 400);
configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 );
icon = loadPixmap( pathString + "newtodo" );
configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 );
//actionMenu->insertItem ( i18n("Selected Item"), mCurrentItemMenu);
- mShowAction = new QAction( "show_incidence", i18n("Show"), 0, this );
+ mShowAction = new Q3Action( "show_incidence", i18n("Show"), 0, this );
mShowAction->addTo( mCurrentItemMenu );
connect( mShowAction, SIGNAL( activated() ),
mView, SLOT( showIncidence() ) );
- mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this );
+ mEditAction = new Q3Action( "edit_incidence", i18n("Edit..."), 0, this );
mEditAction->addTo( mCurrentItemMenu );
connect( mEditAction, SIGNAL( activated() ),
mView, SLOT( editIncidence() ) );
- mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this );
+ mDeleteAction = new Q3Action( "delete_incidence", i18n("Delete..."), 0, this );
mDeleteAction->addTo( mCurrentItemMenu );
connect( mDeleteAction, SIGNAL( activated() ),
mView, SLOT( deleteIncidence() ) );
- mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this );
+ mCloneAction = new Q3Action( "clone_incidence", i18n("Clone..."), 0, this );
mCloneAction->addTo( mCurrentItemMenu );
connect( mCloneAction, SIGNAL( activated() ),
mView, SLOT( cloneIncidence() ) );
- mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this );
+ mMoveAction = new Q3Action( "Move_incidence", i18n("Move..."), 0, this );
mMoveAction->addTo( mCurrentItemMenu );
connect( mMoveAction, SIGNAL( activated() ),
mView, SLOT( moveIncidence() ) );
#ifndef DESKTOP_VERSION
- mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this );
+ mBeamAction = new Q3Action( "Beam_incidence", i18n("Beam..."), 0, this );
mBeamAction->addTo(mCurrentItemMenu );
connect( mBeamAction, SIGNAL( activated() ),
mView, SLOT( beamIncidence() ) );
#endif
- mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this );
+ mCancelAction = new Q3Action( "Cancel_incidence", i18n("Toggle Cancel"), 0, this );
mCancelAction->addTo( mCurrentItemMenu );
connect( mCancelAction, SIGNAL( activated() ),
mView, SLOT( toggleCancelIncidence() ) );
mCurrentItemMenu->insertSeparator();
- action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this );
+ action = new Q3Action( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this );
action->addTo( mCurrentItemMenu );
connect( action, SIGNAL( activated() ),
mView, SLOT( undo_delete() ) );
// ***********************
if ( KOPrefs::instance()->mVerticalScreen ) {
icon = SmallIcon( "1updownarrow" );
} else {
icon = SmallIcon("1leftrightarrow" );
}
configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 );
- QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this );
+ Q3Action* FSaction = new Q3Action( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this );
FSaction->addTo( viewMenu );
connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() ));
icon = loadPixmap( pathString + "filter" );
configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 );
icon = loadPixmap( pathString + "configure" );
- action = new QAction( i18n("Toggle Resource View"), icon, i18n("Toggle Resource View"), 0, this );
+ action = new Q3Action( i18n("Toggle Resource View"), icon, i18n("Toggle Resource View"), 0, this );
action->addTo( viewMenu );
connect( action, SIGNAL( activated() ),
mView, SLOT( toggleFilter() ) );
mToggleFilter = action;
icon = loadPixmap( pathString + "navi" );
configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 );
- action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this );
+ action = new Q3Action( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this );
action->addTo( viewMenu );
connect( action, SIGNAL( activated() ),
mView, SLOT( toggleDateNavigatorWidget() ) );
mToggleNav = action ;
icon = loadPixmap( pathString + "allday" );
configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 );
- action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this );
+ action = new Q3Action( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this );
action->addTo( viewMenu );
connect( action, SIGNAL( activated() ),
mView, SLOT( toggleAllDaySize() ) );
mToggleAllday = action;
@@ -1028,318 +1038,318 @@ void MainWindow::initActions()
//********************
if ( p->mShowIconAllday ) mToggleAllday->addTo( iconToolBar );
icon = loadPixmap( pathString + "whatsnext" );
configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 );
- QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this );
+ Q3Action* whatsnext_action = new Q3Action( i18n("What's Next"), icon, i18n("What's Next"), 0, this );
whatsnext_action->addTo( viewMenu );
connect( whatsnext_action, SIGNAL( activated() ),
mView->viewManager(), SLOT( showWhatsNextView() ) );
icon = loadPixmap( pathString + "xdays" );
configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 );
- QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this );
+ Q3Action* xdays_action = new Q3Action( i18n("Next days"), icon, i18n("Next days"), 0, this );
xdays_action->addTo( viewMenu );
connect( xdays_action, SIGNAL( activated() ),
mView->viewManager(), SLOT( showNextXView() ) );
icon = loadPixmap( pathString + "journal" );
configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 );
- QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this );
+ Q3Action* viewjournal_action = new Q3Action( i18n("Journal"), icon, i18n("Journal"), 0, this );
viewjournal_action->addTo( viewMenu );
connect( viewjournal_action, SIGNAL( activated() ),
mView->viewManager(), SLOT( showJournalView() ) );
icon = loadPixmap( pathString + "day" );
configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 );
- QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this );
+ Q3Action* day1_action = new Q3Action( i18n("Day View"), icon, i18n("Day View"), 0, this );
day1_action->addTo( viewMenu );
// action->addTo( toolBar );
connect( day1_action, SIGNAL( activated() ),
mView->viewManager(), SLOT( showDayView() ) );
icon = loadPixmap( pathString + "workweek" );
configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 );
- QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this );
+ Q3Action* day5_action = new Q3Action( i18n("Work Week"), icon, i18n("Work Week"), 0, this );
day5_action->addTo( viewMenu );
connect( day5_action, SIGNAL( activated() ),
mView->viewManager(), SLOT( showWorkWeekView() ) );
icon = loadPixmap( pathString + "week" );
configureToolBarMenu->insertItem(icon, i18n("Week"), 60 );
- QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this );
+ Q3Action* day7_action = new Q3Action( i18n("Week"), icon, i18n("Week"), 0, this );
day7_action->addTo( viewMenu );
connect( day7_action, SIGNAL( activated() ),
mView->viewManager(), SLOT( showWeekView() ) );
icon = loadPixmap( pathString + "workweek2" );
configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 );
- QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this );
+ Q3Action* day6_action = new Q3Action( i18n("List week"), icon, i18n("List week"), 0, this );
day6_action->addTo( viewMenu );
connect( day6_action, SIGNAL( activated() ),
mView->viewManager(), SLOT( showMonthViewWeek() ) );
icon = loadPixmap( pathString + "month" );
configureToolBarMenu->insertItem(icon, i18n("Month"), 70 );
- QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this );
+ Q3Action* month_action = new Q3Action( i18n("Month"), icon, i18n("Month"), 0, this );
month_action->addTo( viewMenu );
connect( month_action, SIGNAL( activated() ),
mView->viewManager(), SLOT( showMonthView() ) );
icon = loadPixmap( pathString + "list" );
configureToolBarMenu->insertItem(icon, i18n("List View"), 30 );
- QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this );
+ Q3Action* showlist_action = new Q3Action( i18n("List View"), icon, i18n("List View"), 0, this );
showlist_action->addTo( viewMenu );
connect( showlist_action, SIGNAL( activated() ),
mView->viewManager(), SLOT( showListView() ) );
icon = loadPixmap( pathString + "todo" );
configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 );
- QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this );
+ Q3Action* todoview_action = new Q3Action( i18n("Todo View"), icon, i18n("Todo View"), 0, this );
todoview_action->addTo( viewMenu );
connect( todoview_action, SIGNAL( activated() ),
mView->viewManager(), SLOT( showTodoView() ) );
#if 0
- action = new QAction( "view_timespan", "Time Span", 0, this );
+ action = new Q3Action( "view_timespan", "Time Span", 0, this );
action->addTo( viewMenu );
connect( action, SIGNAL( activated() ),
mView->viewManager(), SLOT( showTimeSpanView() ) );
#endif
- action = new QAction( "purge_completed", i18n("Purge Completed..."), 0,
+ action = new Q3Action( "purge_completed", i18n("Purge Completed..."), 0,
this );
action->addTo( actionMenu );
connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) );
icon = loadPixmap( pathString + "search" );
configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 5);
actionMenu->insertSeparator();
- action = new QAction( "manage cat", i18n("Edit category list..."), 0,
+ action = new Q3Action( "manage cat", i18n("Edit category list..."), 0,
this );
action->addTo( actionMenu );
connect( action, SIGNAL( activated() ), mView, SLOT( editCategories() ) );
- action = new QAction( "manage cat", i18n("Manage new categories..."), 0,
+ action = new Q3Action( "manage cat", i18n("Manage new categories..."), 0,
this );
action->addTo( actionMenu );
connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) );
actionMenu->insertSeparator();
icon = loadPixmap( pathString + "configure" );
- action = new QAction( i18n("Configure"),icon, i18n("Configure KO/Pi..."), 0, this );
+ action = new Q3Action( i18n("Configure"),icon, i18n("Configure KO/Pi..."), 0, this );
action->addTo( actionMenu );
connect( action, SIGNAL( activated() ),
mView, SLOT( edit_options() ) );
- action = new QAction( i18n("Configure"),icon, i18n("Configure Calendar Files..."), 0, this );
+ action = new Q3Action( i18n("Configure"),icon, i18n("Configure Calendar Files..."), 0, this );
action->addTo( actionMenu );
connect( action, SIGNAL( activated() ),
this, SLOT( calHint() ) );
- action = new QAction( i18n("Configure"),icon, i18n("Global Settings..."), 0, this );
+ action = new Q3Action( i18n("Configure"),icon, i18n("Global Settings..."), 0, this );
action->addTo( actionMenu );
connect( action, SIGNAL( activated() ),
mView, SLOT( edit_global_options() ) );
if ( KOPrefs::instance()->mShowFullMenu ) {
actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu );
}
// actionMenu->insertSeparator();
- action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0,
+ action = new Q3Action( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0,
this );
action->addTo( importMenu_X );
connect( action, SIGNAL( activated() ), SLOT( importIcal() ) );
- action = new QAction( "import_quick", i18n("Import last file"), 0,
+ action = new Q3Action( "import_quick", i18n("Import last file"), 0,
this );
action->addTo( importMenu_X );
connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) );
importMenu_X->insertSeparator();
- action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0,
+ action = new Q3Action( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0,
this );
action->addTo( importMenu_X );
connect( action, SIGNAL( activated() ), SLOT( importBday() ) );
//#ifndef DESKTOP_VERSION
importMenu_X->insertSeparator();
- action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0,
+ action = new Q3Action( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0,
this );
action->addTo( importMenu_X );
connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) );
//#else
#ifdef _OL_IMPORT_
importMenu_X->insertSeparator();
- action = new QAction( "import_ol", i18n("Import from OL"), 0,
+ action = new Q3Action( "import_ol", i18n("Import from OL"), 0,
this );
action->addTo( importMenu_X );
connect( action, SIGNAL( activated() ), SLOT( importOL() ) );
#endif
//#endif
//importMenu->insertSeparator();
#if 0
- action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0,
+ action = new Q3Action( "load_cal", i18n("Load Calendar Backup"), 0,
this );
action->addTo( importMenu );
connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) );
#endif
- action = new QAction( "save_cal", i18n("Save Backup..."), 0,
+ action = new Q3Action( "save_cal", i18n("Save Backup..."), 0,
this );
action->addTo( importMenu );
connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) );
importMenu->insertSeparator();
importMenu->insertItem( i18n("Import"), importMenu_X );
//importMenu->insertSeparator();
- action = new QAction( "export ical", i18n("Export All Data"), 0,
+ action = new Q3Action( "export ical", i18n("Export All Data"), 0,
this );
action->addTo( exportMenu_X );
connect( action, SIGNAL( activated() ), SLOT( exportICalendar() ) );
- action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0,
+ action = new Q3Action( "import_qtopia", i18n("Export VCalendar"), 0,
this );
action->addTo( exportMenu_X );
connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) );
//LR
- QPopupMenu *ex2phone = new QPopupMenu( this );
+ Q3PopupMenu *ex2phone = new Q3PopupMenu( this );
ex2phone->insertItem(i18n("Complete calendar..."), 1 );
ex2phone->insertItem(i18n("Filtered calendar..."), 2 );
connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) );
exportMenu_X->insertItem( i18n("Export to phone"), ex2phone );
importMenu->insertItem( i18n("Export"), exportMenu_X );
mPrintSelAction = 0;
#ifndef DESKTOP_VERSION
//importMenu->insertSeparator();
- brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0,
+ brAction = new Q3Action( "beam toggle", i18n("Beam receive enabled"), 0,
this );
brAction->addTo( beamMenu_X );
brAction->setToggleAction (true ) ;
connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) );
- action = new QAction( "beam all", i18n("Beam complete calendar..."), 0,
+ action = new Q3Action( "beam all", i18n("Beam complete calendar..."), 0,
this );
action->addTo( beamMenu_X );
connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) );
- action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0,
+ action = new Q3Action( "beam all", i18n("Beam filtered calendar..."), 0,
this );
action->addTo( beamMenu_X );
connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) );
importMenu->insertItem( i18n("Beam"), beamMenu_X );
#else
//importMenu->insertSeparator();
icon = loadPixmap( pathString + "print" );
- action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this );
+ action = new Q3Action( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this );
action->addTo( beamMenu_X );
connect( action, SIGNAL( activated() ),
this, SLOT( printCal() ) );
icon = loadPixmap( pathString + "week" );
- action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this );
+ action = new Q3Action( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this );
action->addTo( beamMenu_X );
connect( action, SIGNAL( activated() ),
this, SLOT( printSel() ) );
icon = loadPixmap( pathString + "whatsnext" );
- action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this );
+ action = new Q3Action( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this );
action->addTo( beamMenu_X );
connect( action, SIGNAL( activated() ),
mView->viewManager(), SLOT( slotprintWNV() ) );
icon = loadPixmap( pathString + "list" );
- action = new QAction( i18n("Print List View..."),icon,i18n("Print List View..."), 0, this );
+ action = new Q3Action( i18n("Print List View..."),icon,i18n("Print List View..."), 0, this );
action->addTo( beamMenu_X );
connect( action, SIGNAL( activated() ),
this, SLOT( printListView() ) );
icon = loadPixmap( pathString + "newevent" );
- action = new QAction( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this );
+ action = new Q3Action( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this );
action->addTo( beamMenu_X );
connect( action, SIGNAL( activated() ),
mView, SLOT( slotprintSelInc() ) );
mPrintSelAction = action;
importMenu->insertItem( i18n("Print"), beamMenu_X );
#endif
importMenu->insertSeparator();
- action = new QAction( "beam all", i18n("Save"), 0,
+ action = new Q3Action( "beam all", i18n("Save"), 0,
this );
action->addTo( importMenu );
connect( action, SIGNAL( activated() ), this, SLOT( save() ) );
- action = new QAction( "beam all", i18n("Exit (+save)"), 0,
+ action = new Q3Action( "beam all", i18n("Exit (+save)"), 0,
this );
action->addTo( importMenu );
connect( action, SIGNAL( activated() ), this, SLOT( close() ) );
//menuBar->insertItem( "Configure",configureMenu );
//configureMenu->insertItem( "Toolbar",configureToolBarMenu );
icon = loadPixmap( "korganizer/korganizer" );
- action = new QAction( "Whats New", i18n("What's new?"), 0,this );
+ action = new Q3Action( "Whats New", i18n("What's new?"), 0,this );
action->addTo( helpMenu );
connect( action, SIGNAL( activated() ),
SLOT( whatsNew() ) );
- action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this );
+ action = new Q3Action( "featureHowto", i18n("Features + hints..."), 0,this );
action->addTo( helpMenu );
connect( action, SIGNAL( activated() ),
SLOT( features() ) );
- action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this );
+ action = new Q3Action( "Keys + Colors", i18n("Keys + Colors..."), 0, this );
action->addTo( helpMenu );
connect( action, SIGNAL( activated() ),
SLOT( keyBindings() ) );
- action = new QAction( "Storage Howto", i18n("Storage HowTo..."), 0,this );
+ action = new Q3Action( "Storage Howto", i18n("Storage HowTo..."), 0,this );
action->addTo( helpMenu );
connect( action, SIGNAL( activated() ),
SLOT( storagehowto() ) );
- action = new QAction( "Timetracking Howto", i18n("Timetracking HowTo..."), 0,this );
+ action = new Q3Action( "Timetracking Howto", i18n("Timetracking HowTo..."), 0,this );
action->addTo( helpMenu );
connect( action, SIGNAL( activated() ),
SLOT( timetrackinghowto() ) );
- action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this );
+ action = new Q3Action( "Sync Howto", i18n("Sync HowTo..."), 0,this );
action->addTo( helpMenu );
connect( action, SIGNAL( activated() ),
SLOT( synchowto() ) );
- action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this );
+ action = new Q3Action( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this );
action->addTo( helpMenu );
connect( action, SIGNAL( activated() ),
SLOT( kdesynchowto() ) );
- action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this );
+ action = new Q3Action( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this );
action->addTo( helpMenu );
connect( action, SIGNAL( activated() ),
SLOT( multisynchowto() ) );
- action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this );
+ action = new Q3Action( "Auto saving", i18n("Auto saving..."), 0, this );
action->addTo( helpMenu );
connect( action, SIGNAL( activated() ),
SLOT( aboutAutoSaving() ) );
- action = new QAction( "Problemd", i18n("Known Problems..."), 0,this );
+ action = new Q3Action( "Problemd", i18n("Known Problems..."), 0,this );
action->addTo( helpMenu );
connect( action, SIGNAL( activated() ),
SLOT( aboutKnownBugs() ) );
- action = new QAction( "Translate Howto", i18n("User translation..."), 0,this );
+ action = new Q3Action( "Translate Howto", i18n("User translation..."), 0,this );
action->addTo( helpMenu );
connect( action, SIGNAL( activated() ),
SLOT( usertrans() ) );
- action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this );
+ action = new Q3Action( "Frequently asked questions", i18n("FAQ..."), 0,this );
action->addTo( helpMenu );
connect( action, SIGNAL( activated() ),
SLOT( faq() ) );
- action = new QAction( "licence", i18n("Licence..."), 0, this );
+ action = new Q3Action( "licence", i18n("Licence..."), 0, this );
action->addTo( helpMenu );
connect( action, SIGNAL( activated() ),
SLOT( licence() ) );
- action = new QAction( "about", i18n("About..."), 0, this );
+ action = new Q3Action( "about", i18n("About..."), 0, this );
action->addTo( helpMenu );
connect( action, SIGNAL( activated() ),
SLOT( about() ) );
//menuBar->insertSeparator();
// ******************************************************
@@ -1353,13 +1363,13 @@ void MainWindow::initActions()
ne_action->addTo( iconToolBar );
if (p->mShowIconNewTodo )
nt_action->addTo( iconToolBar );
if (p-> mShowIconSearch)
search_action->addTo( iconToolBar );
if (p-> mShowIconWhatsThis)
- QWhatsThis::whatsThisButton ( iconToolBar );
+ Q3WhatsThis::whatsThisButton ( iconToolBar );
if (p-> mShowIconNext)
whatsnext_action->addTo( viewToolBar );
if (p-> mShowIconNextDays)
xdays_action->addTo( viewToolBar );
if (p-> mShowIconJournal)
viewjournal_action->addTo( viewToolBar );
@@ -1378,41 +1388,41 @@ void MainWindow::initActions()
if (p-> mShowIconTodoview)
todoview_action->addTo( viewToolBar );
icon = loadPixmap( pathString + "2leftarrowB" );
configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200);
if (p-> mShowIconBackFast) {
- action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this );
+ action = new Q3Action( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this );
connect( action, SIGNAL( activated() ),
mView, SLOT( goPreviousMonth() ) );
action->addTo( navigatorToolBar );
}
icon = loadPixmap( pathString + "1leftarrowB" );
configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210);
if (p-> mShowIconBack) {
- action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this );
+ action = new Q3Action( i18n("Go backward"), icon, i18n("Go backward"),0 , this );
connect( action, SIGNAL( activated() ),
mView, SLOT( goPrevious() ) );
action->addTo( navigatorToolBar );
}
icon = loadPixmap( pathString + "today" );
configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130);
if (p-> mShowIconToday)
today_action->addTo( navigatorToolBar );
icon = loadPixmap( pathString + "1rightarrowB" );
configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220);
if (p-> mShowIconForward) {
- action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this );
+ action = new Q3Action( i18n("Go forward"), icon, i18n("Go forward"),0 , this );
connect( action, SIGNAL( activated() ),
mView, SLOT( goNext() ) );
action->addTo( navigatorToolBar );
}
icon = loadPixmap( pathString + "2rightarrowB" );
configureToolBarMenu->insertItem(icon, i18n("Next month"), 230);
if (p-> mShowIconForwardFast) {
- action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this );
+ action = new Q3Action( i18n("Next month"), icon, i18n("Next month"),0 , this );
connect( action, SIGNAL( activated() ),
mView, SLOT( goNextMonth() ) );
action->addTo( navigatorToolBar );
}
@@ -1521,13 +1531,13 @@ void MainWindow::exportToPhone( int mode )
KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text();
KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text();
int inFuture = 0;
if ( ex2phone.mWriteBackFuture->isChecked() )
inFuture = ex2phone.mWriteBackFutureWeeks->value();
- QPtrList<Incidence> delSel;
+ Q3PtrList<Incidence> delSel;
if ( mode == 1 )
delSel = mCalendar->rawIncidences();
if ( mode == 2 )
delSel = mCalendar->incidences();
CalendarLocal* cal = new CalendarLocal();
cal->setLocalTime();
@@ -1592,16 +1602,16 @@ QString MainWindow::resourcePath()
}
void MainWindow::displayText( QString text ,QString cap )
{
QDialog dia( this, "name", true ); ;
dia.setCaption( cap );
- QVBoxLayout* lay = new QVBoxLayout( &dia );
+ Q3VBoxLayout* lay = new Q3VBoxLayout( &dia );
lay->setSpacing( 3 );
lay->setMargin( 3 );
- QTextBrowser tb ( &dia );
+ Q3TextBrowser tb ( &dia );
lay->addWidget( &tb );
tb.setText( text );
#ifdef DESKTOP_VERSION
dia.resize( 640, 480);
#else
dia.showMaximized();
@@ -1774,15 +1784,15 @@ QString MainWindow::syncFileName()
void MainWindow::updateWeek(QDate seda)
{
int weekNum = KGlobal::locale()->weekNum ( seda );
mWeekPixmap.fill( mWeekBgColor );
QPainter p ( &mWeekPixmap );
p.setFont( mWeekFont );
- p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),AlignCenter, QString::number( weekNum) );
+ p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),Qt::AlignCenter, QString::number( weekNum) );
p.end();
- QIconSet icon3 ( mWeekPixmap );
+ QIcon icon3 ( mWeekPixmap );
mWeekAction->setIconSet ( icon3 );
}
void MainWindow::updateWeekNum(const DateList &selectedDates)
{
updateWeek( selectedDates.first() );
@@ -1809,13 +1819,13 @@ void MainWindow::processIncidenceSelection( Incidence *incidence )
} else {
if ( incidence->dtStart().time() != incidence->dtEnd().time() )
startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+
"-"+KGlobal::locale()->formatTime(incidence->dtEnd().time());
if ( incidence->isBirthday() || incidence->isAnniversary() ) {
bool ok;
- QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok );
+ QDateTime noc = incidence->getNextOccurence( (QDateTime)mView->startDate().addDays(-1), &ok );
if ( ok ) {
int years = noc.date().year() - incidence->dtStart().date().year();
startString += i18n(" (%1 y.)"). arg( years );
}
}
else
@@ -1843,19 +1853,19 @@ void MainWindow::processIncidenceSelection( Incidence *incidence )
mNewSubTodoAction->setEnabled( false );
}
#ifdef DESKTOP_VERSION
static QPixmap jP = SmallIcon( "journal" );
static QPixmap eP = SmallIcon( "newevent" );
static QPixmap tP = SmallIcon( "newtodo" );
- QIconSet icon;
+ QIcon icon;
if ( incidence->typeID() == todoID )
- icon = QIconSet ( tP );
+ icon = QIcon ( tP );
else if ( incidence->typeID() == eventID )
- icon = QIconSet ( eP );
+ icon = QIcon ( eP );
else if ( incidence->typeID() == journalID )
- icon = QIconSet ( jP );
+ icon = QIcon ( jP );
mPrintSelAction->setIconSet ( icon );
#endif
}
void MainWindow::enableIncidenceActions( bool enabled )
{
@@ -2042,13 +2052,13 @@ void MainWindow::backupAllFiles()
qDebug("KO: Backup cancelled. Will try again tomorrow ");
// retval == 0 : backup skipped for today, try again tomorrow
KOPrefs::instance()->mLastBackupDate = daysTo- KPimGlobalPrefs::instance()->mBackupDayCount+1;
} else if ( retval == 1 ){
qDebug("KO: Backup created.");
// backup ok
- QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
+ Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
KopiCalendarFile * cal = calendars.first();
cal = calendars.next();
while ( cal ) {
if ( !cal->mErrorOnLoad ) {
KApplication::createBackup( cal->mFileName, bupDir, KPimGlobalPrefs::instance()->mBackupNumbers );
}
@@ -2338,13 +2348,13 @@ void MainWindow::fillFilterMenuTB()
selectFilterMenuTB->clear();
selectFilterMenuTB->insertItem(i18n ( "Edit Filters" ), 0 );
selectFilterMenuTB->insertSeparator();
selectFilterMenuTB->insertItem(i18n ( "No Filter" ), 1 );
selectFilterMenuTB->insertSeparator();
- QPtrList<CalFilter> fili = mView->filters();
+ Q3PtrList<CalFilter> fili = mView->filters();
CalFilter *curfilter = mView->filterView()->selectedFilter();
CalFilter *filter = fili.first();
int iii = 2;
bool checkitem = mView->filterView()->filtersEnabled();
while(filter) {
selectFilterMenuTB->insertItem( filter->name(), iii );
@@ -2383,13 +2393,13 @@ void MainWindow::fillFilterMenu()
selectFilterMenu->clear();
selectFilterMenu->insertItem(i18n ( "Edit Filters" ), 0 );
selectFilterMenu->insertSeparator();
selectFilterMenu->insertItem(i18n ( "No Filter" ), 1 );
selectFilterMenu->insertSeparator();
- QPtrList<CalFilter> fili = mView->filters();
+ Q3PtrList<CalFilter> fili = mView->filters();
CalFilter *curfilter = mView->filterView()->selectedFilter();
CalFilter *filter = fili.first();
int iii = 2;
bool checkitem = mView->filterView()->filtersEnabled();
while(filter) {
selectFilterMenu->insertItem( filter->name(), iii );
@@ -2404,13 +2414,13 @@ void MainWindow::fillFilterMenu()
void MainWindow::fillFilterMenuPopup()
{
filterPopupMenu->clear();
filterPopupMenu->insertItem(i18n ( "No Filter" ), 0 );
filterPopupMenu->insertSeparator();
- QPtrList<CalFilter> fili = mView->filters();
+ Q3PtrList<CalFilter> fili = mView->filters();
CalFilter *curfilter = mView->filterView()->selectedFilter();
CalFilter *filter = fili.first();
int iii = 1;
bool checkitem = mView->filterView()->filtersEnabled();
while(filter) {
filterPopupMenu->insertItem( filter->name(), iii );
@@ -2816,8 +2826,8 @@ void MainWindow::resizeEvent( QResizeEvent* e)
filterToolBar->hide();
else
filterToolBar->show();
}
}
#endif
- QMainWindow::resizeEvent( e);
+ Q3MainWindow::resizeEvent( e);
}
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h
index a533d8b..6756216 100644
--- a/korganizer/mainwindow.h
+++ b/korganizer/mainwindow.h
@@ -1,40 +1,48 @@
#ifndef KORGE_MAINWINDOW_H
#define KORGE_MAINWINDOW_H
-#include <qmainwindow.h>
+#include <q3mainwindow.h>
#include <qtimer.h>
-#include <qdict.h>
+#include <q3dict.h>
#include <qfile.h>
#include <qmenubar.h>
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <qregexp.h>
+//Added by qt3to4:
+#include <Q3CString>
+#include <QCloseEvent>
+#include <QResizeEvent>
+#include <QPixmap>
+#include <Q3PopupMenu>
+#include <QHideEvent>
+#include <QKeyEvent>
#include <libkcal/incidence.h>
#include <ksyncmanager.h>
#include <kpopupmenu.h>
#ifndef DESKTOP_VERSION
#include <qcopchannel_qws.h>
#endif
-class QAction;
+class Q3Action;
class CalendarView;
class KSyncProfile;
#ifdef DESKTOP_VERSION
-#define QPEToolBar QToolBar
+#define QPEToolBar Q3ToolBar
#endif
class QPEToolBar;
namespace KCal {
class CalendarLocal;
}
using namespace KCal;
-class MainWindow : public QMainWindow
+class MainWindow : public Q3MainWindow
{
Q_OBJECT
public:
MainWindow( QWidget *parent = 0, const char *name = 0 );
~MainWindow();
bool beamReceiveEnabled();
@@ -46,14 +54,14 @@ class MainWindow : public QMainWindow
void setCaption ( const QString & );
void updateWeekNum(const KCal::DateList &);
void updateWeek(QDate);
void updateFilterToolbar();
virtual void showMaximized ();
void configureAgenda( int );
- void recieve( const QCString& msg, const QByteArray& data );
- void receiveStart( const QCString& msg, const QByteArray& data );
+ void recieve( const Q3CString& msg, const QByteArray& data );
+ void receiveStart( const Q3CString& msg, const QByteArray& data );
protected slots:
void autoSaveWarning();
void loadDataAfterStart();
void calHint();
void startMultiSync();
void setCaptionToDates();
@@ -121,64 +129,64 @@ class MainWindow : public QMainWindow
void enableIncidenceActions( bool );
bool askForQuitOnSaveError();
private:
bool mAutoSaveDisabled;
bool checkAutosave();
- QCString mCStringMess;
+ Q3CString mCStringMess;
QByteArray mByteData;
//void setMenuBar( QMenuBar * );
bool mBRdisabled;
#ifndef DESKTOP_VERSION
QCopChannel* infrared;
#endif
- QAction* brAction;
+ Q3Action* brAction;
KSyncManager* mSyncManager;
bool mClosed;
void saveOnClose();
bool mFlagKeyPressed;
bool mBlockAtStartup;
KMenuBar *menuBar1;
QPEToolBar *iconToolBar;
QPEToolBar *viewToolBar;
QPEToolBar *navigatorToolBar;
QPEToolBar *filterToolBar;
KMenuBar *filterMenubar;
- QPopupMenu * filterPopupMenu;
- QPopupMenu * mCurrentItemMenu;
+ Q3PopupMenu * filterPopupMenu;
+ Q3PopupMenu * mCurrentItemMenu;
void initActions();
void setDefaultPreferences();
void resizeEvent( QResizeEvent* e);
void keyPressEvent ( QKeyEvent * ) ;
void keyReleaseEvent ( QKeyEvent * ) ;
- QPopupMenu *configureToolBarMenu;
- QPopupMenu *selectFilterMenu;
- QPopupMenu *selectFilterMenuTB;
- QPopupMenu *configureAgendaMenu, *syncMenu;
+ Q3PopupMenu *configureToolBarMenu;
+ Q3PopupMenu *selectFilterMenu;
+ Q3PopupMenu *selectFilterMenuTB;
+ Q3PopupMenu *configureAgendaMenu, *syncMenu;
CalendarLocal *mCalendar;
CalendarView *mView;
- QAction *mNewSubTodoAction;
- QAction *mWeekAction;
+ Q3Action *mNewSubTodoAction;
+ Q3Action *mWeekAction;
QFont mWeekFont;
QPixmap mWeekPixmap;
QColor mWeekBgColor;
- QAction *mShowAction;
- QAction *mEditAction;
- QAction *mDeleteAction;
- QAction *mCloneAction;
- QAction *mMoveAction;
- QAction *mBeamAction;
- QAction *mCancelAction;
- QAction *mPrintSelAction;
+ Q3Action *mShowAction;
+ Q3Action *mEditAction;
+ Q3Action *mDeleteAction;
+ Q3Action *mCloneAction;
+ Q3Action *mMoveAction;
+ Q3Action *mBeamAction;
+ Q3Action *mCancelAction;
+ Q3Action *mPrintSelAction;
- QAction *mToggleNav;
- QAction *mToggleFilter;
- QAction *mToggleAllday;
- QAction *actionFilterMenuTB;
+ Q3Action *mToggleNav;
+ Q3Action *mToggleFilter;
+ Q3Action *mToggleAllday;
+ Q3Action *actionFilterMenuTB;
void closeEvent( QCloseEvent* ce );
QTimer mSaveTimer;
QDateTime mSaveTimerStart;
int mSaveDelay;
//bool mBlockSaveFlag;
diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp
index f6a1a6a..59c3e45 100644
--- a/korganizer/navigatorbar.cpp
+++ b/korganizer/navigatorbar.cpp
@@ -23,16 +23,19 @@
*/
#include <qstring.h>
#include <qtooltip.h>
#include <qpushbutton.h>
#include <qlayout.h>
-#include <qframe.h>
+#include <q3frame.h>
#include <qlabel.h>
-#include <qpopupmenu.h>
+#include <q3popupmenu.h>
#include <qapplication.h>
+#include <QDesktopWidget>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
#include <kdebug.h>
#include <klocale.h>
#include <kglobal.h>
#include <kiconloader.h>
#include "libkdepim/kdatepicker.h"
@@ -50,17 +53,17 @@
#include "navigatorbar.h"
NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *name )
: QWidget( parent, name )
{
- QBoxLayout *topLayout = new QHBoxLayout( this );
+ Q3BoxLayout *topLayout = new Q3HBoxLayout( this );
// Set up the control buttons and date label
- mCtrlFrame = new QFrame( this );
- mCtrlFrame->setFrameStyle(QFrame::Panel|QFrame::Raised);
+ mCtrlFrame = new Q3Frame( this );
+ mCtrlFrame->setFrameStyle(Q3Frame::Panel|Q3Frame::Raised);
mCtrlFrame->setLineWidth(1);
topLayout->addWidget( mCtrlFrame );
@@ -126,13 +129,13 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam
}
resetFont( font() );
// set up control frame layout
- QBoxLayout *ctrlLayout = new QHBoxLayout( mCtrlFrame, 1 );
+ Q3BoxLayout *ctrlLayout = new Q3HBoxLayout( mCtrlFrame, 1 );
ctrlLayout->addWidget( mPrevYear, 3 );
ctrlLayout->addWidget( mPrevMonth, 3 );
ctrlLayout->addWidget( mPrevWeek, 3 );
//ctrlLayout->addStretch( 1 );
// ctrlLayout->addSpacing( 1 );
// ctrlLayout->addWidget( mDateLabel );
@@ -147,19 +150,19 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam
connect( mPrevMonth, SIGNAL( clicked() ), SIGNAL( goPrevMonth() ) );
connect( mNextMonth, SIGNAL( clicked() ), SIGNAL( goNextMonth() ) );
connect( mPrevWeek, SIGNAL( clicked() ), SIGNAL( goPrevWeek() ) );
connect( mNextWeek, SIGNAL( clicked() ), SIGNAL( goNextWeek() ) );
connect( mNextYear, SIGNAL( clicked() ), SIGNAL( goNextYear() ) );
connect( mSelectMonth, SIGNAL( clicked() ),SLOT( selectMonth() ) );
- mPrevYear->setFocusPolicy(NoFocus);
- mPrevMonth->setFocusPolicy(NoFocus);
- mNextMonth->setFocusPolicy(NoFocus);
- mPrevWeek->setFocusPolicy(NoFocus);
- mNextWeek->setFocusPolicy(NoFocus);
- mNextYear->setFocusPolicy(NoFocus);
- mSelectMonth->setFocusPolicy(NoFocus);
+ mPrevYear->setFocusPolicy(Qt::NoFocus);
+ mPrevMonth->setFocusPolicy(Qt::NoFocus);
+ mNextMonth->setFocusPolicy(Qt::NoFocus);
+ mPrevWeek->setFocusPolicy(Qt::NoFocus);
+ mNextWeek->setFocusPolicy(Qt::NoFocus);
+ mNextYear->setFocusPolicy(Qt::NoFocus);
+ mSelectMonth->setFocusPolicy(Qt::NoFocus);
setSizePolicy( QSizePolicy ( QSizePolicy::Expanding ,QSizePolicy::Fixed ) );
}
NavigatorBar::~NavigatorBar()
{
diff --git a/korganizer/navigatorbar.h b/korganizer/navigatorbar.h
index 9ccef14..a1880f5 100644
--- a/korganizer/navigatorbar.h
+++ b/korganizer/navigatorbar.h
@@ -24,15 +24,18 @@
#ifndef NAVIGATORBAR_H
#define NAVIGATORBAR_H
#include <libkcal/incidencebase.h>
#include <qwidget.h>
+//Added by qt3to4:
+#include <Q3Frame>
+#include <QLabel>
class QPushButton;
-class QFrame;
+class Q3Frame;
class QLabel;
class NavigatorBar: public QWidget
{
Q_OBJECT
public:
@@ -57,13 +60,13 @@ class NavigatorBar: public QWidget
void monthSelected( int );
private:
int mCurrentHei;
int mCurrentMinWid;
int mCurrentButtonMinWid;
- QFrame *mCtrlFrame;
+ Q3Frame *mCtrlFrame;
QPushButton *mPrevYear;
QPushButton *mPrevMonth;
QPushButton *mNextMonth;
QPushButton *mPrevWeek;
QPushButton *mNextWeek;
diff --git a/korganizer/outgoingdialog.cpp b/korganizer/outgoingdialog.cpp
index 7253c8e..ab31274 100644
--- a/korganizer/outgoingdialog.cpp
+++ b/korganizer/outgoingdialog.cpp
@@ -18,13 +18,13 @@
*/
#include <kdebug.h>
#include <qfile.h>
#include <qdir.h>
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <kglobal.h>
#include <klocale.h>
#include <ktempfile.h>
#include <kstandarddirs.h>
@@ -41,16 +41,16 @@
#include "koprefs.h"
#include "outgoingdialog.h"
#include "koeventviewerdialog.h"
#include "docprefs.h"
-ScheduleItemOut::ScheduleItemOut(QListView *parent,IncidenceBase *ev,
+ScheduleItemOut::ScheduleItemOut(Q3ListView *parent,IncidenceBase *ev,
Scheduler::Method method,
const QString &recipients)
- : QListViewItem(parent)
+ : Q3ListViewItem(parent)
{
mIncidence = ev;
mMethod = method;
mRecipients = recipients;
// kdDebug() << "ScheduleItemOut: setting the summary" << endl;
@@ -120,13 +120,13 @@ ScheduleItemOut::ScheduleItemOut(QListView *parent,IncidenceBase *ev,
//Set the Method
setText(5,Scheduler::translatedMethodName(mMethod));
}
OutgoingDialog::OutgoingDialog(Calendar *calendar,QWidget* parent,
const char* name,bool modal,
- WFlags fl)
+ Qt::WFlags fl)
: OutgoingDialog_base(parent,name,modal,fl)
{
mCalendar = calendar;
mFormat = new ICalFormat;
@@ -136,18 +136,18 @@ OutgoingDialog::OutgoingDialog(Calendar *calendar,QWidget* parent,
#ifndef KORG_NOMAIL
mScheduler = new MailScheduler(mCalendar);
#else
mScheduler = new DummyScheduler(mCalendar);
#endif
}
- mMessageListView->setColumnAlignment(1,AlignHCenter);
- mMessageListView->setColumnAlignment(2,AlignHCenter);
- mMessageListView->setColumnAlignment(3,AlignHCenter);
- mMessageListView->setColumnAlignment(4,AlignHCenter);
- QObject::connect(mMessageListView,SIGNAL(doubleClicked(QListViewItem *)),
- this,SLOT(showEvent(QListViewItem *)));
+ mMessageListView->setColumnAlignment(1,Qt::AlignHCenter);
+ mMessageListView->setColumnAlignment(2,Qt::AlignHCenter);
+ mMessageListView->setColumnAlignment(3,Qt::AlignHCenter);
+ mMessageListView->setColumnAlignment(4,Qt::AlignHCenter);
+ QObject::connect(mMessageListView,SIGNAL(doubleClicked(Q3ListViewItem *)),
+ this,SLOT(showEvent(Q3ListViewItem *)));
mDocPrefs = new DocPrefs("groupschedule");
loadMessages();
}
OutgoingDialog::~OutgoingDialog()
{
@@ -233,13 +233,13 @@ void OutgoingDialog::deleteItem()
deleteMessage(item->event());
delete(item->event());
mMessageListView->takeItem(item);
emit numMessagesChanged(mMessageListView->childCount());
}
-void OutgoingDialog::showEvent(QListViewItem *qitem)
+void OutgoingDialog::showEvent(Q3ListViewItem *qitem)
{
ScheduleItemOut *item = (ScheduleItemOut *)qitem;
Event *event = 0;
Todo *todo = 0;
if ( item->event()->typeID() == eventID ) {
event = static_cast<Event *>(item->event());
@@ -291,13 +291,13 @@ void OutgoingDialog::showEvent(QListViewItem *qitem)
bool OutgoingDialog::saveMessage(IncidenceBase *incidence,Scheduler::Method method,
const QString &recipients)
{
KTempFile ktfile(locateLocal("data","korganizer/outgoing/"),"ics");
QString messageText = mFormat->createScheduleMessage(incidence,method);
- QTextStream *qts = ktfile.textStream();
+ Q3TextStream *qts = ktfile.textStream();
*qts << messageText;
*qts << "METHOD-BEGIN:" << endl << method << endl << ":METHOD-END" << endl;
*qts << "RECIPIENTS-BEGIN:" << endl << recipients << endl << ":RECIPIENTS-END" << endl;
mMessageMap[incidence]=ktfile.name();
return true;
@@ -327,17 +327,17 @@ void OutgoingDialog::loadMessages()
bool inserted = false;
QMap<IncidenceBase*, QString>::Iterator iter;
for ( iter = mMessageMap.begin(); iter != mMessageMap.end(); ++iter ) {
if (iter.data() == outgoingDirName + "/" + (*it)) inserted = true;
}
if (!inserted) {
- if (!f.open(IO_ReadOnly)) {
+ if (!f.open(QIODevice::ReadOnly)) {
kdDebug() << "OutgoingDialog::loadMessage(): Can't open file'"
<< (*it) << "'" << endl;
} else {
- QTextStream t(&f);
+ Q3TextStream t(&f);
QString messageString = t.read();
ScheduleMessage *message = mFormat->parseScheduleMessage(mCalendar,
messageString);
int begin_pos = messageString.find("METHOD-BEGIN:");
begin_pos = messageString.find('\n',begin_pos)+1;
QString meth = messageString.mid(begin_pos,1);
diff --git a/korganizer/outgoingdialog.h b/korganizer/outgoingdialog.h
index a3d561a..e727087 100644
--- a/korganizer/outgoingdialog.h
+++ b/korganizer/outgoingdialog.h
@@ -20,27 +20,27 @@
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#ifndef OUTGOINGDIALOG_H
#define OUTGOINGDIALOG_H
-#include <qlistview.h>
+#include <q3listview.h>
#include <qmap.h>
#include <qstring.h>
#include <libkcal/scheduler.h>
#include "docprefs.h"
#include "outgoingdialog_base.h"
using namespace KCal;
-class ScheduleItemOut : public QListViewItem
+class ScheduleItemOut : public Q3ListViewItem
{
public:
- ScheduleItemOut(QListView *parent,IncidenceBase *ev,
+ ScheduleItemOut(Q3ListView *parent,IncidenceBase *ev,
Scheduler::Method method, const QString &recipients=QString::null);
virtual ~ScheduleItemOut() {}
IncidenceBase *event() { return mIncidence; }
Scheduler::Method method() { return mMethod; }
QString recipients() { return mRecipients; }
@@ -53,13 +53,13 @@ class ScheduleItemOut : public QListViewItem
class OutgoingDialog : public OutgoingDialog_base
{
Q_OBJECT
public:
OutgoingDialog(Calendar *,QWidget* parent=0,const char* name=0,
- bool modal=false,WFlags fl=0);
+ bool modal=false,Qt::WFlags fl=0);
~OutgoingDialog();
bool addMessage(IncidenceBase *,Scheduler::Method);
bool addMessage(IncidenceBase *,Scheduler::Method,const QString &recipients);
void setDocumentId( const QString &id );
@@ -69,13 +69,13 @@ class OutgoingDialog : public OutgoingDialog_base
signals:
void numMessagesChanged(int);
protected slots:
void send();
void deleteItem();
- void showEvent(QListViewItem *);
+ void showEvent(Q3ListViewItem *);
private:
bool saveMessage(IncidenceBase *,Scheduler::Method,const QString &recipients=0);
bool deleteMessage(IncidenceBase *);
Calendar *mCalendar;
diff --git a/korganizer/outgoingdialog_base.cpp b/korganizer/outgoingdialog_base.cpp
index 1873b44..be8a870 100644
--- a/korganizer/outgoingdialog_base.cpp
+++ b/korganizer/outgoingdialog_base.cpp
@@ -8,43 +8,45 @@
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "outgoingdialog_base.h"
#include <qvariant.h>
-#include <qheader.h>
-#include <qlistview.h>
+#include <q3header.h>
+#include <q3listview.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <q3whatsthis.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
/*
* Constructs a OutgoingDialog_base as a child of 'parent', with the
* name 'name' and widget flags set to 'f'.
*
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
-OutgoingDialog_base::OutgoingDialog_base( QWidget* parent, const char* name, bool modal, WFlags fl )
+OutgoingDialog_base::OutgoingDialog_base( QWidget* parent, const char* name, bool modal, Qt::WFlags fl )
: QDialog( parent, name, modal, fl )
{
if ( !name )
setName( "OutgoingDialog_base" );
- OutgoingDialog_baseLayout = new QGridLayout( this, 1, 1, 11, 6, "OutgoingDialog_baseLayout");
+ OutgoingDialog_baseLayout = new Q3GridLayout( this, 1, 1, 11, 6, "OutgoingDialog_baseLayout");
- mMessageListView = new QListView( this, "mMessageListView" );
+ mMessageListView = new Q3ListView( this, "mMessageListView" );
mMessageListView->addColumn( tr2i18n( "Summary" ) );
mMessageListView->addColumn( tr2i18n( "Start Date" ) );
mMessageListView->addColumn( tr2i18n( "Start Time" ) );
mMessageListView->addColumn( tr2i18n( "End Date" ) );
mMessageListView->addColumn( tr2i18n( "End Time" ) );
mMessageListView->addColumn( tr2i18n( "Method" ) );
- mMessageListView->setFrameShape( QListView::StyledPanel );
- mMessageListView->setFrameShadow( QListView::Sunken );
+ mMessageListView->setFrameShape( Q3ListView::StyledPanel );
+ mMessageListView->setFrameShadow( Q3ListView::Sunken );
mMessageListView->setAllColumnsShowFocus( TRUE );
OutgoingDialog_baseLayout->addMultiCellWidget( mMessageListView, 0, 3, 0, 0 );
PushButton5 = new QPushButton( this, "PushButton5" );
PushButton5->setDefault( FALSE );
diff --git a/korganizer/outgoingdialog_base.h b/korganizer/outgoingdialog_base.h
index af71bb1..5e81725 100644
--- a/korganizer/outgoingdialog_base.h
+++ b/korganizer/outgoingdialog_base.h
@@ -9,35 +9,39 @@
#ifndef OUTGOINGDIALOG_BASE_H
#define OUTGOINGDIALOG_BASE_H
#include <qvariant.h>
#include <qdialog.h>
-
-class QVBoxLayout;
-class QHBoxLayout;
-class QGridLayout;
-class QListView;
-class QListViewItem;
+//Added by qt3to4:
+#include <Q3GridLayout>
+#include <Q3HBoxLayout>
+#include <Q3VBoxLayout>
+
+class Q3VBoxLayout;
+class Q3HBoxLayout;
+class Q3GridLayout;
+class Q3ListView;
+class Q3ListViewItem;
class QPushButton;
class OutgoingDialog_base : public QDialog
{
Q_OBJECT
public:
- OutgoingDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ OutgoingDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
~OutgoingDialog_base();
- QListView* mMessageListView;
+ Q3ListView* mMessageListView;
QPushButton* PushButton5;
QPushButton* PushButton7;
QPushButton* PushButton6;
protected:
- QGridLayout* OutgoingDialog_baseLayout;
+ Q3GridLayout* OutgoingDialog_baseLayout;
protected slots:
virtual void languageChange();
virtual void send();
virtual void deleteItem();
diff --git a/korganizer/publishdialog.cpp b/korganizer/publishdialog.cpp
index 2ae6720..ede9840 100644
--- a/korganizer/publishdialog.cpp
+++ b/korganizer/publishdialog.cpp
@@ -32,40 +32,40 @@
#endif
#include "koprefs.h"
#include "publishdialog.h"
PublishDialog::PublishDialog(QWidget* parent, const char* name,
- bool modal, WFlags fl)
+ bool modal, Qt::WFlags fl)
: PublishDialog_base(parent,name,modal,fl)
{
setCaption(i18n("Select Addresses"));
mNameLineEdit->setEnabled(false);
mEmailLineEdit->setEnabled(false);
- connect(mAddressListView,SIGNAL(selectionChanged(QListViewItem *)),
+ connect(mAddressListView,SIGNAL(selectionChanged(Q3ListViewItem *)),
SLOT(updateInput()));
}
PublishDialog::~PublishDialog()
{
}
void PublishDialog::addAttendee(Attendee *attendee)
{
mNameLineEdit->setEnabled(true);
mEmailLineEdit->setEnabled(true);
- QListViewItem *item = new QListViewItem(mAddressListView);
+ Q3ListViewItem *item = new Q3ListViewItem(mAddressListView);
item->setText(0,attendee->name());
item->setText(1,attendee->email());
mAddressListView->insertItem(item);
}
QString PublishDialog::addresses()
{
QString to = "";
- QListViewItem *item;
+ Q3ListViewItem *item;
int i, count;
count = mAddressListView->childCount();
for (i=0;i<count;i++) {
item = mAddressListView->firstChild();
mAddressListView->takeItem(item);
to += item->text(1);
@@ -77,22 +77,22 @@ QString PublishDialog::addresses()
}
void PublishDialog::addItem()
{
mNameLineEdit->setEnabled(true);
mEmailLineEdit->setEnabled(true);
- QListViewItem *item = new QListViewItem(mAddressListView);
+ Q3ListViewItem *item = new Q3ListViewItem(mAddressListView);
mAddressListView->insertItem(item);
mAddressListView->setSelected(item,true);
mNameLineEdit->setText(i18n("(EmptyName)"));
mEmailLineEdit->setText(i18n("(EmptyEmail)"));
}
void PublishDialog::removeItem()
{
- QListViewItem *item;
+ Q3ListViewItem *item;
item = mAddressListView->selectedItem();
if (!item) return;
mAddressListView->takeItem(item);
item = mAddressListView->selectedItem();
if (!item) {
mNameLineEdit->setText("");
@@ -116,34 +116,34 @@ void PublishDialog::openAddressbook()
if (!a.isEmpty()) {
uint i;
for (i=0;i<addressList.count();i++) {
a = addressList[i];
mNameLineEdit->setEnabled(true);
mEmailLineEdit->setEnabled(true);
- QListViewItem *item = new QListViewItem(mAddressListView);
+ Q3ListViewItem *item = new Q3ListViewItem(mAddressListView);
mAddressListView->setSelected(item,true);
mNameLineEdit->setText(a.realName());
mEmailLineEdit->setText(a.preferredEmail());
mAddressListView->insertItem(item);
}
}
#endif
}
void PublishDialog::updateItem()
{
- QListViewItem *item;
+ Q3ListViewItem *item;
item = mAddressListView->selectedItem();
if (!item) return;
item->setText(0,mNameLineEdit->text());
item->setText(1,mEmailLineEdit->text());
}
void PublishDialog::updateInput()
{
- QListViewItem *item;
+ Q3ListViewItem *item;
item = mAddressListView->selectedItem();
if (!item) return;
mNameLineEdit->setEnabled(true);
mEmailLineEdit->setEnabled(true);
QString mail = item->text(1);
mNameLineEdit->setText(item->text(0));
diff --git a/korganizer/publishdialog.h b/korganizer/publishdialog.h
index 338603c..3ffeec4 100644
--- a/korganizer/publishdialog.h
+++ b/korganizer/publishdialog.h
@@ -20,25 +20,25 @@
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#ifndef PUBLISHDIALOG_H
#define PUBLISHDIALOG_H
-#include <qlistview.h>
+#include <q3listview.h>
#include <libkcal/attendee.h>
#include "publishdialog_base.h"
using namespace KCal;
class PublishDialog : public PublishDialog_base
{
Q_OBJECT
public:
PublishDialog(QWidget* parent=0,const char* name=0,
- bool modal=true,WFlags fl=0);
+ bool modal=true,Qt::WFlags fl=0);
~PublishDialog();
void addAttendee(Attendee *attendee);
QString addresses();
signals:
diff --git a/korganizer/publishdialog_base.cpp b/korganizer/publishdialog_base.cpp
index 683f7e9..ce5c542 100644
--- a/korganizer/publishdialog_base.cpp
+++ b/korganizer/publishdialog_base.cpp
@@ -8,38 +8,41 @@
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "publishdialog_base.h"
#include <qvariant.h>
-#include <qframe.h>
-#include <qheader.h>
+#include <q3frame.h>
+#include <q3header.h>
#include <qlabel.h>
#include <qlineedit.h>
-#include <qlistview.h>
+#include <q3listview.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <q3whatsthis.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
+#include <Q3HBoxLayout>
/*
* Constructs a PublishDialog_base as a child of 'parent', with the
* name 'name' and widget flags set to 'f'.
*
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
-PublishDialog_base::PublishDialog_base( QWidget* parent, const char* name, bool modal, WFlags fl )
+PublishDialog_base::PublishDialog_base( QWidget* parent, const char* name, bool modal, Qt::WFlags fl )
: QDialog( parent, name, modal, fl )
{
if ( !name )
setName( "PublishDialog_base" );
- PublishDialog_baseLayout = new QGridLayout( this, 1, 1, 11, 6, "PublishDialog_baseLayout");
+ PublishDialog_baseLayout = new Q3GridLayout( this, 1, 1, 11, 6, "PublishDialog_baseLayout");
- mAddressListView = new QListView( this, "mAddressListView" );
+ mAddressListView = new Q3ListView( this, "mAddressListView" );
mAddressListView->addColumn( tr2i18n( "Name" ) );
mAddressListView->addColumn( tr2i18n( "Email" ) );
PublishDialog_baseLayout->addMultiCellWidget( mAddressListView, 0, 3, 0, 1 );
TextLabel1 = new QLabel( this, "TextLabel1" );
@@ -69,20 +72,20 @@ PublishDialog_base::PublishDialog_base( QWidget* parent, const char* name, bool
PushButton11 = new QPushButton( this, "PushButton11" );
PublishDialog_baseLayout->addWidget( PushButton11, 1, 2 );
QSpacerItem* spacer = new QSpacerItem( 20, 241, QSizePolicy::Minimum, QSizePolicy::Expanding );
PublishDialog_baseLayout->addMultiCell( spacer, 3, 5, 2, 2 );
- Line2 = new QFrame( this, "Line2" );
- Line2->setFrameShape( QFrame::HLine );
- Line2->setFrameShadow( QFrame::Sunken );
- Line2->setFrameShape( QFrame::HLine );
+ Line2 = new Q3Frame( this, "Line2" );
+ Line2->setFrameShape( Q3Frame::HLine );
+ Line2->setFrameShadow( Q3Frame::Sunken );
+ Line2->setFrameShape( Q3Frame::HLine );
PublishDialog_baseLayout->addMultiCellWidget( Line2, 6, 6, 0, 2 );
- layout95 = new QHBoxLayout( 0, 0, 6, "layout95");
+ layout95 = new Q3HBoxLayout( 0, 0, 6, "layout95");
QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
layout95->addItem( spacer_2 );
PushButton9 = new QPushButton( this, "PushButton9" );
PushButton9->setDefault( TRUE );
layout95->addWidget( PushButton9 );
diff --git a/korganizer/publishdialog_base.h b/korganizer/publishdialog_base.h
index 932474e..d1b40ae 100644
--- a/korganizer/publishdialog_base.h
+++ b/korganizer/publishdialog_base.h
@@ -9,46 +9,52 @@
#ifndef PUBLISHDIALOG_BASE_H
#define PUBLISHDIALOG_BASE_H
#include <qvariant.h>
#include <qdialog.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
+#include <Q3Frame>
+#include <Q3GridLayout>
+#include <Q3HBoxLayout>
+#include <QLabel>
-class QVBoxLayout;
-class QHBoxLayout;
-class QGridLayout;
-class QFrame;
+class Q3VBoxLayout;
+class Q3HBoxLayout;
+class Q3GridLayout;
+class Q3Frame;
class QLabel;
class QLineEdit;
-class QListView;
-class QListViewItem;
+class Q3ListView;
+class Q3ListViewItem;
class QPushButton;
class PublishDialog_base : public QDialog
{
Q_OBJECT
public:
- PublishDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ PublishDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
~PublishDialog_base();
- QListView* mAddressListView;
+ Q3ListView* mAddressListView;
QLabel* TextLabel1;
QLabel* TextLabel2;
QLineEdit* mEmailLineEdit;
QLineEdit* mNameLineEdit;
QPushButton* PushButton10;
QPushButton* PushButton12;
QPushButton* PushButton11;
- QFrame* Line2;
+ Q3Frame* Line2;
QPushButton* PushButton9;
QPushButton* PushButton8;
protected:
- QGridLayout* PublishDialog_baseLayout;
- QHBoxLayout* layout95;
+ Q3GridLayout* PublishDialog_baseLayout;
+ Q3HBoxLayout* layout95;
protected slots:
virtual void languageChange();
virtual void addItem();
virtual void removeItem();
diff --git a/korganizer/savetemplatedialog.cpp b/korganizer/savetemplatedialog.cpp
index 3544081..35bedba 100644
--- a/korganizer/savetemplatedialog.cpp
+++ b/korganizer/savetemplatedialog.cpp
@@ -19,12 +19,15 @@
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 <qlayout.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
+#include <Q3Frame>
#include <keditlistbox.h>
#include <klocale.h>
#include "koprefs.h"
@@ -32,14 +35,14 @@
SaveTemplateDialog::SaveTemplateDialog( IncidenceType type, QWidget *parent )
: KDialogBase( Plain, i18n("Save Template"), Ok | Cancel, Ok, parent, 0,
true, false ),
mType( type )
{
- QFrame *topFrame = plainPage();
- QVBoxLayout *topLayout = new QVBoxLayout( topFrame, 0, spacingHint() );
+ Q3Frame *topFrame = plainPage();
+ Q3VBoxLayout *topLayout = new Q3VBoxLayout( topFrame, 0, spacingHint() );
mEditListBox = new KEditListBox( i18n("Select Template Name"), topFrame,
0, false, KEditListBox::Add |
KEditListBox::Remove );
topLayout->addWidget( mEditListBox );
connect( mEditListBox, SIGNAL( changed() ), SLOT( slotChanged() ) );
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp
index 9cfdc35..105b844 100644
--- a/korganizer/searchdialog.cpp
+++ b/korganizer/searchdialog.cpp
@@ -21,20 +21,27 @@
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#include <qlayout.h>
#include <qcheckbox.h>
-#include <qgroupbox.h>
+#include <q3groupbox.h>
#include <qapplication.h>
+#include <QDesktopWidget>
#include <qlabel.h>
-#include <qlistview.h>
-#include <qwhatsthis.h>
+#include <q3listview.h>
+#include <q3whatsthis.h>
#include <qlineedit.h>
#include <qpushbutton.h>
-#include <qhbuttongroup.h>
+//#include <qhbuttongroup.h>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
+#include <Q3Frame>
+#include <Q3PtrList>
+#include <QKeyEvent>
+#include <Q3VBoxLayout>
#include <klocale.h>
#include <kmessagebox.h>
#include <libkdepim/kdateedit.h>
#include "koglobals.h"
@@ -43,21 +50,21 @@
#include "calendarview.h"
#include "koviewmanager.h"
#include "searchdialog.h"
SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
- : QVBox( 0 )
+ : Q3VBox( 0 )
{
mCalendar = calendar;
- QFrame *topFrame = new QFrame( this ) ;//plainPage();
- QVBoxLayout *layout = new QVBoxLayout(topFrame,KDialog::marginHint(),KDialog::spacingHint());
+ Q3Frame *topFrame = new Q3Frame( this ) ;//plainPage();
+ Q3VBoxLayout *layout = new Q3VBoxLayout(topFrame,KDialog::marginHint(),KDialog::spacingHint());
// Search expression
- QHBoxLayout *subLayout = new QHBoxLayout();
+ Q3HBoxLayout *subLayout = new Q3HBoxLayout();
layout->addLayout(subLayout);
/*
searchLabel = new QLabel(topFrame);
searchLabel->setText(i18n("Search for:"));
subLayout->addWidget(searchLabel);
*/
@@ -95,50 +102,50 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
connect(searchEdit, SIGNAL(textChanged ( const QString & )),this,SLOT(searchTextChanged( const QString & )));
connect(searchEdit, SIGNAL( returnPressed () ),this,SLOT(doSearch()));
// Subjects to search
// QGroupBox *subjectGroup = new QGroupBox(1,Vertical,i18n("Search In"),
// topFrame);
- incidenceGroup = new QHBox( topFrame );
+ incidenceGroup = new Q3HBox( topFrame );
layout->addWidget(incidenceGroup);
mSearchEvent = new QCheckBox(i18n("Events"),incidenceGroup);
//mSearchEvent->setChecked(true);
mSearchTodo = new QCheckBox(i18n("Todos"),incidenceGroup);
mSearchJournal = new QCheckBox(i18n("Journals"),incidenceGroup);
- subjectGroup = new QHBox( topFrame );
+ subjectGroup = new Q3HBox( topFrame );
layout->addWidget(subjectGroup);
mSummaryCheck = new QCheckBox(i18n("Summary/Loc."),subjectGroup);
mSummaryCheck->setChecked(true);
mDescriptionCheck = new QCheckBox(i18n("Details"),subjectGroup);
mCategoryCheck = new QCheckBox(i18n("Categories"),subjectGroup);
- attendeeGroup = new QHBox( topFrame );
+ attendeeGroup = new Q3HBox( topFrame );
layout->addWidget(attendeeGroup );
new QLabel( i18n("Attendee:"),attendeeGroup );
mSearchAName = new QCheckBox(i18n("Name"),attendeeGroup );
mSearchAEmail = new QCheckBox(i18n("Email"), attendeeGroup );
// Date range
// QGroupBox *rangeGroup = new QGroupBox(1,Horizontal,i18n("Date Range"),
// topFrame);
// layout->addWidget(rangeGroup);
QWidget *rangeWidget = new QWidget(topFrame);
int space = KDialog::spacingHint();
if ( QApplication::desktop()->width() <= 240 ) space = 1;
- QHBoxLayout *rangeLayout = new QHBoxLayout(rangeWidget,0,space);
+ Q3HBoxLayout *rangeLayout = new Q3HBoxLayout(rangeWidget,0,space);
rangeLayout->addWidget(new QLabel(i18n("From:"),rangeWidget));
mStartDate = new KDateEdit(rangeWidget);
rangeLayout->addWidget(mStartDate);
rangeLayout->addWidget(new QLabel(i18n("To:"),rangeWidget));
mEndDate = new KDateEdit(rangeWidget);
mEndDate->setDate(QDate::currentDate().addDays(365));
rangeLayout->addWidget(mEndDate);
- QToolButton *wt = QWhatsThis::whatsThisButton ( rangeWidget );
+ QToolButton *wt = Q3WhatsThis::whatsThisButton ( rangeWidget );
rangeLayout->addWidget( (QWidget*)wt );
layout->addWidget(rangeWidget);
// Results list view
listView = new KOListView(mCalendar,topFrame);
layout->addWidget(listView);
listView->showCompletedTodos();
@@ -338,13 +345,13 @@ void SearchDialog::updateView()
listView->addTodos(mMatchedTodos);
listView->addJournals(mMatchedJournals);
}
void SearchDialog::search(const QRegExp &re)
{
- QPtrList<Event> events;
+ Q3PtrList<Event> events;
if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) {
if ( mRefineItems->isChecked() ) events = mMatchedEvents;
mMatchedEvents.clear();
}
if ( mSearchEvent->isChecked() ) {
if ( !mRefineItems->isChecked() )
@@ -416,13 +423,13 @@ void SearchDialog::search(const QRegExp &re)
mMatchedEvents.append(ev);
}
continue;
}
}
if ( mSearchAName->isChecked() || mSearchAEmail->isChecked() ) {
- QPtrList<Attendee> tmpAList = ev->attendees();
+ Q3PtrList<Attendee> tmpAList = ev->attendees();
Attendee *a;
for (a = tmpAList.first(); a; a = tmpAList.next()) {
if (mSearchAName->isChecked()) {
#if QT_VERSION >= 0x030000
if (re.search(a->name()) != -1)
#else
@@ -455,13 +462,13 @@ void SearchDialog::search(const QRegExp &re)
}
}
}
}
}
}
- QPtrList<Todo> todos;
+ Q3PtrList<Todo> todos;
if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) {
if ( mRefineItems->isChecked() ) todos = mMatchedTodos ;
mMatchedTodos.clear();
}
@@ -509,13 +516,13 @@ void SearchDialog::search(const QRegExp &re)
else if (!mMatchedTodos.contains( tod ))
mMatchedTodos.append(tod);
continue;
}
}
if ( mSearchAName->isChecked() || mSearchAEmail->isChecked() ) {
- QPtrList<Attendee> tmpAList = tod->attendees();
+ Q3PtrList<Attendee> tmpAList = tod->attendees();
Attendee *a;
for (a = tmpAList.first(); a; a = tmpAList.next()) {
if (mSearchAName->isChecked()) {
#if QT_VERSION >= 0x030000
if (re.search(a->name()) != -1)
#else
@@ -545,13 +552,13 @@ void SearchDialog::search(const QRegExp &re)
}
}
}
}
}
- QPtrList<Journal> journals;
+ Q3PtrList<Journal> journals;
if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) {
if ( mRefineItems->isChecked() ) journals = mMatchedJournals ;
mMatchedJournals.clear();
}
if (mSearchJournal->isChecked() ) {
if ( ! mRefineItems->isChecked() ) journals = mCalendar->journals();
diff --git a/korganizer/searchdialog.h b/korganizer/searchdialog.h
index 945ff65..5df6116 100644
--- a/korganizer/searchdialog.h
+++ b/korganizer/searchdialog.h
@@ -23,14 +23,18 @@
*/
#ifndef SEARCHDIALOG_H
#define SEARCHDIALOG_H
#include <qregexp.h>
#include <qradiobutton.h>
+//Added by qt3to4:
+#include <QLabel>
+#include <QKeyEvent>
+#include <Q3PtrList>
#include <kdialogbase.h>
-#include <qvbox.h>
+#include <q3vbox.h>
#include <libkcal/calendar.h>
#include "kolistview.h"
class KDateEdit;
@@ -38,13 +42,13 @@ class QCheckBox;
class QLineEdit;
class KLineEdit;
class QLabel;
class CalendarView;
using namespace KCal;
-class SearchDialog : public QVBox
+class SearchDialog : public Q3VBox
{
Q_OBJECT
public:
SearchDialog(Calendar *calendar,CalendarView *parent=0);
virtual ~SearchDialog();
KOListView *listview(){ return listView;}
@@ -69,20 +73,20 @@ class SearchDialog : public QVBox
void showEventSignal(Event *);
void editEventSignal(Event *);
void deleteEventSignal(Event *);
private:
- QHBox *incidenceGroup ,*subjectGroup ,*attendeeGroup;
+ Q3HBox *incidenceGroup ,*subjectGroup ,*attendeeGroup;
void search(const QRegExp &);
Calendar *mCalendar;
- QPtrList<Event> mMatchedEvents;
- QPtrList<Todo> mMatchedTodos;
- QPtrList<Journal> mMatchedJournals;
+ Q3PtrList<Event> mMatchedEvents;
+ Q3PtrList<Todo> mMatchedTodos;
+ Q3PtrList<Journal> mMatchedJournals;
QLabel *searchLabel;
KLineEdit *searchEdit;
KOListView *listView;
KDateEdit *mStartDate;
diff --git a/korganizer/statusdialog.cpp b/korganizer/statusdialog.cpp
index 7137c49..8186ebb 100644
--- a/korganizer/statusdialog.cpp
+++ b/korganizer/statusdialog.cpp
@@ -18,37 +18,40 @@
*/
#include <qlabel.h>
#include <qpushbutton.h>
#include <qstringlist.h>
#include <qlayout.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
+#include <Q3HBoxLayout>
#include <kdebug.h>
#include <klocale.h>
#include "statusdialog.h"
StatusDialog::StatusDialog(QWidget* parent, const char* name) :
KDialog(parent,name,true)
{
setCaption(i18n("Set Your Status"));
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
topLayout->setSpacing( spacingHint() );
topLayout->setMargin( marginHint() );
- QBoxLayout *statusLayout = new QHBoxLayout( topLayout );
+ Q3BoxLayout *statusLayout = new Q3HBoxLayout( topLayout );
QLabel *text = new QLabel(i18n("Set your status"),this);
statusLayout->addWidget( text );
mStatus = new QComboBox(false,this);
mStatus->insertStringList(Attendee::statusList());
statusLayout->addWidget( mStatus );
- QBoxLayout *buttonLayout = new QHBoxLayout( topLayout );
+ Q3BoxLayout *buttonLayout = new Q3HBoxLayout( topLayout );
QPushButton *ok = new QPushButton(i18n("&OK"), this);
connect ( ok,SIGNAL(clicked()), this,SLOT(accept()) );
buttonLayout->addWidget( ok );
QPushButton *cancel = new QPushButton(i18n("&Cancel"), this);
diff --git a/korganizer/timeline.cpp b/korganizer/timeline.cpp
index 11be432..a6c3cdc 100644
--- a/korganizer/timeline.cpp
+++ b/korganizer/timeline.cpp
@@ -2,19 +2,19 @@
#include <kdebug.h>
#include "timeline.h"
TimeLine::TimeLine( QWidget *parent, const char *name ) :
- QScrollView( parent, name )
+ Q3ScrollView( parent, name )
{
mPixelWidth = 1000;
resizeContents( mPixelWidth, 20 );
- viewport()->setBackgroundMode( PaletteBackground );
+ viewport()->setBackgroundMode( Qt::PaletteBackground );
setHScrollBarMode(AlwaysOff);
setVScrollBarMode(AlwaysOff);
}
TimeLine::~TimeLine()
@@ -55,8 +55,8 @@ void TimeLine::setDateRange( const QDateTime &start, const QDateTime &end )
kdDebug() << "TimeLines::setDateRange(): mDaySpacing: " << mDaySpacing << " mDayOffset: "
<< mDayOffset << " mSecsPerPixel: " << mSecsPerPixel << endl;
}
void TimeLine::setContentsPos( int pos )
{
- QScrollView::setContentsPos ( pos, 0 );
+ Q3ScrollView::setContentsPos ( pos, 0 );
}
diff --git a/korganizer/timeline.h b/korganizer/timeline.h
index ab3e5d3..bf301fa 100644
--- a/korganizer/timeline.h
+++ b/korganizer/timeline.h
@@ -1,13 +1,13 @@
#ifndef TIMELINE_H
#define TIMELINE_H
-#include <qscrollview.h>
+#include <q3scrollview.h>
#include <qdatetime.h>
-class TimeLine : public QScrollView
+class TimeLine : public Q3ScrollView
{
Q_OBJECT
public:
TimeLine( QWidget *parent = 0, const char *name = 0 );
virtual ~TimeLine();
diff --git a/korganizer/timespanview.cpp b/korganizer/timespanview.cpp
index df8ff88..0908056 100644
--- a/korganizer/timespanview.cpp
+++ b/korganizer/timespanview.cpp
@@ -1,16 +1,20 @@
#ifndef DESKTOP_VERSION
#include <qksplitter.h>
#else
#include <qsplitter.h>
#endif
-#include <qlistview.h>
+#include <q3listview.h>
#include <qlayout.h>
-#include <qheader.h>
+#include <q3header.h>
#include <qpushbutton.h>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
+#include <Q3VBoxLayout>
+#include <Q3ValueList>
#include <klocale.h>
#include <kdebug.h>
#include "lineview.h"
#include "timeline.h"
@@ -18,34 +22,34 @@
#include "timespanview.h"
TimeSpanView::TimeSpanView( QWidget *parent, const char *name ) :
QWidget( parent, name )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
#ifndef DESKTOP_VERSION
mSplitter = new QKSplitter( this );
#else
mSplitter = new QSplitter( this );
#endif
topLayout->addWidget( mSplitter );
- mList = new QListView( mSplitter );
+ mList = new Q3ListView( mSplitter );
mList->addColumn( i18n("Summary") );
QWidget *rightPane = new QWidget( mSplitter );
- QBoxLayout *rightPaneLayout = new QVBoxLayout( rightPane );
+ Q3BoxLayout *rightPaneLayout = new Q3VBoxLayout( rightPane );
mTimeLine = new TimeLine( rightPane );
mTimeLine->setFixedHeight( mList->header()->height() );
rightPaneLayout->addWidget( mTimeLine );
mLineView = new LineView( rightPane );
rightPaneLayout->addWidget( mLineView );
- QBoxLayout *buttonLayout = new QHBoxLayout( rightPaneLayout );
+ Q3BoxLayout *buttonLayout = new Q3HBoxLayout( rightPaneLayout );
QPushButton *zoomInButton = new QPushButton( i18n("Zoom In"), rightPane );
connect( zoomInButton, SIGNAL( clicked() ), SLOT( zoomIn() ) );
buttonLayout->addWidget( zoomInButton );
QPushButton *zoomOutButton = new QPushButton( i18n("Zoom Out"), rightPane );
@@ -61,25 +65,25 @@ TimeSpanView::TimeSpanView( QWidget *parent, const char *name ) :
}
TimeSpanView::~TimeSpanView()
{
}
-QValueList<int> TimeSpanView::splitterSizes()
+Q3ValueList<int> TimeSpanView::splitterSizes()
{
return mSplitter->sizes();
}
-void TimeSpanView::setSplitterSizes( QValueList<int> sizes )
+void TimeSpanView::setSplitterSizes( Q3ValueList<int> sizes )
{
mSplitter->setSizes( sizes );
}
void TimeSpanView::addItem( KCal::Event *event )
{
- new QListViewItem( mList, event->summary() );
+ new Q3ListViewItem( mList, event->summary() );
QDateTime startDt = event->dtStart();
QDateTime endDt = event->dtEnd();
// kdDebug() << "TimeSpanView::addItem(): start: " << startDt.toString()
// << " end: " << endDt.toString() << endl;
diff --git a/korganizer/timespanview.h b/korganizer/timespanview.h
index 34cb1f7..f652374 100644
--- a/korganizer/timespanview.h
+++ b/korganizer/timespanview.h
@@ -1,21 +1,23 @@
#ifndef TIMESPANVIEW_H
#define TIMESPANVIEW_H
#include <qwidget.h>
+//Added by qt3to4:
+#include <Q3ValueList>
#include <libkcal/event.h>
//class QSplitter;
#ifndef DESKTOP_VERSION
class QKSplitter;
#else
class QSplitter;
#define QKSplitter QSplitter
#endif
-class QListView;
+class Q3ListView;
class LineView;
class TimeLine;
class TimeSpanView : public QWidget
{
@@ -23,14 +25,14 @@ class TimeSpanView : public QWidget
public:
TimeSpanView( QWidget *parent=0, const char *name=0 );
virtual ~TimeSpanView();
void addItem( KCal::Event * );
- QValueList<int> splitterSizes();
- void setSplitterSizes( QValueList<int> );
+ Q3ValueList<int> splitterSizes();
+ void setSplitterSizes( Q3ValueList<int> );
void clear();
void setDateRange( const QDateTime &start, const QDateTime &end );
QDateTime startDateTime();
@@ -45,13 +47,13 @@ class TimeSpanView : public QWidget
signals:
void dateRangeChanged();
private:
QKSplitter *mSplitter;
- QListView *mList;
+ Q3ListView *mList;
TimeLine *mTimeLine;
LineView *mLineView;
QDateTime mStartDate;
QDateTime mEndDate;
int mSecsPerPixel;