author | zautrix <zautrix> | 2005-07-10 10:17:55 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-10 10:17:55 (UTC) |
commit | 58b7818a74809dc9280a3249eeb7e0195a66f93d (patch) (side-by-side diff) | |
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 | 1 | ||||
-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 | 0 | ||||
-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, 62 insertions, 13 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 5a2482e..17f1659 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -646,24 +646,31 @@ void CalendarView::init() CalendarView::~CalendarView() { // kdDebug() << "~CalendarView()" << endl; //qDebug("CalendarView::~CalendarView() "); delete mDialogManager; delete mViewManager; delete mStorage; delete mDateFrame ; delete mEventViewerDialog; //kdDebug() << "~CalendarView() done" << endl; } + +void CalendarView::slotResetFocus() +{ + qDebug(" CalendarView::slotResetFocus() %x", qApp->focusWidget()); + +} + void CalendarView::nextConflict( bool all, bool allday ) { QPtrList<Event> testlist = mCalendar->events(); Event * test = testlist.first(); while ( test ) { test->setTagged( false ); test = testlist.next(); } QTime st ( 0,0,0); if ( mViewManager->currentView() == mViewManager->agendaView() ) st = mViewManager->agendaView()->agenda()->getEndTime(); diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index 799c297..456c2d7 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h @@ -192,24 +192,25 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser /** Emitted, when the number of outgoing messages has changed. */ void numOutgoingChanged(int); /** Send status message, which can e.g. be displayed in the status bar. */ void statusMessage(const QString &); void calendarViewExpanded( bool ); void updateSearchDialog(); void filtersUpdated(); public slots: + void slotResetFocus(); void nextConflict( bool all, bool allday ); void conflictAll(); void conflictAllday(); void conflictNotAll(); void setCalReadOnly( int id, bool readO ); void checkAlarms(); void checkFiles(); void slotprintSelInc(); void showNextAlarms(); void showOpenError(); void watchSavedFile(); void recheckTimerAlarm(); diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index 779f12e..0dd5ef5 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp @@ -1626,25 +1626,28 @@ QTime KOAgenda::gyToTime(int gy) } return time; } void KOAgenda::setStartHour(int startHour) { int startCell = startHour * mRows / 24; setContentsPos(0,startCell * gridSpacingY()); } QTime KOAgenda::getEndTime() { - return QTime ( (contentsY ()+viewport()->height())*24/contentsHeight ()+1,0,0); + int tim = (contentsY ()+viewport()->height())*24/contentsHeight (); + if ( tim > 23 ) + return QTime ( 23,59,59); + return QTime ( tim,0,0); } void KOAgenda::hideUnused() { // experimental only // return; KOAgendaItem *item; for ( item=mUnusedItems.first(); item != 0; item=mUnusedItems.next() ) { item->hide(); } } diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 4bedb61..21d5a35 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -12,33 +12,31 @@ #include <qdir.h> #include <qapp.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> #ifndef DESKTOP_VERSION #include <qpe/global.h> -#include <qpe/qpemenubar.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 <qmenubar.h> #include <qtoolbar.h> #include <qapplication.h> //#include <resource.h> #endif #include <libkcal/calendarlocal.h> #include <libkcal/todo.h> #include <libkcal/phoneformat.h> #include <libkdepim/ksyncprofile.h> #include <libkdepim/phoneaccess.h> #include <libkcal/kincidenceformatter.h> #include <libkdepim/kpimglobalprefs.h> @@ -216,25 +214,25 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : if ( p->mToolBarUpF ) tbd = Bottom; else tbd = Top; } else { if ( p->mToolBarUpF ) tbd = Right; else tbd = Left; } filterToolBar = new QPEToolBar ( this ); - filterMenubar = new QMenuBar( 0 ); + filterMenubar = new KMenuBar( 0 ); QFontMetrics fm ( filterMenubar->font() ); filterPopupMenu = new QPopupMenu( this ); filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 ); QString addTest = "A"; filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) ); #ifdef DESKTOP_VERSION addTest = "AAABBBCCCx"; #else addTest = "AAx"; #endif filterMenubar->setMaximumWidth( fm.width( i18n("No Filter")+addTest ) ); @@ -673,60 +671,60 @@ void MainWindow::initActions() QIconSet 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; } } else { pathString += "iconsmini/"; pixWid = 18; pixHei = 16; } + KMenuBar *menuBar1; if ( KOPrefs::instance()->mShowFullMenu ) { - QMenuBar *menuBar1; - menuBar1 = menuBar(); + menuBar1 = new KMenuBar( this );//menuBar(); menuBar1->insertItem( i18n("File"), importMenu ); menuBar1->insertItem( i18n("View"), viewMenu ); menuBar1->insertItem( i18n("Edit"), mCurrentItemMenu ); menuBar1->insertItem( i18n("Action"), actionMenu ); #ifdef DESKTOP_VERSION menuBar1->insertItem( i18n("Synchronize"), syncMenu ); menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu ); #else menuBar1->insertItem( i18n("Sync"), syncMenu ); menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu ); #endif //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu ); menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); menuBar1->insertItem( i18n("Help"), helpMenu ); } else { - QPEMenuBar *menuBar1; - menuBar1 = new QPEMenuBar( iconToolBar ); + menuBar1 = new KMenuBar( iconToolBar ); QPopupMenu *menuBar = new QPopupMenu( 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 ); menuBar->insertItem( i18n("Action"), actionMenu ); menuBar->insertItem( i18n("Synchronize"), syncMenu ); menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); menuBar->insertItem( i18n("Filter"),selectFilterMenu ); menuBar->insertItem( i18n("Help"), helpMenu ); //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); menuBar1->setMaximumSize( menuBar1->sizeHint( )); } + connect ( menuBar1, SIGNAL( lostFocus () ), mView, SLOT ( slotResetFocus() ) ); connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) ); 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 ); if ( p-> mShowIconWeekNum ) mWeekAction->addTo( iconToolBar ); mWeekFont = font(); diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index d648f14..e2de3ba 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h @@ -2,37 +2,36 @@ #define KORGE_MAINWINDOW_H #include <qmainwindow.h> #include <qtimer.h> #include <qdict.h> #include <qfile.h> #include <qmenubar.h> #include <qtextstream.h> #include <qregexp.h> #include <libkcal/incidence.h> #include <ksyncmanager.h> +#include <kpopupmenu.h> #ifndef DESKTOP_VERSION #include <qcopchannel_qws.h> #endif class QAction; class CalendarView; class KSyncProfile; #ifdef DESKTOP_VERSION #define QPEToolBar QToolBar -#define QPEMenuBar QMenuBar #endif class QPEToolBar; -class QPEMenuBar; namespace KCal { class CalendarLocal; } using namespace KCal; class MainWindow : public QMainWindow { Q_OBJECT public: @@ -119,25 +118,25 @@ class MainWindow : public QMainWindow QCopChannel* infrared; #endif QAction* brAction; KSyncManager* mSyncManager; bool mClosed; void saveOnClose(); bool mFlagKeyPressed; bool mBlockAtStartup; QPEToolBar *iconToolBar; QPEToolBar *viewToolBar; QPEToolBar *navigatorToolBar; QPEToolBar *filterToolBar; - QMenuBar *filterMenubar; + KMenuBar *filterMenubar; QPopupMenu * filterPopupMenu; QPopupMenu * mCurrentItemMenu; void initActions(); void setDefaultPreferences(); void resizeEvent( QResizeEvent* e); void keyPressEvent ( QKeyEvent * ) ; void keyReleaseEvent ( QKeyEvent * ) ; QPopupMenu *configureToolBarMenu; QPopupMenu *selectFilterMenu; QPopupMenu *selectFilterMenuTB; QPopupMenu *configureAgendaMenu, *syncMenu; CalendarLocal *mCalendar; 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 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 @@ + +#include <kpopupmenu.h> +#include <qtimer.h> + + +KPopupMenu::KPopupMenu ( QWidget * parent, const char * name ) + : QPopupMenu ( parent, name ) {;} + + + +KMenuBar::KMenuBar ( QWidget * parent, const char * name ) + : QPEMenuBar ( parent, name ) {} + +void KMenuBar::focusOutEvent ( QFocusEvent * e) +{ + QPEMenuBar::focusOutEvent( e ); + QTimer::singleShot( 100, this, SIGNAL ( lostFocus() ) ); + +} 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 @@ -1,14 +1,32 @@ #ifndef KPOPUPMENU_H #define KPOPUPMENU_H #include <qpopupmenu.h> +#ifdef DESKTOP_VERSION +#include <qmenubar.h> +#define QPEMenuBar QMenubar +#else +#include <qpe/qpemenubar.h> +#endif class KPopupMenu : public QPopupMenu { +Q_OBJECT public: - KPopupMenu ( QWidget * parent=0, const char * name=0 ) - : QPopupMenu ( parent, name ) {} + KPopupMenu ( QWidget * parent=0, const char * name=0 ); + +}; + +class KMenuBar : public QPEMenuBar +{ +Q_OBJECT + public: + KMenuBar ( QWidget * parent=0, const char * name=0 ); + signals: + void lostFocus(); + protected: + void focusOutEvent ( QFocusEvent * e); }; #endif diff --git a/microkde/microkde.pro b/microkde/microkde.pro index 44e5f9d..7120bdd 100644 --- a/microkde/microkde.pro +++ b/microkde/microkde.pro @@ -94,24 +94,25 @@ KDGanttMinimizeSplitter.h \ kdecore/kshell.h \ kdecore/kstandarddirs.h \ kdecore/kstringhandler.h \ kdecore/kshortcut.h \ kutils/kcmultidialog.h \ kdeui/kxmlguiclient.h \ kdeui/kstdaction.h \ kdeui/kmainwindow.h \ kdeui/ktoolbar.h \ kdeui/ktoolbarbutton.h \ kdeui/ktoolbarhandler.h \ kdeui/kaction.h \ + kdeui/kpopupmenu.h \ kdeui/kactionclasses.h \ kdeui/kactioncollection.h \ kdecore/kprefs.h \ kdecore/klibloader.h \ kidmanager.h # kdecore/klibloader.h \ SOURCES = \ KDGanttMinimizeSplitter.cpp \ @@ -156,23 +157,24 @@ KDGanttMinimizeSplitter.cpp \ kio/kio/kdirwatch.cpp \ kio/kfile/kurlrequester.cpp \ kresources/configpage.cpp \ kresources/configdialog.cpp \ kresources/configwidget.cpp \ kresources/factory.cpp \ kresources/kcmkresources.cpp \ kresources/managerimpl.cpp \ kresources/resource.cpp \ kresources/selectdialog.cpp \ kutils/kcmultidialog.cpp \ kdeui/kaction.cpp \ + kdeui/kpopupmenu.cpp \ kdeui/kactionclasses.cpp \ kdeui/kactioncollection.cpp \ kdeui/kmainwindow.cpp \ kdeui/ktoolbar.cpp \ kdeui/ktoolbarbutton.cpp \ kdeui/ktoolbarhandler.cpp \ kdeui/kstdaction.cpp \ kdeui/kxmlguiclient.cpp \ kdecore/kprefs.cpp \ kdecore/klibloader.cpp \ kidmanager.cpp diff --git a/microkde/microkdeE.pro b/microkde/microkdeE.pro index 335fcd0..8fe2bd5 100644 --- a/microkde/microkdeE.pro +++ b/microkde/microkdeE.pro @@ -47,24 +47,25 @@ KDGanttMinimizeSplitter.h \ krun.h \ ksimpleconfig.h \ kstaticdeleter.h \ ksystemtray.h \ ktempfile.h \ ktextedit.h \ kunload.h \ kurl.h \ ofileselector_p.h \ ofontselector.h \ kdeui/kguiitem.h \ kdeui/kaction.h \ + kdeui/kpopupmenu.h \ kdeui/kactionclasses.h \ kdeui/kactioncollection.h \ kdeui/kcmodule.h \ kdeui/kstdaction.h \ kdeui/kbuttonbox.h \ kdeui/klistbox.h \ kdeui/klistview.h \ kdeui/kjanuswidget.h \ kdeui/kseparator.h \ kdeui/kmainwindow.h \ kdeui/knuminput.h \ kdeui/knumvalidator.h \ @@ -130,24 +131,25 @@ KDGanttMinimizeSplitter.cpp fncolordialog.cpp \ ktextedit.cpp \ ofileselector_p.cpp \ ofontselector.cpp \ kdecore/kcatalogue.cpp \ kdecore/klibloader.cpp \ kdecore/klocale.cpp \ kdecore/kmdcodec.cpp \ kdecore/kprefs.cpp \ kdecore/kshell.cpp \ kdecore/kstandarddirs.cpp \ kdecore/kstringhandler.cpp \ kdeui/kaction.cpp \ + kdeui/kpopupmenu.cpp \ kdeui/kactionclasses.cpp \ kdeui/kactioncollection.cpp \ kdeui/kbuttonbox.cpp \ kdeui/kcmodule.cpp \ kdeui/kguiitem.cpp \ kdeui/kjanuswidget.cpp \ kdeui/klistbox.cpp \ kdeui/klistview.cpp \ kdeui/kmainwindow.cpp \ kdeui/knuminput.cpp \ kdeui/knumvalidator.cpp \ kdeui/kseparator.cpp \ |