author | zautrix <zautrix> | 2005-07-10 10:17:55 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-10 10:17:55 (UTC) |
commit | 58b7818a74809dc9280a3249eeb7e0195a66f93d (patch) (unidiff) | |
tree | 04b04b867647a8c48d59e7a0fa89df6430039599 | |
parent | e8b6635ef7c98996f0415e6a77394569493ab151 (diff) | |
download | kdepimpi-58b7818a74809dc9280a3249eeb7e0195a66f93d.zip kdepimpi-58b7818a74809dc9280a3249eeb7e0195a66f93d.tar.gz kdepimpi-58b7818a74809dc9280a3249eeb7e0195a66f93d.tar.bz2 |
fixx
-rw-r--r-- | korganizer/calendarview.cpp | 7 | ||||
-rw-r--r-- | korganizer/calendarview.h | 3 | ||||
-rw-r--r-- | korganizer/koagenda.cpp | 5 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 12 | ||||
-rw-r--r-- | korganizer/mainwindow.h | 5 | ||||
-rw-r--r-- | microkde/kdeui/kbuttonbox.cpp | 2 | ||||
-rw-r--r-- | microkde/kdeui/kpopupmenu.cpp | 19 | ||||
-rw-r--r-- | microkde/kdeui/kpopupmenu.h | 22 | ||||
-rw-r--r-- | microkde/microkde.pro | 2 | ||||
-rw-r--r-- | microkde/microkdeE.pro | 2 |
10 files changed, 64 insertions, 15 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 5a2482e..17f1659 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -656,4 +656,11 @@ CalendarView::~CalendarView() | |||
656 | //kdDebug() << "~CalendarView() done" << endl; | 656 | //kdDebug() << "~CalendarView() done" << endl; |
657 | } | 657 | } |
658 | |||
659 | void CalendarView::slotResetFocus() | ||
660 | { | ||
661 | qDebug(" CalendarView::slotResetFocus() %x", qApp->focusWidget()); | ||
662 | |||
663 | } | ||
664 | |||
658 | void CalendarView::nextConflict( bool all, bool allday ) | 665 | void CalendarView::nextConflict( bool all, bool allday ) |
659 | { | 666 | { |
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index 799c297..456c2d7 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h | |||
@@ -201,5 +201,6 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser | |||
201 | 201 | ||
202 | 202 | ||
203 | public slots: | 203 | public slots: |
204 | void slotResetFocus(); | ||
204 | void nextConflict( bool all, bool allday ); | 205 | void nextConflict( bool all, bool allday ); |
205 | void conflictAll(); | 206 | void conflictAll(); |
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index 779f12e..0dd5ef5 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp | |||
@@ -1636,5 +1636,8 @@ void KOAgenda::setStartHour(int startHour) | |||
1636 | QTime KOAgenda::getEndTime() | 1636 | QTime KOAgenda::getEndTime() |
1637 | { | 1637 | { |
1638 | return QTime ( (contentsY ()+viewport()->height())*24/contentsHeight ()+1,0,0); | 1638 | int tim = (contentsY ()+viewport()->height())*24/contentsHeight (); |
1639 | if ( tim > 23 ) | ||
1640 | return QTime ( 23,59,59); | ||
1641 | return QTime ( tim,0,0); | ||
1639 | } | 1642 | } |
1640 | void KOAgenda::hideUnused() | 1643 | void KOAgenda::hideUnused() |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 4bedb61..21d5a35 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -22,5 +22,4 @@ | |||
22 | #ifndef DESKTOP_VERSION | 22 | #ifndef DESKTOP_VERSION |
23 | #include <qpe/global.h> | 23 | #include <qpe/global.h> |
24 | #include <qpe/qpemenubar.h> | ||
25 | #include <qpe/qpetoolbar.h> | 24 | #include <qpe/qpetoolbar.h> |
26 | #include <qpe/resource.h> | 25 | #include <qpe/resource.h> |
@@ -30,5 +29,4 @@ | |||
30 | #include <unistd.h> // for sleep | 29 | #include <unistd.h> // for sleep |
31 | #else | 30 | #else |
32 | #include <qmenubar.h> | ||
33 | #include <qtoolbar.h> | 31 | #include <qtoolbar.h> |
34 | #include <qapplication.h> | 32 | #include <qapplication.h> |
@@ -226,5 +224,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : | |||
226 | } | 224 | } |
227 | filterToolBar = new QPEToolBar ( this ); | 225 | filterToolBar = new QPEToolBar ( this ); |
228 | filterMenubar = new QMenuBar( 0 ); | 226 | filterMenubar = new KMenuBar( 0 ); |
229 | QFontMetrics fm ( filterMenubar->font() ); | 227 | QFontMetrics fm ( filterMenubar->font() ); |
230 | 228 | ||
@@ -683,7 +681,7 @@ void MainWindow::initActions() | |||
683 | pixWid = 18; pixHei = 16; | 681 | pixWid = 18; pixHei = 16; |
684 | } | 682 | } |
683 | KMenuBar *menuBar1; | ||
685 | if ( KOPrefs::instance()->mShowFullMenu ) { | 684 | if ( KOPrefs::instance()->mShowFullMenu ) { |
686 | QMenuBar *menuBar1; | 685 | menuBar1 = new KMenuBar( this );//menuBar(); |
687 | menuBar1 = menuBar(); | ||
688 | menuBar1->insertItem( i18n("File"), importMenu ); | 686 | menuBar1->insertItem( i18n("File"), importMenu ); |
689 | menuBar1->insertItem( i18n("View"), viewMenu ); | 687 | menuBar1->insertItem( i18n("View"), viewMenu ); |
@@ -701,6 +699,5 @@ void MainWindow::initActions() | |||
701 | menuBar1->insertItem( i18n("Help"), helpMenu ); | 699 | menuBar1->insertItem( i18n("Help"), helpMenu ); |
702 | } else { | 700 | } else { |
703 | QPEMenuBar *menuBar1; | 701 | menuBar1 = new KMenuBar( iconToolBar ); |
704 | menuBar1 = new QPEMenuBar( iconToolBar ); | ||
705 | QPopupMenu *menuBar = new QPopupMenu( this ); | 702 | QPopupMenu *menuBar = new QPopupMenu( this ); |
706 | icon = loadPixmap( pathString + "z_menu" ); | 703 | icon = loadPixmap( pathString + "z_menu" ); |
@@ -719,4 +716,5 @@ void MainWindow::initActions() | |||
719 | menuBar1->setMaximumSize( menuBar1->sizeHint( )); | 716 | menuBar1->setMaximumSize( menuBar1->sizeHint( )); |
720 | } | 717 | } |
718 | connect ( menuBar1, SIGNAL( lostFocus () ), mView, SLOT ( slotResetFocus() ) ); | ||
721 | connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); | 719 | connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); |
722 | connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) ); | 720 | connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) ); |
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index d648f14..e2de3ba 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h | |||
@@ -12,4 +12,5 @@ | |||
12 | #include <libkcal/incidence.h> | 12 | #include <libkcal/incidence.h> |
13 | #include <ksyncmanager.h> | 13 | #include <ksyncmanager.h> |
14 | #include <kpopupmenu.h> | ||
14 | #ifndef DESKTOP_VERSION | 15 | #ifndef DESKTOP_VERSION |
15 | #include <qcopchannel_qws.h> | 16 | #include <qcopchannel_qws.h> |
@@ -21,8 +22,6 @@ class KSyncProfile; | |||
21 | 22 | ||
22 | #define QPEToolBar QToolBar | 23 | #define QPEToolBar QToolBar |
23 | #define QPEMenuBar QMenuBar | ||
24 | #endif | 24 | #endif |
25 | class QPEToolBar; | 25 | class QPEToolBar; |
26 | class QPEMenuBar; | ||
27 | 26 | ||
28 | 27 | ||
@@ -129,5 +128,5 @@ class MainWindow : public QMainWindow | |||
129 | QPEToolBar *navigatorToolBar; | 128 | QPEToolBar *navigatorToolBar; |
130 | QPEToolBar *filterToolBar; | 129 | QPEToolBar *filterToolBar; |
131 | QMenuBar *filterMenubar; | 130 | KMenuBar *filterMenubar; |
132 | QPopupMenu * filterPopupMenu; | 131 | QPopupMenu * filterPopupMenu; |
133 | QPopupMenu * mCurrentItemMenu; | 132 | QPopupMenu * mCurrentItemMenu; |
diff --git a/microkde/kdeui/kbuttonbox.cpp b/microkde/kdeui/kbuttonbox.cpp index 16206e8..83d622a 100644 --- a/microkde/kdeui/kbuttonbox.cpp +++ b/microkde/kdeui/kbuttonbox.cpp | |||
@@ -47,5 +47,5 @@ | |||
47 | 47 | ||
48 | //US #include "kbuttonbox.moc" | 48 | //US #include "kbuttonbox.moc" |
49 | 49 | ||
50 | #include <kbuttonbox.h> | 50 | #include <kbuttonbox.h> |
51 | #include <qpushbutton.h> | 51 | #include <qpushbutton.h> |
diff --git a/microkde/kdeui/kpopupmenu.cpp b/microkde/kdeui/kpopupmenu.cpp new file mode 100644 index 0000000..96d2a87 --- a/dev/null +++ b/microkde/kdeui/kpopupmenu.cpp | |||
@@ -0,0 +1,19 @@ | |||
1 | |||
2 | #include <kpopupmenu.h> | ||
3 | #include <qtimer.h> | ||
4 | |||
5 | |||
6 | KPopupMenu::KPopupMenu ( QWidget * parent, const char * name ) | ||
7 | : QPopupMenu ( parent, name ) {;} | ||
8 | |||
9 | |||
10 | |||
11 | KMenuBar::KMenuBar ( QWidget * parent, const char * name ) | ||
12 | : QPEMenuBar ( parent, name ) {} | ||
13 | |||
14 | void KMenuBar::focusOutEvent ( QFocusEvent * e) | ||
15 | { | ||
16 | QPEMenuBar::focusOutEvent( e ); | ||
17 | QTimer::singleShot( 100, this, SIGNAL ( lostFocus() ) ); | ||
18 | |||
19 | } | ||
diff --git a/microkde/kdeui/kpopupmenu.h b/microkde/kdeui/kpopupmenu.h index 1352429..f16ce77 100644 --- a/microkde/kdeui/kpopupmenu.h +++ b/microkde/kdeui/kpopupmenu.h | |||
@@ -3,11 +3,29 @@ | |||
3 | 3 | ||
4 | #include <qpopupmenu.h> | 4 | #include <qpopupmenu.h> |
5 | #ifdef DESKTOP_VERSION | ||
6 | #include <qmenubar.h> | ||
7 | #define QPEMenuBar QMenubar | ||
8 | #else | ||
9 | #include <qpe/qpemenubar.h> | ||
10 | #endif | ||
5 | 11 | ||
6 | class KPopupMenu : public QPopupMenu | 12 | class KPopupMenu : public QPopupMenu |
7 | { | 13 | { |
14 | Q_OBJECT | ||
8 | public: | 15 | public: |
9 | KPopupMenu ( QWidget * parent=0, const char * name=0 ) | 16 | KPopupMenu ( QWidget * parent=0, const char * name=0 ); |
10 | : QPopupMenu ( parent, name ) {} | 17 | |
18 | }; | ||
11 | 19 | ||
20 | |||
21 | class KMenuBar : public QPEMenuBar | ||
22 | { | ||
23 | Q_OBJECT | ||
24 | public: | ||
25 | KMenuBar ( QWidget * parent=0, const char * name=0 ); | ||
26 | signals: | ||
27 | void lostFocus(); | ||
28 | protected: | ||
29 | void focusOutEvent ( QFocusEvent * e); | ||
12 | }; | 30 | }; |
13 | 31 | ||
diff --git a/microkde/microkde.pro b/microkde/microkde.pro index 44e5f9d..7120bdd 100644 --- a/microkde/microkde.pro +++ b/microkde/microkde.pro | |||
@@ -104,4 +104,5 @@ KDGanttMinimizeSplitter.h \ | |||
104 | kdeui/ktoolbarhandler.h \ | 104 | kdeui/ktoolbarhandler.h \ |
105 | kdeui/kaction.h \ | 105 | kdeui/kaction.h \ |
106 | kdeui/kpopupmenu.h \ | ||
106 | kdeui/kactionclasses.h \ | 107 | kdeui/kactionclasses.h \ |
107 | kdeui/kactioncollection.h \ | 108 | kdeui/kactioncollection.h \ |
@@ -166,4 +167,5 @@ KDGanttMinimizeSplitter.cpp \ | |||
166 | kutils/kcmultidialog.cpp \ | 167 | kutils/kcmultidialog.cpp \ |
167 | kdeui/kaction.cpp \ | 168 | kdeui/kaction.cpp \ |
169 | kdeui/kpopupmenu.cpp \ | ||
168 | kdeui/kactionclasses.cpp \ | 170 | kdeui/kactionclasses.cpp \ |
169 | kdeui/kactioncollection.cpp \ | 171 | kdeui/kactioncollection.cpp \ |
diff --git a/microkde/microkdeE.pro b/microkde/microkdeE.pro index 335fcd0..8fe2bd5 100644 --- a/microkde/microkdeE.pro +++ b/microkde/microkdeE.pro | |||
@@ -57,4 +57,5 @@ KDGanttMinimizeSplitter.h \ | |||
57 | kdeui/kguiitem.h \ | 57 | kdeui/kguiitem.h \ |
58 | kdeui/kaction.h \ | 58 | kdeui/kaction.h \ |
59 | kdeui/kpopupmenu.h \ | ||
59 | kdeui/kactionclasses.h \ | 60 | kdeui/kactionclasses.h \ |
60 | kdeui/kactioncollection.h \ | 61 | kdeui/kactioncollection.h \ |
@@ -140,4 +141,5 @@ KDGanttMinimizeSplitter.cpp fncolordialog.cpp \ | |||
140 | kdecore/kstringhandler.cpp \ | 141 | kdecore/kstringhandler.cpp \ |
141 | kdeui/kaction.cpp \ | 142 | kdeui/kaction.cpp \ |
143 | kdeui/kpopupmenu.cpp \ | ||
142 | kdeui/kactionclasses.cpp \ | 144 | kdeui/kactionclasses.cpp \ |
143 | kdeui/kactioncollection.cpp \ | 145 | kdeui/kactioncollection.cpp \ |