summaryrefslogtreecommitdiffabout
path: root/korganizer/koeventpopupmenu.cpp
authorMichael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
committer Michael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
commita08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff)
tree8ee90d686081c52e7c69b5ce946e9b1a7d690001 /korganizer/koeventpopupmenu.cpp
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2
initial public commit of qt4 portp1
Diffstat (limited to 'korganizer/koeventpopupmenu.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeventpopupmenu.cpp17
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
35KOEventPopupMenu::KOEventPopupMenu(): QPopupMenu() 38KOEventPopupMenu::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()
74void KOEventPopupMenu::enableDefault( bool enable ) 77void 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
158void KOEventPopupMenu::addAdditionalItem(const QIconSet &icon,const QString &text, 161void 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{