Diffstat (limited to 'korganizer/koeventpopupmenu.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koeventpopupmenu.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/korganizer/koeventpopupmenu.cpp b/korganizer/koeventpopupmenu.cpp index fc4d9a4..81047c1 100644 --- a/korganizer/koeventpopupmenu.cpp +++ b/korganizer/koeventpopupmenu.cpp | |||
@@ -22,6 +22,9 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qcursor.h> | 24 | #include <qcursor.h> |
25 | //Added by qt3to4: | ||
26 | #include <Q3ValueList> | ||
27 | #include <Q3PopupMenu> | ||
25 | 28 | ||
26 | #include <klocale.h> | 29 | #include <klocale.h> |
27 | #include <kdebug.h> | 30 | #include <kdebug.h> |
@@ -32,7 +35,7 @@ | |||
32 | #include "koeventpopupmenu.h" | 35 | #include "koeventpopupmenu.h" |
33 | #include "koprefs.h" | 36 | #include "koprefs.h" |
34 | 37 | ||
35 | KOEventPopupMenu::KOEventPopupMenu(): QPopupMenu() | 38 | KOEventPopupMenu::KOEventPopupMenu(): Q3PopupMenu() |
36 | { | 39 | { |
37 | mCurrentIncidence = 0; | 40 | mCurrentIncidence = 0; |
38 | mHasAdditionalItems = false; | 41 | mHasAdditionalItems = false; |
@@ -53,11 +56,11 @@ KOEventPopupMenu::KOEventPopupMenu(): QPopupMenu() | |||
53 | mEditOnlyItems.append(insertItem (i18n("&Toggle Cancel"), | 56 | mEditOnlyItems.append(insertItem (i18n("&Toggle Cancel"), |
54 | this,SLOT(popupCancel()))); | 57 | this,SLOT(popupCancel()))); |
55 | isDisabled = false; | 58 | isDisabled = false; |
56 | mCatPopup = new QPopupMenu ( this ); | 59 | mCatPopup = new Q3PopupMenu ( this ); |
57 | mCatPopup->setCheckable (true); | 60 | mCatPopup->setCheckable (true); |
58 | connect(mCatPopup,SIGNAL( aboutToShow ()), this ,SLOT( fillCatPopup())); | 61 | connect(mCatPopup,SIGNAL( aboutToShow ()), this ,SLOT( fillCatPopup())); |
59 | connect(mCatPopup,SIGNAL( activated ( int ) ), this ,SLOT( computeCatPopup( int ))); | 62 | connect(mCatPopup,SIGNAL( activated ( int ) ), this ,SLOT( computeCatPopup( int ))); |
60 | mCalPopup = new QPopupMenu ( this ); | 63 | mCalPopup = new Q3PopupMenu ( this ); |
61 | mCalPopup->setCheckable (true); | 64 | mCalPopup->setCheckable (true); |
62 | connect(mCalPopup,SIGNAL( aboutToShow ()), this ,SLOT( fillCalPopup())); | 65 | connect(mCalPopup,SIGNAL( aboutToShow ()), this ,SLOT( fillCalPopup())); |
63 | connect(mCalPopup,SIGNAL( activated ( int ) ), this ,SLOT( computeCalPopup( int ))); | 66 | connect(mCalPopup,SIGNAL( activated ( int ) ), this ,SLOT( computeCalPopup( int ))); |
@@ -65,7 +68,7 @@ KOEventPopupMenu::KOEventPopupMenu(): QPopupMenu() | |||
65 | //mEditOnlyItems.append(insertItem (i18n("Calendar"),mCalPopup )); | 68 | //mEditOnlyItems.append(insertItem (i18n("Calendar"),mCalPopup )); |
66 | insertItem (i18n("Categories"),mCatPopup ); | 69 | insertItem (i18n("Categories"),mCatPopup ); |
67 | insertItem (i18n("Calendar"),mCalPopup ); | 70 | insertItem (i18n("Calendar"),mCalPopup ); |
68 | QValueList<int>::Iterator it; | 71 | Q3ValueList<int>::Iterator it; |
69 | for( it = mEditOnlyItems.begin(); it != mEditOnlyItems.end(); ++it ) { | 72 | for( it = mEditOnlyItems.begin(); it != mEditOnlyItems.end(); ++it ) { |
70 | mSingleOnlyItems.append(*it); | 73 | mSingleOnlyItems.append(*it); |
71 | } | 74 | } |
@@ -74,7 +77,7 @@ KOEventPopupMenu::KOEventPopupMenu(): QPopupMenu() | |||
74 | void KOEventPopupMenu::enableDefault( bool enable ) | 77 | void KOEventPopupMenu::enableDefault( bool enable ) |
75 | { | 78 | { |
76 | isDisabled = !enable; | 79 | isDisabled = !enable; |
77 | QValueList<int>::Iterator it; | 80 | Q3ValueList<int>::Iterator it; |
78 | for( it = mSingleOnlyItems.begin(); it != mSingleOnlyItems.end(); ++it ) { | 81 | for( it = mSingleOnlyItems.begin(); it != mSingleOnlyItems.end(); ++it ) { |
79 | setItemEnabled(*it,enable); | 82 | setItemEnabled(*it,enable); |
80 | } | 83 | } |
@@ -146,7 +149,7 @@ void KOEventPopupMenu::showIncidencePopup(Incidence *incidence) | |||
146 | if (mCurrentIncidence) { | 149 | if (mCurrentIncidence) { |
147 | // Enable/Disabled menu items only valid for editable events. | 150 | // Enable/Disabled menu items only valid for editable events. |
148 | if ( !isDisabled ) { | 151 | if ( !isDisabled ) { |
149 | QValueList<int>::Iterator it; | 152 | Q3ValueList<int>::Iterator it; |
150 | for( it = mEditOnlyItems.begin(); it != mEditOnlyItems.end(); ++it ) { | 153 | for( it = mEditOnlyItems.begin(); it != mEditOnlyItems.end(); ++it ) { |
151 | setItemEnabled(*it,!mCurrentIncidence->isReadOnly()); | 154 | setItemEnabled(*it,!mCurrentIncidence->isReadOnly()); |
152 | } | 155 | } |
@@ -155,7 +158,7 @@ void KOEventPopupMenu::showIncidencePopup(Incidence *incidence) | |||
155 | } | 158 | } |
156 | } | 159 | } |
157 | 160 | ||
158 | void KOEventPopupMenu::addAdditionalItem(const QIconSet &icon,const QString &text, | 161 | void KOEventPopupMenu::addAdditionalItem(const QIcon &icon,const QString &text, |
159 | const QObject *receiver, const char *member, | 162 | const QObject *receiver, const char *member, |
160 | bool editOnly) | 163 | bool editOnly) |
161 | { | 164 | { |