author | zautrix <zautrix> | 2005-04-08 12:43:22 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-08 12:43:22 (UTC) |
commit | 19a95939a6469ab5469f6904f57263a792598f07 (patch) (unidiff) | |
tree | 34dd6d16c3c47856427adc705d771cf5d2999026 | |
parent | afb896709be49326ca9d9ad1656153cc27a60ffe (diff) | |
download | kdepimpi-19a95939a6469ab5469f6904f57263a792598f07.zip kdepimpi-19a95939a6469ab5469f6904f57263a792598f07.tar.gz kdepimpi-19a95939a6469ab5469f6904f57263a792598f07.tar.bz2 |
desktp compile fix
-rw-r--r-- | korganizer/koagendaitem.cpp | 1 | ||||
-rw-r--r-- | korganizer/koeditorgeneral.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index e545ca8..c9e307f 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp | |||
@@ -1,101 +1,102 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <qlabel.h> | 20 | #include <qlabel.h> |
21 | #include <qlayout.h> | 21 | #include <qlayout.h> |
22 | #include <qhbox.h> | 22 | #include <qhbox.h> |
23 | #include <qvbox.h> | 23 | #include <qvbox.h> |
24 | #include <qtooltip.h> | 24 | #include <qtooltip.h> |
25 | #include <qwhatsthis.h> | 25 | #include <qwhatsthis.h> |
26 | #include <qdragobject.h> | 26 | #include <qdragobject.h> |
27 | #include <qdrawutil.h> | 27 | #include <qdrawutil.h> |
28 | #include <qpainter.h> | 28 | #include <qpainter.h> |
29 | 29 | ||
30 | #include <kiconloader.h> | 30 | #include <kiconloader.h> |
31 | #include <kdebug.h> | 31 | #include <kdebug.h> |
32 | #include <kglobal.h> | 32 | #include <kglobal.h> |
33 | #include <klocale.h> | 33 | #include <klocale.h> |
34 | #ifndef DESKTOP_VERSION | 34 | #ifndef DESKTOP_VERSION |
35 | #include <qpe/qpeapplication.h> | 35 | #include <qpe/qpeapplication.h> |
36 | #define AGENDA_ICON_SIZE 5 | 36 | #define AGENDA_ICON_SIZE 5 |
37 | #else | 37 | #else |
38 | #include <qapplication.h> | ||
38 | #define AGENDA_ICON_SIZE 7 | 39 | #define AGENDA_ICON_SIZE 7 |
39 | #endif | 40 | #endif |
40 | #include <libkcal/icaldrag.h> | 41 | #include <libkcal/icaldrag.h> |
41 | #include <libkcal/vcaldrag.h> | 42 | #include <libkcal/vcaldrag.h> |
42 | #include <libkcal/kincidenceformatter.h> | 43 | #include <libkcal/kincidenceformatter.h> |
43 | extern int globalFlagBlockAgenda; | 44 | extern int globalFlagBlockAgenda; |
44 | extern int globalFlagBlockAgendaItemPaint; | 45 | extern int globalFlagBlockAgendaItemPaint; |
45 | extern int globalFlagBlockAgendaItemUpdate; | 46 | extern int globalFlagBlockAgendaItemUpdate; |
46 | 47 | ||
47 | #include "koprefs.h" | 48 | #include "koprefs.h" |
48 | 49 | ||
49 | #include "koagendaitem.h" | 50 | #include "koagendaitem.h" |
50 | //#include "koagendaitem.moc" | 51 | //#include "koagendaitem.moc" |
51 | 52 | ||
52 | 53 | ||
53 | //-------------------------------------------------------------------------- | 54 | //-------------------------------------------------------------------------- |
54 | 55 | ||
55 | QToolTipGroup *KOAgendaItem::mToolTipGroup = 0; | 56 | QToolTipGroup *KOAgendaItem::mToolTipGroup = 0; |
56 | 57 | ||
57 | //-------------------------------------------------------------------------- | 58 | //-------------------------------------------------------------------------- |
58 | 59 | ||
59 | class KOAgendaItemWhatsThis :public QWhatsThis | 60 | class KOAgendaItemWhatsThis :public QWhatsThis |
60 | { | 61 | { |
61 | public: | 62 | public: |
62 | KOAgendaItemWhatsThis( KOAgendaItem* view ) : QWhatsThis( view ),_view (view) { }; | 63 | KOAgendaItemWhatsThis( KOAgendaItem* view ) : QWhatsThis( view ),_view (view) { }; |
63 | 64 | ||
64 | protected: | 65 | protected: |
65 | virtual QString text( const QPoint& ) | 66 | virtual QString text( const QPoint& ) |
66 | { | 67 | { |
67 | return _view->getWhatsThisText() ; | 68 | return _view->getWhatsThisText() ; |
68 | } | 69 | } |
69 | private: | 70 | private: |
70 | KOAgendaItem * _view; | 71 | KOAgendaItem * _view; |
71 | }; | 72 | }; |
72 | 73 | ||
73 | KOAgendaItem::KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent,bool allday, | 74 | KOAgendaItem::KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent,bool allday, |
74 | const char *name,WFlags) : | 75 | const char *name,WFlags) : |
75 | QWidget(parent, name), mIncidence(incidence), mDate(qd) | 76 | QWidget(parent, name), mIncidence(incidence), mDate(qd) |
76 | { | 77 | { |
77 | #ifndef DESKTOP_VERSION | 78 | #ifndef DESKTOP_VERSION |
78 | //QPEApplication::setStylusOperation( this, QPEApplication::RightOnHold ); | 79 | //QPEApplication::setStylusOperation( this, QPEApplication::RightOnHold ); |
79 | #endif | 80 | #endif |
80 | mKOAgendaItemWhatsThis = new KOAgendaItemWhatsThis(this); | 81 | mKOAgendaItemWhatsThis = new KOAgendaItemWhatsThis(this); |
81 | int wflags = getWFlags() |WRepaintNoErase;// WResizeNoErase | 82 | int wflags = getWFlags() |WRepaintNoErase;// WResizeNoErase |
82 | setWFlags ( wflags); | 83 | setWFlags ( wflags); |
83 | mAllDay = allday; | 84 | mAllDay = allday; |
84 | init ( incidence, qd ); | 85 | init ( incidence, qd ); |
85 | //setMouseTracking(true); | 86 | //setMouseTracking(true); |
86 | //setAcceptDrops(true); | 87 | //setAcceptDrops(true); |
87 | xPaintCoord = -1; | 88 | xPaintCoord = -1; |
88 | yPaintCoord = -1; | 89 | yPaintCoord = -1; |
89 | } | 90 | } |
90 | QString KOAgendaItem::getWhatsThisText() | 91 | QString KOAgendaItem::getWhatsThisText() |
91 | { | 92 | { |
92 | if ( mIncidence ) | 93 | if ( mIncidence ) |
93 | return KIncidenceFormatter::instance()->getFormattedText( mIncidence, | 94 | return KIncidenceFormatter::instance()->getFormattedText( mIncidence, |
94 | KOPrefs::instance()->mWTshowDetails, | 95 | KOPrefs::instance()->mWTshowDetails, |
95 | KOPrefs::instance()->mWTshowCreated, | 96 | KOPrefs::instance()->mWTshowCreated, |
96 | KOPrefs::instance()->mWTshowChanged); | 97 | KOPrefs::instance()->mWTshowChanged); |
97 | return "KOAgendaItem::getWhatsThisText()::internal error"; | 98 | return "KOAgendaItem::getWhatsThisText()::internal error"; |
98 | } | 99 | } |
99 | void KOAgendaItem::init ( Incidence *incidence, QDate qd ) | 100 | void KOAgendaItem::init ( Incidence *incidence, QDate qd ) |
100 | { | 101 | { |
101 | mIncidence = incidence; | 102 | mIncidence = incidence; |
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp index f54660f..9df76e7 100644 --- a/korganizer/koeditorgeneral.cpp +++ b/korganizer/koeditorgeneral.cpp | |||
@@ -1,95 +1,96 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qwidget.h> | 24 | #include <qwidget.h> |
25 | #include <qtooltip.h> | 25 | #include <qtooltip.h> |
26 | #include <qlayout.h> | 26 | #include <qlayout.h> |
27 | #include <qvbox.h> | 27 | #include <qvbox.h> |
28 | #include <qbuttongroup.h> | 28 | #include <qbuttongroup.h> |
29 | #include <qvgroupbox.h> | 29 | #include <qvgroupbox.h> |
30 | #include <qwidgetstack.h> | 30 | #include <qwidgetstack.h> |
31 | #include <qdatetime.h> | 31 | #include <qdatetime.h> |
32 | #include <qtimer.h> | ||
32 | #include <qfile.h> | 33 | #include <qfile.h> |
33 | 34 | ||
34 | 35 | ||
35 | #include <kglobal.h> | 36 | #include <kglobal.h> |
36 | #include <kdebug.h> | 37 | #include <kdebug.h> |
37 | #include <klocale.h> | 38 | #include <klocale.h> |
38 | #include <kiconloader.h> | 39 | #include <kiconloader.h> |
39 | #include <kmessagebox.h> | 40 | #include <kmessagebox.h> |
40 | #include <kfiledialog.h> | 41 | #include <kfiledialog.h> |
41 | #include <kstandarddirs.h> | 42 | #include <kstandarddirs.h> |
42 | 43 | ||
43 | #include <libkcal/todo.h> | 44 | #include <libkcal/todo.h> |
44 | #include <libkcal/event.h> | 45 | #include <libkcal/event.h> |
45 | #include <libkdepim/categoryselectdialog.h> | 46 | #include <libkdepim/categoryselectdialog.h> |
46 | #include <libkdepim/kdateedit.h> | 47 | #include <libkdepim/kdateedit.h> |
47 | 48 | ||
48 | #include "koprefs.h" | 49 | #include "koprefs.h" |
49 | #include "koglobals.h" | 50 | #include "koglobals.h" |
50 | 51 | ||
51 | #include "koeditorgeneral.h" | 52 | #include "koeditorgeneral.h" |
52 | #include "kolocationbox.h" | 53 | #include "kolocationbox.h" |
53 | #ifndef DESKTOP_VERSION | 54 | #ifndef DESKTOP_VERSION |
54 | #include <qpe/qpeapplication.h> | 55 | #include <qpe/qpeapplication.h> |
55 | #else | 56 | #else |
56 | #include <qapplication.h> | 57 | #include <qapplication.h> |
57 | #endif | 58 | #endif |
58 | 59 | ||
59 | KOEditorGeneral::KOEditorGeneral(QObject* parent, const char* name) : | 60 | KOEditorGeneral::KOEditorGeneral(QObject* parent, const char* name) : |
60 | QObject( parent, name) | 61 | QObject( parent, name) |
61 | { | 62 | { |
62 | mNextFocus = 0; | 63 | mNextFocus = 0; |
63 | } | 64 | } |
64 | 65 | ||
65 | KOEditorGeneral::~KOEditorGeneral() | 66 | KOEditorGeneral::~KOEditorGeneral() |
66 | { | 67 | { |
67 | } | 68 | } |
68 | 69 | ||
69 | void KOEditorGeneral::initHeader(QWidget *parent,QBoxLayout *topLayout) | 70 | void KOEditorGeneral::initHeader(QWidget *parent,QBoxLayout *topLayout) |
70 | { | 71 | { |
71 | QGridLayout *headerLayout = new QGridLayout(topLayout); | 72 | QGridLayout *headerLayout = new QGridLayout(topLayout); |
72 | 73 | ||
73 | #if 0 | 74 | #if 0 |
74 | mOwnerLabel = new QLabel(i18n("Owner:"),parent); | 75 | mOwnerLabel = new QLabel(i18n("Owner:"),parent); |
75 | headerLayout->addMultiCellWidget(mOwnerLabel,0,0,0,1); | 76 | headerLayout->addMultiCellWidget(mOwnerLabel,0,0,0,1); |
76 | #endif | 77 | #endif |
77 | 78 | ||
78 | QLabel *summaryLabel = new QLabel(i18n("Summary:"),parent); | 79 | QLabel *summaryLabel = new QLabel(i18n("Summary:"),parent); |
79 | headerLayout->addWidget(summaryLabel,1,0); | 80 | headerLayout->addWidget(summaryLabel,1,0); |
80 | 81 | ||
81 | mSummaryEdit = new KOLocationBox(TRUE,parent, 10); | 82 | mSummaryEdit = new KOLocationBox(TRUE,parent, 10); |
82 | mSummaryEdit->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::MinimumExpanding ,FALSE) ); | 83 | mSummaryEdit->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::MinimumExpanding ,FALSE) ); |
83 | //mSummaryEdit->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5 ,(QSizePolicy::SizeType)3 ,FALSE) ); | 84 | //mSummaryEdit->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5 ,(QSizePolicy::SizeType)3 ,FALSE) ); |
84 | //qDebug("h %d %d ", summaryLabel->sizeHint().height(),mSummaryEdit->sizeHint().height() ); | 85 | //qDebug("h %d %d ", summaryLabel->sizeHint().height(),mSummaryEdit->sizeHint().height() ); |
85 | int hei = (summaryLabel->sizeHint().height() + mSummaryEdit->sizeHint().height())/2; | 86 | int hei = (summaryLabel->sizeHint().height() + mSummaryEdit->sizeHint().height())/2; |
86 | if ( QApplication::desktop()->width() > 320 ) | 87 | if ( QApplication::desktop()->width() > 320 ) |
87 | mSummaryEdit->setMaximumHeight( hei +6 ); | 88 | mSummaryEdit->setMaximumHeight( hei +6 ); |
88 | //qDebug("%d %d %d %d %d %d ", QSizePolicy::Fixed , QSizePolicy::Minimum , QSizePolicy:: Maximum , QSizePolicy:: Preferred , QSizePolicy:: MinimumExpanding , QSizePolicy::Expanding ); | 89 | //qDebug("%d %d %d %d %d %d ", QSizePolicy::Fixed , QSizePolicy::Minimum , QSizePolicy:: Maximum , QSizePolicy:: Preferred , QSizePolicy:: MinimumExpanding , QSizePolicy::Expanding ); |
89 | // SizeType { Fixed = 0, Minimum = MayGrow, Maximum = MayShrink, Preferred = MayGrow|MayShrink, MinimumExpanding = Minimum|ExpMask, Expanding = MinimumExpanding|MayShrink } | 90 | // SizeType { Fixed = 0, Minimum = MayGrow, Maximum = MayShrink, Preferred = MayGrow|MayShrink, MinimumExpanding = Minimum|ExpMask, Expanding = MinimumExpanding|MayShrink } |
90 | // mSummaryEdit = new QLineEdit(parent); | 91 | // mSummaryEdit = new QLineEdit(parent); |
91 | headerLayout->addWidget(mSummaryEdit,1,1); | 92 | headerLayout->addWidget(mSummaryEdit,1,1); |
92 | connect ( mSummaryEdit->lineEdit(), SIGNAL ( returnPressed() ), this, SIGNAL (allAccepted () ) ); | 93 | connect ( mSummaryEdit->lineEdit(), SIGNAL ( returnPressed() ), this, SIGNAL (allAccepted () ) ); |
93 | 94 | ||
94 | QLabel *locationLabel = new QLabel(i18n("Location:"),parent); | 95 | QLabel *locationLabel = new QLabel(i18n("Location:"),parent); |
95 | headerLayout->addWidget(locationLabel,2,0); | 96 | headerLayout->addWidget(locationLabel,2,0); |