summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-07-10 10:17:55 (UTC)
committer zautrix <zautrix>2005-07-10 10:17:55 (UTC)
commit58b7818a74809dc9280a3249eeb7e0195a66f93d (patch) (side-by-side diff)
tree04b04b867647a8c48d59e7a0fa89df6430039599
parente8b6635ef7c98996f0415e6a77394569493ab151 (diff)
downloadkdepimpi-58b7818a74809dc9280a3249eeb7e0195a66f93d.zip
kdepimpi-58b7818a74809dc9280a3249eeb7e0195a66f93d.tar.gz
kdepimpi-58b7818a74809dc9280a3249eeb7e0195a66f93d.tar.bz2
fixx
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp7
-rw-r--r--korganizer/calendarview.h1
-rw-r--r--korganizer/koagenda.cpp5
-rw-r--r--korganizer/mainwindow.cpp12
-rw-r--r--korganizer/mainwindow.h5
-rw-r--r--microkde/kdeui/kbuttonbox.cpp0
-rw-r--r--microkde/kdeui/kpopupmenu.cpp19
-rw-r--r--microkde/kdeui/kpopupmenu.h22
-rw-r--r--microkde/microkde.pro2
-rw-r--r--microkde/microkdeE.pro2
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
@@ -610,96 +610,103 @@ void CalendarView::init()
mDateFrame = new QVBox(0,0,WType_Popup);
//mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised);
mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised );
mDateFrame->setLineWidth(3);
mDateFrame->hide();
mDateFrame->setCaption( i18n( "Pick a date to display"));
mDatePicker = new KDatePicker ( mDateFrame , QDate::currentDate() );
connect(mDatePicker,SIGNAL(dateSelected(QDate)),SLOT(slotSelectPickerDate(QDate)));
mEventEditor = mDialogManager->getEventEditor();
mTodoEditor = mDialogManager->getTodoEditor();
mFlagEditDescription = false;
mSuspendTimer = new QTimer( this );
mAlarmTimer = new QTimer( this );
mRecheckAlarmTimer = new QTimer( this );
connect( mRecheckAlarmTimer, SIGNAL( timeout () ), SLOT( recheckTimerAlarm() ) );
connect( mSuspendTimer, SIGNAL( timeout () ), SLOT( suspendAlarm() ) );
connect( mAlarmTimer, SIGNAL( timeout () ), SLOT( timerAlarm() ) );
mAlarmDialog = new AlarmDialog( this );
connect( mAlarmDialog, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addSuspendAlarm(const QDateTime &, const QString & ) ) );
mAlarmDialog->setServerNotification( false );
mAlarmDialog->setSuspendTime( KOPrefs::instance()->mAlarmSuspendTime );
#ifndef DESKTOP_VERSION
//US listen for arriving address resultsets
connect(ExternalAppHandler::instance(), SIGNAL(receivedBirthdayListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)),
this, SLOT(insertBirthdays(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)));
#endif
mDateNavigator->setCalendar( mCalendar );
}
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();
//qDebug("time %s ", st.toString().latin1());
QDateTime startDT = QDateTime (mNavigator->selectedDates().first(),st);
QDateTime conflict;
QDateTime retVal;
bool found = false;
Event * cE = 0;
Event * cE2 = 0;
QPtrList<Event> testlist2 = testlist;
test = testlist.first();
bool skip = false;
topLevelWidget()->setCaption( i18n("Checking conflicts ... please wait") );
while ( test ) {
qApp->processEvents();
skip = false;
if ( !all ) skip = ( allday != test->doesFloat() );
if ( !skip ) {
Event * test2 = testlist2.first();
while ( test2 ) {
skip = false;
if ( !all ) skip = ( allday != test2->doesFloat() );
if ( !skip ) {
if ( !test2->isTagged() ) {
if ( test->isOverlapping ( test2, &retVal, &startDT ) ) {
//qDebug("overlap ");
if ( ! found ) {
if ( retVal >= startDT ) {
conflict = retVal;
cE = test;
cE2 = test2;
found = true;
}
} else {
if ( retVal >= startDT && retVal < conflict ) {
conflict = retVal;
cE = test;
cE2 = test2;
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index 799c297..456c2d7 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -156,96 +156,97 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
void closingDown();
/** emitted right before we die */
void closed(QWidget *);
/** Emitted when state of modified flag changes */
void modifiedChanged(bool);
void signalmodified();
/** Emitted when state of read-only flag changes */
void readOnlyChanged(bool);
/** Emitted when the unit of navigation changes */
void changeNavStringPrev(const QString &);
void changeNavStringNext(const QString &);
/** Emitted when state of events selection has changed and user is organizer*/
void organizerEventsSelected(bool);
/** Emitted when state of events selection has changed and user is attendee*/
void groupEventsSelected(bool);
/**
Emitted when an incidence gets selected. If the selection is cleared the
signal is emitted with 0 as argument.
*/
void incidenceSelected( Incidence * );
/** Emitted, when a todoitem is selected or deselected. */
void todoSelected( bool );
/**
Emitted, when clipboard content changes. Parameter indicates if paste
is possible or not.
*/
void pasteEnabled(bool);
/** Emitted, when the number of incoming messages has changed. */
void numIncomingChanged(int);
/** 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();
void checkNextTimerAlarm();
void addAlarm(const QDateTime &qdt, const QString &noti );
void addSuspendAlarm(const QDateTime &qdt, const QString &noti );
void removeAlarm(const QDateTime &qdt, const QString &noti );
/** options dialog made a changed to the configuration. we catch this
* and notify all widgets which need to update their configuration. */
void updateConfig();
void insertBirthdays(const QString& uid, const QStringList& birthdayList,
const QStringList& anniversaryList, const QStringList& realNameList,
const QStringList& emailList, const QStringList& assembledNameList,
const QStringList& uidList);
/**
Load calendar from file \a filename. If \a merge is true, load
calendar into existing one, if it is false, clear calendar, before
loading. Return true, if calendar could be successfully loaded.
*/
bool openCalendar(QString filename, bool merge=false);
bool loadCalendars();
bool saveCalendars();
bool restoreCalendarSettings();
bool addCalendar( KopiCalendarFile * );
void addCalendarId( int id );
bool syncCalendar(QString filename,int mode = 0 );
/**
Save calendar data to file. Return true if calendar could be
successfully saved.
*/
bool saveCalendar(QString filename);
/**
Close calendar. Clear calendar data and reset views to display an empty
calendar.
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index 779f12e..0dd5ef5 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -1590,97 +1590,100 @@ void KOAgenda::gridToContents (int gx, int gy, int& x, int& y)
{
x = KOGlobals::self()->reverseLayout() ? (mColumns - 1 - gx)*mGridSpacingX:
gx*mGridSpacingX;
y = gy*mGridSpacingY;
}
/*
Return Y coordinate corresponding to time. Coordinates are rounded to fit into
the grid.
*/
int KOAgenda::timeToY(const QTime &time)
{
int minutesPerCell = 24 * 60 / mRows;
int timeMinutes = time.hour() * 60 + time.minute();
int Y = (timeMinutes + (minutesPerCell / 2)) / minutesPerCell;
return Y;
}
/*
Return time corresponding to cell y coordinate. Coordinates are rounded to
fit into the grid.
*/
QTime KOAgenda::gyToTime(int gy)
{
int secondsPerCell = 24 * 60 * 60/ mRows;
int timeSeconds = secondsPerCell * gy;
QTime time( 0, 0, 0 );
if ( timeSeconds < 24 * 60 * 60 ) {
time = time.addSecs(timeSeconds);
} else {
time.setHMS( 23, 59, 59 );
}
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();
}
}
KOAgendaItem *KOAgenda::getNewItem(Incidence * event,QDate qd, QWidget* view)
{
KOAgendaItem *fi;
for ( fi=mUnusedItems.first(); fi != 0; fi=mUnusedItems.next() ) {
if ( fi->incidence() == event ) {
mUnusedItems.remove();
fi->init( event, qd );
return fi;
}
}
fi=mUnusedItems.first();
if ( fi ) {
mUnusedItems.remove();
fi->init( event, qd );
return fi;
}
// qDebug("new KOAgendaItem ");
KOAgendaItem* agendaItem = new KOAgendaItem( event, qd, view, mAllDayMode );
agendaItem->installEventFilter(this);
addChild(agendaItem,0,0);
return agendaItem;
}
KOAgendaItem * KOAgenda::getItemForTodo ( Todo * todo )
{
KOAgendaItem *item;
for ( item=mItems.first(); item != 0; item=mItems.next() ) {
if ( item->incidence() == todo ) {
mItems.remove();
return item;
}
}
return 0;
}
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 4bedb61..21d5a35 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1,80 +1,78 @@
#include <stdlib.h>
#include <qaction.h>
#include <qpopupmenu.h>
#include <qpainter.h>
#include <qwhatsthis.h>
#include <qpushbutton.h>
#include <qmessagebox.h>
#include <qlineedit.h>
#include <qtextcodec.h>
#include <qfile.h>
#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>
#include "calendarview.h"
#include "koviewmanager.h"
#include "datenavigator.h"
#include "koagendaview.h"
#include "kojournalview.h"
#include "koagenda.h"
#include "kodialogmanager.h"
#include "kdialogbase.h"
#include "kapplication.h"
#include "kofilterview.h"
#include "kstandarddirs.h"
#include "koprefs.h"
#include "kfiledialog.h"
#include "koglobals.h"
#include "kglobal.h"
#include "ktoolbar.h"
#include "klocale.h"
#include "kconfig.h"
#include "externalapphandler.h"
#include <kglobalsettings.h>
using namespace KCal;
#ifndef _WIN32_
#include <unistd.h>
#else
#ifdef _OL_IMPORT_
#include "koimportoldialog.h"
#endif
#endif
#include "mainwindow.h"
class KOex2phonePrefs : public QDialog
{
public:
@@ -180,97 +178,97 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
setIcon(SmallIcon( "ko24" ) );
mBlockAtStartup = true;
mFlagKeyPressed = false;
setCaption("KO/Pi");
KOPrefs *p = KOPrefs::instance();
//KPimGlobalPrefs::instance()->setGlobalConfig();
p->mCurrentDisplayedView = 0;
if ( p->mHourSize > 22 )
p->mHourSize = 22;
QMainWindow::ToolBarDock tbd;
if ( p->mToolBarHor ) {
if ( p->mToolBarUp )
tbd = Bottom;
else
tbd = Top;
}
else {
if ( p->mToolBarUp )
tbd = Right;
else
tbd = Left;
}
if ( KOPrefs::instance()->mUseAppColors )
QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true );
globalFlagBlockStartup = 1;
iconToolBar = new QPEToolBar( this );
addToolBar (iconToolBar , tbd );
#ifdef DESKTOP_VERSION
if ( KOPrefs::instance()->mShowIconFilter )
#else
if ( KOPrefs::instance()->mShowIconFilter || !p->mShowIconOnetoolbar )
#endif
{
if ( p->mToolBarHorF ) {
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 ) );
addToolBar (filterToolBar , tbd );
connect ( filterPopupMenu , SIGNAL( activated ( int ) ), this, SLOT (selectFilterPopup( int ) ) );
connect ( filterPopupMenu , SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenuPopup() ) );
if ( !KOPrefs::instance()->mShowIconFilter && !p->mShowIconOnetoolbar )
filterToolBar->hide();
} else {
filterToolBar = 0;
filterMenubar = 0;
filterPopupMenu = 0;
}
if ( p->mShowIconOnetoolbar ) {
viewToolBar = iconToolBar ;
navigatorToolBar = iconToolBar ;
} else {
#ifndef DESKTOP_VERSION
setToolBarsMovable( false );
#endif
if ( p->mToolBarHorV ) {
if ( p->mToolBarUpV )
tbd = Bottom;
else
tbd = Top;
}
else {
if ( p->mToolBarUpV )
tbd = Right;
else
tbd = Left;
}
viewToolBar = new QPEToolBar( this );
addToolBar (viewToolBar , tbd );
if ( p->mToolBarHorN ) {
if ( p->mToolBarUpN )
tbd = Bottom;
else
tbd = Top;
@@ -637,132 +635,132 @@ void MainWindow::startMultiSync()
#ifndef DESKTOP_VERSION
QCopEnvelope e("QPE/Application/kapi", "doRingSync");
#endif
}
QPixmap MainWindow::loadPixmap( QString name )
{
return SmallIcon( name );
}
void MainWindow::setUsesBigPixmaps ( bool b )
{
qDebug("KO: MainWindow::setUsesBigPixmaps %d called", b);
if ( b )
qDebug("KO: BigPixmaps are not supported ");
}
void MainWindow::initActions()
{
//KOPrefs::instance()->mShowFullMenu
iconToolBar->clear();
KOPrefs *p = KOPrefs::instance();
//QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar );
QPopupMenu *viewMenu = new QPopupMenu( this );
QPopupMenu *actionMenu = new QPopupMenu( this );
mCurrentItemMenu = new QPopupMenu ( this );
QPopupMenu *nextConflictMenu = new QPopupMenu ( this );
QPopupMenu *importMenu = new QPopupMenu( this );
QPopupMenu *importMenu_X = new QPopupMenu( this );
QPopupMenu *exportMenu_X = new QPopupMenu( this );
QPopupMenu *beamMenu_X = new QPopupMenu( this );
selectFilterMenu = new QPopupMenu( this );
selectFilterMenu->setCheckable( true );
syncMenu = new QPopupMenu( this );
configureAgendaMenu = new QPopupMenu( this );
configureToolBarMenu = new QPopupMenu( this );
QPopupMenu *helpMenu = new QPopupMenu( this );
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();
int fontPoint = mWeekFont.pointSize();
QFontMetrics f( mWeekFont );
int fontWid = f.width( "30" );
while ( fontWid > pixWid ) {
--fontPoint;
mWeekFont.setPointSize( fontPoint );
QFontMetrics f( mWeekFont );
fontWid = f.width( "30" );
//qDebug("dec-- ");
}
connect( mWeekAction, SIGNAL( activated() ),
this, SLOT( weekAction() ) );
connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) );
if ( p->mShowIconFilterview ) {
icon = loadPixmap( pathString + "filter" );
actionFilterMenuTB = new QAction( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this );
connect( actionFilterMenuTB, SIGNAL( activated() ),
this, SLOT( fillFilterMenuTB() ) );
actionFilterMenuTB->addTo( iconToolBar );
selectFilterMenuTB = new QPopupMenu( this );
selectFilterMenuTB->setCheckable( true );
connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) );
}
//#endif
// ******************
QAction *action;
// QPopupMenu *configureMenu= new QPopupMenu( menuBar );
configureToolBarMenu->setCheckable( true );
configureAgendaMenu->setCheckable( true );
int iii ;
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h
index d648f14..e2de3ba 100644
--- a/korganizer/mainwindow.h
+++ b/korganizer/mainwindow.h
@@ -1,74 +1,73 @@
#ifndef KORGE_MAINWINDOW_H
#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:
MainWindow( QWidget *parent = 0, const char *name = 0 );
~MainWindow();
bool beamReceiveEnabled();
static QString defaultFileName();
static QString syncFileName();
static QString resourcePath();
public slots:
void setUsesBigPixmaps ( bool );
void setCaption ( const QString & );
void updateWeekNum(const KCal::DateList &);
void updateWeek(QDate);
void updateFilterToolbar();
virtual void showMaximized ();
void configureAgenda( int );
void recieve( const QCString& msg, const QByteArray& data );
protected slots:
void calHint();
void startMultiSync();
void setCaptionToDates();
void weekAction();
void about();
void licence();
void faq();
void usertrans();
void features();
void synchowto();
void storagehowto();
void timetrackinghowto();
void kdesynchowto();
void multisynchowto();
void whatsNew();
void keyBindings();
void aboutAutoSaving();;
void aboutKnownBugs();
void processIncidenceSelection( Incidence * );
@@ -83,92 +82,92 @@ class MainWindow : public QMainWindow
void slotModifiedChanged( bool );
void save();
void backupAllFiles();
void saveStopTimer();
void configureToolBar( int );
void printSel();
void printCal();
void printListView();
void saveCalendar();
void loadCalendar();
void exportVCalendar();
void fillFilterMenu();
void fillFilterMenuTB();
void selectFilter( int );
void fillFilterMenuPopup();
void selectFilterPopup( int );
void exportToPhone( int );
void toggleBeamReceive();
void disableBR(bool);
signals:
void selectWeek ( int );
private slots:
void showConfigureAgenda();
void getFile( bool );
void syncFileRequest();
protected:
void hideEvent ( QHideEvent * );
QString sentSyncFile();
void displayText( QString, QString);
void enableIncidenceActions( bool );
private:
bool mBRdisabled;
#ifndef DESKTOP_VERSION
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;
CalendarView *mView;
QAction *mNewSubTodoAction;
QAction *mWeekAction;
QFont mWeekFont;
QPixmap mWeekPixmap;
QColor mWeekBgColor;
QAction *mShowAction;
QAction *mEditAction;
QAction *mDeleteAction;
QAction *mCloneAction;
QAction *mMoveAction;
QAction *mBeamAction;
QAction *mCancelAction;
QAction *mPrintSelAction;
QAction *mToggleNav;
QAction *mToggleFilter;
QAction *mToggleAllday;
QAction *actionFilterMenuTB;
void closeEvent( QCloseEvent* ce );
QTimer mSaveTimer;
//bool mBlockSaveFlag;
bool mCalendarModifiedFlag;
QPixmap loadPixmap( QString );
QPixmap listviewPix, listviewPix0, listviewPix20, listviewPix40, listviewPix60, listviewPix80, journalPix;
};
#endif
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
@@ -58,121 +58,123 @@ KDGanttMinimizeSplitter.h \
krun.h \
ksimpleconfig.h \
kstaticdeleter.h \
ksystemtray.h \
ktempfile.h \
ktextedit.h \
kunload.h \
kurl.h \
kdeui/kguiitem.h \
kdeui/kcmodule.h \
kdeui/kbuttonbox.h \
kdeui/klistbox.h \
kdeui/klistview.h \
kdeui/kjanuswidget.h \
kdeui/kseparator.h \
kdeui/knuminput.h \
kdeui/knumvalidator.h \
kdeui/ksqueezedtextlabel.h \
kio/job.h \
kio/kio/kdirwatch.h \
kio/kio/kdirwatch_p.h \
kio/kfile/kurlrequester.h \
kresources/resource.h \
kresources/factory.h \
kresources/managerimpl.h \
kresources/manager.h \
kresources/selectdialog.h \
kresources/configpage.h \
kresources/configwidget.h \
kresources/configdialog.h \
kresources/kcmkresources.h \
kdecore/kmdcodec.h \
kdecore/kconfigbase.h \
kdecore/klocale.h \
kdecore/kcatalogue.h \
kdecore/ksharedptr.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 \
kapplication.cpp \
kcalendarsystem.cpp \
kcalendarsystemgregorian.cpp \
kcolorbutton.cpp \
kconfig.cpp \
kdatetbl.cpp \
kdialog.cpp \
kdialogbase.cpp \
keditlistbox.cpp \
kemailsettings.cpp \
kfontdialog.cpp \
kfiledialog.cpp \
kglobal.cpp \
kglobalsettings.cpp \
kiconloader.cpp \
kmessagebox.cpp \
ktextedit.cpp \
kprocess.cpp \
krun.cpp \
ksystemtray.cpp \
ktempfile.cpp \
kurl.cpp \
kdecore/kcatalogue.cpp \
kdecore/klocale.cpp \
kdecore/kmdcodec.cpp \
kdecore/kshell.cpp \
kdecore/kstandarddirs.cpp \
kdecore/kstringhandler.cpp \
kdeui/kbuttonbox.cpp \
kdeui/kcmodule.cpp \
kdeui/kguiitem.cpp \
kdeui/kjanuswidget.cpp \
kdeui/klistbox.cpp \
kdeui/klistview.cpp \
kdeui/knuminput.cpp \
kdeui/knumvalidator.cpp \
kdeui/kseparator.cpp \
kdeui/ksqueezedtextlabel.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
@@ -11,162 +11,164 @@ TARGET = microkde
OBJECTS_DIR = obj/$(PLATFORM)
MOC_DIR = moc/$(PLATFORM)
DESTDIR=$(QPEDIR)/lib
INTERFACES = \
HEADERS = \
qlayoutengine_p.h fncolordialog.h\
KDGanttMinimizeSplitter.h \
kapplication.h \
kaudioplayer.h \
kcalendarsystem.h \
kcalendarsystemgregorian.h \
kcolorbutton.h \
kcolordialog.h \
kcombobox.h \
kconfig.h \
kdatetbl.h \
kdebug.h \
kdialog.h \
kdialogbase.h \
keditlistbox.h \
kemailsettings.h \
kfiledialog.h \
kfontdialog.h \
kglobal.h \
kglobalsettings.h \
kiconloader.h \
klineedit.h \
klineeditdlg.h \
kmessagebox.h \
knotifyclient.h \
kprinter.h \
kprocess.h \
krestrictedline.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 \
kdeui/ksqueezedtextlabel.h \
kdeui/ktoolbar.h \
kdeui/ktoolbarbutton.h \
kdeui/ktoolbarhandler.h \
kdeui/kxmlguiclient.h \
kio/job.h \
kio/kio/kdirwatch.h \
kio/kio/kdirwatch_p.h \
kio/kfile/kurlrequester.h \
kresources/resource.h \
kresources/factory.h \
kresources/managerimpl.h \
kresources/manager.h \
kresources/selectdialog.h \
kresources/configpage.h \
kresources/configwidget.h \
kresources/configdialog.h \
kresources/kcmkresources.h \
kdecore/kmdcodec.h \
kdecore/kconfigbase.h \
kdecore/klocale.h \
kdecore/klibloader.h \
kdecore/kcatalogue.h \
kdecore/kprefs.h \
kdecore/ksharedptr.h \
kdecore/kshell.h \
kdecore/kstandarddirs.h \
kdecore/kstringhandler.h \
kdecore/kshortcut.h \
kutils/kcmultidialog.h \
kidmanager.h
SOURCES = \
KDGanttMinimizeSplitter.cpp fncolordialog.cpp \
kapplication.cpp \
kcalendarsystem.cpp \
kcalendarsystemgregorian.cpp \
kcolorbutton.cpp \
kcolordialog.cpp \
kconfig.cpp \
kdatetbl.cpp \
kdialog.cpp \
kdialogbase.cpp \
keditlistbox.cpp \
kemailsettings.cpp \
kfontdialog.cpp \
kfiledialog.cpp \
kglobal.cpp \
kglobalsettings.cpp \
kiconloader.cpp \
kmessagebox.cpp \
kprocess.cpp \
krun.cpp \
ksystemtray.cpp \
ktempfile.cpp \
kurl.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 \
kdeui/kstdaction.cpp \
kdeui/ksqueezedtextlabel.cpp \
kdeui/ktoolbar.cpp \
kdeui/ktoolbarbutton.cpp \
kdeui/ktoolbarhandler.cpp \
kdeui/kxmlguiclient.cpp \
kio/kfile/kurlrequester.cpp \
kio/kio/kdirwatch.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 \
kidmanager.cpp