author | waspe <waspe> | 2003-11-03 18:28:50 (UTC) |
---|---|---|
committer | waspe <waspe> | 2003-11-03 18:28:50 (UTC) |
commit | 87a9d6badcf518ffd14559ef886ff7729b63b73b (patch) (side-by-side diff) | |
tree | 05af57bcebb8a124c2561336e4ff3dfdd52aeccb | |
parent | 9ce566fd5b280622670cf7b0e158f9d9c54e6e9a (diff) | |
download | opie-87a9d6badcf518ffd14559ef886ff7729b63b73b.zip opie-87a9d6badcf518ffd14559ef886ff7729b63b73b.tar.gz opie-87a9d6badcf518ffd14559ef886ff7729b63b73b.tar.bz2 |
resolved merge conflict
-rw-r--r-- | core/pim/datebook/datebook.cpp | 24 | ||||
-rw-r--r-- | core/pim/datebook/datebookweekheaderimpl.cpp | 11 | ||||
-rw-r--r-- | core/pim/datebook/datebookweeklst.cpp | 43 | ||||
-rw-r--r-- | core/pim/datebook/datebookweeklst.h | 1 | ||||
-rw-r--r-- | core/pim/osearch/datebooksearch.cpp | 2 | ||||
-rw-r--r-- | core/pim/osearch/mainwindow.cpp | 10 | ||||
-rw-r--r-- | core/pim/osearch/mainwindow.h | 14 | ||||
-rw-r--r-- | core/pim/today/plugins/addressbook/addresspluginconfig.cpp | 10 | ||||
-rw-r--r-- | core/pim/today/plugins/addressbook/addresspluginwidget.cpp | 12 | ||||
-rw-r--r-- | core/pim/today/plugins/datebook/datebookpluginconfig.h | 12 | ||||
-rw-r--r-- | core/pim/today/plugins/todolist/todopluginconfig.h | 9 | ||||
-rw-r--r-- | core/settings/security/security.cpp | 27 | ||||
-rw-r--r-- | noncore/apps/confedit/main.cpp | 15 | ||||
-rw-r--r-- | noncore/games/tictac/main.cpp | 24 |
14 files changed, 118 insertions, 96 deletions
diff --git a/core/pim/datebook/datebook.cpp b/core/pim/datebook/datebook.cpp index 10a9b59..07d7164 100644 --- a/core/pim/datebook/datebook.cpp +++ b/core/pim/datebook/datebook.cpp @@ -193,4 +193,6 @@ DateBook::DateBook( QWidget *parent, const char *, WFlags f ) qDebug("done t=%d", t.elapsed() ); + connect( qApp, SIGNAL( flush() ), this, SLOT( flush() ) ); + connect( qApp, SIGNAL( reload()), this, SLOT( reload() ) ); /* * Here is a problem description: @@ -403,4 +405,6 @@ void DateBook::insertEvent( const Event &e ) { Event dupEvent=e; + if(!dupEvent.isValidUid() ) // tkcRom seems to be different + dupEvent.assignUid(); dupEvent.setLocation(defaultLocation); dupEvent.setCategories(defaultCategories); @@ -444,13 +448,15 @@ void DateBook::duplicateEvent( const Event &e ) continue; } - /* - * The problem: - * DateBookDB does remove repeating events not by uid but by the time - * the recurrence was created - * so we need to update that time as well - */ - Event::RepeatPattern rp = newEv.repeatPattern(); - rp.createTime = ::time( NULL ); - newEv.setRepeat( TRUE, rp ); // has repeat and repeatPattern... + /* + * The problem: + * DateBookDB does remove repeating events not by uid but by the time + * the recurrence was created + * so we need to update that time as well + */ + Event::RepeatPattern rp = newEv.repeatPattern(); + rp.createTime = ::time( NULL ); + newEv.setRepeat( TRUE, rp ); // has repeat and repeatPattern... + if( newEv.uid() == e.uid() || !newEv.isValidUid() ) + newEv.assignUid(); db->addEvent(newEv); diff --git a/core/pim/datebook/datebookweekheaderimpl.cpp b/core/pim/datebook/datebookweekheaderimpl.cpp index 770410e..84b4f1b 100644 --- a/core/pim/datebook/datebookweekheaderimpl.cpp +++ b/core/pim/datebook/datebookweekheaderimpl.cpp @@ -99,10 +99,10 @@ void DateBookWeekHeader::setDate(const QDate &d) { date=d; dayofweek=d.dayOfWeek(); - if(bStartOnMonday) + if(bStartOnMonday) dayofweek--; else if( dayofweek == 7 ) - /* we already have the right day -7 would lead to the current week..*/ + // we already have the right day -7 would lead to the current week.. dayofweek = 0; - + date=date.addDays(-dayofweek); calcWeek(date,week,year,bStartOnMonday); @@ -110,8 +110,9 @@ void DateBookWeekHeader::setDate(const QDate &d) { QDate stop=start.addDays(6); labelDate->setText( QString::number(start.day()) + "." + - start.monthName(start.month()) + "-" + + Calendar::nameOfMonth( start.month()) + "-" + QString::number(stop.day()) + "." + - start.monthName(stop.month()) +" ("+ + Calendar::nameOfMonth( stop.month()) +" ("+ tr("w")+":"+QString::number( week ) +")"); + date = d; // bugfix: 0001126 - date has to be the selected date, not monday! emit dateChanged(date); } diff --git a/core/pim/datebook/datebookweeklst.cpp b/core/pim/datebook/datebookweeklst.cpp index aad1f3a..24fb0ba 100644 --- a/core/pim/datebook/datebookweeklst.cpp +++ b/core/pim/datebook/datebookweeklst.cpp @@ -1,29 +1,14 @@ #include "datebookweeklst.h" -#include "datebookweekheaderimpl.h" #include "datebook.h" -#include <qpe/calendar.h> -#include <qpe/datebookdb.h> -#include <qpe/event.h> -#include <qpe/qpeapplication.h> -#include <qpe/timestring.h> #include <qpe/datebookmonth.h> #include <qpe/config.h> #include <qpe/resource.h> +#include <qpe/calendar.h> -#include <qdatetime.h> -#include <qheader.h> -#include <qlabel.h> #include <qlayout.h> -#include <qpainter.h> -#include <qpopupmenu.h> -#include <qtimer.h> -#include <qstyle.h> #include <qtoolbutton.h> -#include <qvbox.h> -#include <qsizepolicy.h> -#include <qabstractlayout.h> #include <qtl.h> @@ -74,8 +59,9 @@ void DateBookWeekLstHeader::setDate(const QDate &d) { QDate stop=start.addDays(6); labelDate->setText( QString::number(start.day()) + "." + - start.monthName(start.month()) + "-" + + Calendar::nameOfMonth( start.month() ) + "-" + QString::number(stop.day()) + "." + - start.monthName(stop.month()) +" ("+ + Calendar::nameOfMonth( stop.month()) +" ("+ tr("w")+":"+QString::number( week ) +")"); + date = d; // bugfix: 0001126 - date has to be the selected date, not monday! emit dateChanged(date); } @@ -126,6 +112,8 @@ DateBookWeekLstDayHdr::DateBookWeekLstDayHdr(const QDate &d, bool /* onM */, char day=wdays[d.dayOfWeek()-1]; + //dont use dayOfWeek() to save space ! label->setText( QString(QObject::tr(QString(QChar(day)))) + " " +QString::number(d.day()) ); - add->setText("+"); + + add->setText("+"); if (d == QDate::currentDate()) { @@ -342,6 +330,21 @@ QDate DateBookWeekLst::date() { } +// return the date at the beginning of the week... +// copied from DateBookWeek +QDate DateBookWeekLst::weekDate() const +{ + QDate d=bdate; + + // Calculate offset to first day of week. + int dayoffset=d.dayOfWeek(); + if(bStartOnMonday) dayoffset--; + else if( dayoffset == 7 ) + dayoffset = 0; + + return d.addDays(-dayoffset); +} + void DateBookWeekLst::getEvents() { - QDate start = date(); + QDate start = weekDate(); //date(); QDate stop = start.addDays(6); QValueList<EffectiveEvent> el = db->getEffectiveEvents(start, stop); diff --git a/core/pim/datebook/datebookweeklst.h b/core/pim/datebook/datebookweeklst.h index 0bfbcda..f683ce7 100644 --- a/core/pim/datebook/datebookweeklst.h +++ b/core/pim/datebook/datebookweeklst.h @@ -121,4 +121,5 @@ public: int week() const { return _week; }; QDate date(); + QDate weekDate() const; public slots: diff --git a/core/pim/osearch/datebooksearch.cpp b/core/pim/osearch/datebooksearch.cpp index be2bf25..5da7ae9 100644 --- a/core/pim/osearch/datebooksearch.cpp +++ b/core/pim/osearch/datebooksearch.cpp @@ -77,5 +77,5 @@ void DatebookSearch::insertItem( void *rec ) ev->lastHitField() == Qtopia::EndDateTime ) ) return; - (void)new EventItem( this, ev ); + new EventItem( this, ev ); _resultCount++; } diff --git a/core/pim/osearch/mainwindow.cpp b/core/pim/osearch/mainwindow.cpp index aa52061..f768d81 100644 --- a/core/pim/osearch/mainwindow.cpp +++ b/core/pim/osearch/mainwindow.cpp @@ -83,9 +83,9 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) : buttonBox->hide(); - searches.append( new AppLnkSearch( resultsList, tr("applications") ) ); - searches.append( new DocLnkSearch( resultsList, tr("documents") ) ); - searches.append( new TodoSearch( resultsList, tr("todo") ) ); - searches.append( new DatebookSearch( resultsList, tr("datebook") ) ); - searches.append( new AdressSearch( resultsList, tr("adressbook") ) ); + searches.append( new AppLnkSearch( resultsList, tr("Applications") ) ); + searches.append( new DocLnkSearch( resultsList, tr("Documents") ) ); + searches.append( new TodoSearch( resultsList, tr("Todo List") ) ); + searches.append( new DatebookSearch( resultsList, tr("Calendar") ) ); + searches.append( new AdressSearch( resultsList, tr("Contacts") ) ); setCentralWidget( mainFrame ); diff --git a/core/pim/osearch/mainwindow.h b/core/pim/osearch/mainwindow.h index 1f5c4bb..75054f0 100644 --- a/core/pim/osearch/mainwindow.h +++ b/core/pim/osearch/mainwindow.h @@ -8,5 +8,5 @@ ***************************************************************************/ -// (c) 2002 Patrick S. Vogt <tille@handhelds.org> +// (c) 2002-2003 Patrick S. Vogt <tille@handhelds.org> #ifndef MAINWINDOW_H @@ -14,6 +14,11 @@ #include <qmainwindow.h> +#include <qdialog.h> +#include <qaction.h> #include <qlist.h> + #include <qmap.h> +#include <qtimer.h> +#include <qpopupmenu.h> class QAction; @@ -27,6 +32,9 @@ class OListViewItem; class QListViewItem; class QPopupMenu; -class QSignalMapper; class QTimer; + +class QSignalMapper; +class QButton; + class SearchGroup; @@ -39,5 +47,5 @@ public: MainWindow( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); ~MainWindow(); - + static QString appName() { return QString::fromLatin1("osearch"); } public slots: diff --git a/core/pim/today/plugins/addressbook/addresspluginconfig.cpp b/core/pim/today/plugins/addressbook/addresspluginconfig.cpp index b79c679..8863192 100644 --- a/core/pim/today/plugins/addressbook/addresspluginconfig.cpp +++ b/core/pim/today/plugins/addressbook/addresspluginconfig.cpp @@ -79,4 +79,10 @@ AddressBookPluginConfig::AddressBookPluginConfig( QWidget *parent, const char* QWhatsThis::add( SpinDaysClip , tr( "How many days we should search forward" ) ); +// QHBox *box4 = new QHBox( this ); + +// QLabel* colorLabel = new QLabel( box4, "" ); +// colorLabel->setText( tr( "To activate settings: Restart application !" ) ); + + QHBox *box5 = new QHBox( this ); QLabel* colorLabel2 = new QLabel( box5, "" ); @@ -105,7 +111,7 @@ AddressBookPluginConfig::AddressBookPluginConfig( QWidget *parent, const char* - layout->addWidget( b_group ); + //layout->addWidget( box4 ); layout->addWidget( box1 ); - // layout->addWidget( box2 ); + //layout->addWidget( box2 ); layout->addWidget( box3 ); layout->addWidget( box5 ); diff --git a/core/pim/today/plugins/addressbook/addresspluginwidget.cpp b/core/pim/today/plugins/addressbook/addresspluginwidget.cpp index dad09db..d47bc0b 100644 --- a/core/pim/today/plugins/addressbook/addresspluginwidget.cpp +++ b/core/pim/today/plugins/addressbook/addresspluginwidget.cpp @@ -103,5 +103,5 @@ void AddressBookPluginWidget::getAddress() { // Check whether the database provide the search option.. - if ( !m_contactdb->hasQuerySettings( OContactAccess::DateDiff ) ){ + if ( !m_contactdb->hasQuerySettings( OContactAccess::DateDiff ) ){ // Libopie seems to be old.. output = QObject::tr( "Database does not provide this search query ! Please upgrade libOpie !<br>" ); @@ -109,12 +109,16 @@ void AddressBookPluginWidget::getAddress() { return; } - + // Define the query for birthdays and start search.. QDate lookAheadDate = QDate::currentDate().addDays( m_daysLookAhead ); int ammount = 0; if ( m_showBirthdays ){ - qWarning("Searching from now (%s) until %s ! ", - QDate::currentDate().toString().latin1(), + qWarning("Searching from now (%s) until %s ! ", + QDate::currentDate().toString().latin1(), lookAheadDate.toString().latin1() ); + } + + if ( m_contactdb->hasQuerySettings( OContactAccess::DateDiff ) ){ + OContact querybirthdays; diff --git a/core/pim/today/plugins/datebook/datebookpluginconfig.h b/core/pim/today/plugins/datebook/datebookpluginconfig.h index bc412dd..2d303fc 100644 --- a/core/pim/today/plugins/datebook/datebookpluginconfig.h +++ b/core/pim/today/plugins/datebook/datebookpluginconfig.h @@ -24,8 +24,11 @@ #include <opie/todayconfigwidget.h> -class DatebookPluginConfig : public TodayConfigWidget { +#include "datebookpluginconfigbase.h" + +class DatebookPluginConfig : public TodayConfigWidget { Q_OBJECT + public: DatebookPluginConfig( QWidget *parent, const char *name ); @@ -40,11 +43,6 @@ private: void readConfig(); - QCheckBox* CheckBox2; - QCheckBox* CheckBox1; - QCheckBox* CheckBox3; - QSpinBox* SpinBox1; - QSpinBox* SpinBox2; - + DatebookPluginConfigBase *m_gui; // how many lines should be showed in the datebook section int m_max_lines_meet; diff --git a/core/pim/today/plugins/todolist/todopluginconfig.h b/core/pim/today/plugins/todolist/todopluginconfig.h index e09251c..54d35cf 100644 --- a/core/pim/today/plugins/todolist/todopluginconfig.h +++ b/core/pim/today/plugins/todolist/todopluginconfig.h @@ -18,12 +18,13 @@ #define TODOLIST_PLUGIN_CONFIG_H -//#include <qwidget.h> #include <qspinbox.h> #include <opie/todayconfigwidget.h> +#include "todopluginconfigbase.h" + class TodolistPluginConfig : public TodayConfigWidget { -Q_OBJECT + Q_OBJECT public: @@ -39,7 +40,7 @@ private: void readConfig(); void writeConfig(); + + TodoPluginConfigBase *m_gui; - QSpinBox* SpinBox2; - QSpinBox* SpinBoxClip; // how many lines should be showed in the todolist section diff --git a/core/settings/security/security.cpp b/core/settings/security/security.cpp index c4726b3..00ea105 100644 --- a/core/settings/security/security.cpp +++ b/core/settings/security/security.cpp @@ -112,5 +112,5 @@ void Security::updateGUI() void Security::show() { - valid=FALSE; + //valid=FALSE; setEnabled(FALSE); SecurityBase::show(); @@ -121,11 +121,15 @@ void Security::show() //reject(); } else { - QString pc = enterPassCode(tr("Enter passcode")); - if ( pc != passcode ) { - QMessageBox::critical(this, tr("Passcode incorrect"), - tr("The passcode entered is incorrect.\nAccess denied")); - reject(); - return; - } + + if (!valid) // security passcode was not asked yet, so ask now + { + QString pc = enterPassCode(tr("Enter passcode")); + if ( pc != passcode ) { + QMessageBox::critical(this, tr("Passcode incorrect"), + tr("The passcode entered is incorrect.\nAccess denied")); + reject(); + return; + } + } } setEnabled(TRUE); @@ -214,4 +218,5 @@ void Security::loadUsers ( void ) } + void Security::toggleAutoLogin(bool val) { @@ -221,4 +226,8 @@ void Security::toggleAutoLogin(bool val) autoLoginName=userlist->currentText(); } + + + + void Security::setSyncNet(const QString& sn) { @@ -231,4 +240,5 @@ void Security::applySecurity() { if ( valid ) { +<<<<<<< security.cpp Config cfg("Security"); cfg.setGroup("Passcode"); @@ -263,4 +273,5 @@ void Security::applySecurity() cfg.setGroup("SyncMode"); cfg.writeEntry("Mode", syncModeCombo->currentItem()+1 ); + } } diff --git a/noncore/apps/confedit/main.cpp b/noncore/apps/confedit/main.cpp index 7e7f064..74923c8 100644 --- a/noncore/apps/confedit/main.cpp +++ b/noncore/apps/confedit/main.cpp @@ -2,12 +2,7 @@ #include "mainwindow.h" -#include <opie2/oapplication.h> - -int main( int argc, char ** argv ) -{ - OApplication a( argc, argv, "confedit" ); - MainWindow mw; - mw.showMaximized(); - a.showMainDocumentWidget( &mw ); - return a.exec(); -} +#include <qpe/qpeapplication.h> +#include <opie/oapplicationfactory.h> + +OPIE_EXPORT_APP( OApplicationFactory<MainWindow> ) + diff --git a/noncore/games/tictac/main.cpp b/noncore/games/tictac/main.cpp index 78fb3b7..0185b8c 100644 --- a/noncore/games/tictac/main.cpp +++ b/noncore/games/tictac/main.cpp @@ -1,4 +1,8 @@ /**************************************************************************** +<<<<<<< main.cpp ** $Id$ +======= +** $Id$ +>>>>>>> 1.1.8.1.2.1 ** ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. @@ -10,22 +14,6 @@ #include <qpe/qpeapplication.h> -#include <stdlib.h> +#include <opie/oapplicationfactory.h> #include "tictac.h" - -int main( int argc, char **argv ) -{ - QPEApplication a( argc, argv ); - int n = 3; - if ( argc == 2 ) // get board size n - n = atoi(argv[1]); - if ( n < 3 || n > 10 ) { // out of range - qWarning( "%s: Board size must be from 3x3 to 10x10", argv[0] ); - return 1; - } - TicTacToe ttt( n ); // create game - a.setMainWidget( &ttt ); - ttt.setCaption( QObject::tr("TicTac") ); - ttt.show(); // show widget - return a.exec(); // go -} +OPIE_EXPORT_APP( OApplicationFactory<TicTacToe> ) |