-rw-r--r-- | bin/kdepim/korganizer/bell.png | bin | 1449 -> 1128 bytes | |||
-rw-r--r-- | bin/kdepim/korganizer/eye.png | bin | 1339 -> 1475 bytes | |||
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 3 | ||||
-rw-r--r-- | korganizer/kofilterview.cpp | 28 | ||||
-rw-r--r-- | korganizer/kofilterview.h | 32 |
5 files changed, 52 insertions, 11 deletions
diff --git a/bin/kdepim/korganizer/bell.png b/bin/kdepim/korganizer/bell.png Binary files differindex 0b15133..2239c60 100644 --- a/bin/kdepim/korganizer/bell.png +++ b/bin/kdepim/korganizer/bell.png diff --git a/bin/kdepim/korganizer/eye.png b/bin/kdepim/korganizer/eye.png Binary files differindex fd70996..c2a0251 100644 --- a/bin/kdepim/korganizer/eye.png +++ b/bin/kdepim/korganizer/eye.png diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index b60ae7b..578f78d 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt @@ -1426,16 +1426,19 @@ { "<center>%1</center> <center>is not running. Do you want to set\nthe state to running?</center>","<center>%1</center> <center>ist nicht am Laufen. Möchten Sie den Zustand auf "laufend" setzen?</center>" }, { "%1\nis running!","%1\nist am Laufen!" }, { "Additional Comment:","Zusätzlicher Kommentar:" }, { "Stop and save","Stopp und Speichern" }, { "Continue running","Weiter laufen lassen" }, { "Stop - do not save","Stopp - nicht Speichern" }, { "Do you really want to set\nthe state to stopped\nwithout saving the data?","Möchten sie den Zustand\nwirklich auf gestoppt setzen\nohne die Daten abzuspeichern?" }, { "Time mismatch!","Zeiten stimmen nicht!" }, { "The start time is\nafter the end time!","Die Startzeit ist\nhinter der Endzeit!" }, { "Yes, stop todo","Ja, stoppe Todo" }, { "Todo stopped - no data saved because runtime was < 15 sec!","Todo gestoppt - nichts gespeichert da Laufzeit < 15 sec!" }, { "Todo started! Double click again to stop!","Todo gestartet! Doppelklicke um es zu stoppen!" }, +{ "Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.","Bitte wählen Sie den <b>Default-Kalender</b> in dieser Spalte. Neu angelegte oder importierte Einträge werden dem Default-Kalender hinzugefügt." }, +{ "","" }, +{ "","" }, { "","" }, { "","" }, { "","" }, { "","" },
\ No newline at end of file diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp index ce2880a..9709324 100644 --- a/korganizer/kofilterview.cpp +++ b/korganizer/kofilterview.cpp @@ -136,26 +136,26 @@ void KOCalEditView::selectStdCal( int id, bool b ) { if ( !b ) { KOCalCheckButton* it = (KOCalCheckButton*) sender(); if ( it ) { it->blockSignals( true ); it->setChecked( true ); it->blockSignals( false ); return; } return; } - KOCalCheckButton* sen = (KOCalCheckButton*) sender(); - KOCalCheckButton* it = mStdandardB.first(); + KOCalRadioButton* sen = (KOCalRadioButton*) sender(); + KOCalRadioButton* it = mStdandardB.first(); while ( it ) { if ( it->isChecked() ) { if ( it != sen ) { it->blockSignals( true ); it->setChecked( false ); it->blockSignals( false ); break; } } it = mStdandardB.next(); } KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); @@ -227,25 +227,27 @@ void KOCalEditView::readConfig() mROB.clear(); if ( mw ) delete mw; mw = new QWidget ( viewport() ); addChild(mw); int ii = 0; mainLayout = new QGridLayout ( mw , 2, 8 ); mainLayout->setMargin( 2 ); mainLayout->setSpacing( 2 ); QPushButton * addBut = new QPushButton ( mw ); addBut->setFocusPolicy(NoFocus); mainLayout->addWidget( addBut,0,0 ); - addBut->setPixmap ( SmallIcon("greenhook16")); + addBut->setText( "D"); + connect(addBut,SIGNAL(clicked()),SLOT(defaultInfo())); + //addBut->setPixmap ( SmallIcon("greenhook16")); addBut->setMaximumWidth( addBut->sizeHint().height() ); int max = addBut->sizeHint().height(); addBut = new QPushButton ( mw ); addBut->setFocusPolicy(NoFocus); mainLayout->addWidget( addBut,0,++ii ); addBut->setPixmap ( SmallIcon("eye")); connect(addBut,SIGNAL(clicked()),SLOT(enableAll())); addBut->setMaximumWidth( addBut->sizeHint().height() ); QLabel* lab = new QLabel (i18n(" Calendar \n Resource "), mw ); mainLayout->addWidget( lab,0,++ii ); //lab = new QLabel ( i18n(" "), mw ); @@ -281,32 +283,32 @@ void KOCalEditView::readConfig() addBut = new QPushButton ( mw ); mainLayout->addWidget( addBut,0,6 ); addBut->setPixmap ( SmallIcon("minus")); connect(addBut,SIGNAL(clicked()),SLOT(deleteAll())); addBut->setMaximumWidth( addBut->sizeHint().height() ); #endif KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); int row = 1; while ( kkf ) { int iii = 0; - KOCalCheckButton* cb = new KOCalCheckButton( mw ); - mainLayout->addWidget( cb,row,0 );mStdandardB.append( cb ); - cb->setChecked( kkf->isStandard ); - cb->setNum( kkf->mCalNumber ); - connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectStdCal(int,bool) ) ); + KOCalRadioButton* rb = new KOCalRadioButton( mw ); + mainLayout->addWidget( rb,row,0 );mStdandardB.append( rb ); + rb->setChecked( kkf->isStandard ); + rb->setNum( kkf->mCalNumber ); + connect (rb, SIGNAL (selectNum(int,bool)), SLOT ( selectStdCal(int,bool) ) ); if ( kkf->mErrorOnLoad || kkf->isReadOnly ) - cb->setEnabled( false ); - cb = new KOCalCheckButton( mw ); + rb->setEnabled( false ); + KOCalCheckButton* cb = new KOCalCheckButton( mw ); mainLayout->addWidget( cb,row,++iii );mEnabledB.append( cb ); cb->setChecked( kkf->isEnabled ); cb->setNum( kkf->mCalNumber ); if ( kkf->mErrorOnLoad ) cb->setEnabled( false ); connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectCal(int,bool) ) ); KOCalButton* name = new KOCalButton( mw ); name->setNum( kkf->mCalNumber ); name->setText( kkf->mName ); mainLayout->addWidget( name,row,++iii ); connect (name, SIGNAL (selectNum(int)), SLOT ( infoCal(int) ) ); //lab = new QLabel (" ", mw ); @@ -338,24 +340,30 @@ void KOCalEditView::readConfig() connect (calb, SIGNAL (selectNum(int)), SLOT ( deleteCal(int) ) ); int hei = calb->sizeHint().height(); //calb->setMaximumSize( hei*9/10, hei*9/10 ); } ++row; kkf = KOPrefs::instance()->mCalendars.next(); } lab = new QLabel ( "", mw ); mainLayout->addWidget( lab,row,0 ); mw->show(); } + + +void KOCalEditView::defaultInfo() +{ + KMessageBox::information( this, i18n("Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.") ); +} void KOCalEditView::addCal() { bool tryagain = true; QString name, file; while ( tryagain ) { KONewCalPrefs prefs ( this ); prefs.nameE->setText( name ); prefs.url->setURL( file ); if ( ! prefs.exec() ) return; name = prefs.calName(); file = prefs.calFileName(); diff --git a/korganizer/kofilterview.h b/korganizer/kofilterview.h index 5495d60..b57a6e9 100644 --- a/korganizer/kofilterview.h +++ b/korganizer/kofilterview.h @@ -16,24 +16,25 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #ifndef KOFILTERVIEW_H #define KOFILTERVIEW_H #include <qstring.h> #include <qcheckbox.h> +#include <qradiobutton.h> #include <qlayout.h> #include <qlabel.h> #include <qdialog.h> #include <qscrollview.h> #include <qpushbutton.h> #include <kconfig.h> #include "kofilterview_base.h" #include <libkcal/calfilter.h> #include <kurlrequester.h> #include <klineedit.h> @@ -139,24 +140,52 @@ class KOCalCheckButton : public QCheckBox void selectNum ( int, bool ); private: int mNumber; void keyPressEvent ( QKeyEvent * e ) { e->ignore(); } private slots : void bottonClicked( bool b) { if ( mNumber > 0 ) emit selectNum ( mNumber , b); } }; +class KOCalRadioButton : public QRadioButton +{ + Q_OBJECT + public: + KOCalRadioButton( QWidget *parent=0, const char *name=0 ) : + QRadioButton( parent, name) + { + connect( this, SIGNAL( toggled ( bool ) ), + SLOT( bottonClicked( bool ) )); + mNumber = -1; + setFocusPolicy(NoFocus); + //setMaximumWidth( 10 ); + + } + void setNum ( int num ) {mNumber = num; } + signals: + void selectNum ( int, bool ); +private: + int mNumber; + void keyPressEvent ( QKeyEvent * e ) + { + e->ignore(); + } + +private slots : + void bottonClicked( bool b) { if ( mNumber > 0 ) emit selectNum ( mNumber , b); } +}; + class KOFilterView : public KOFilterView_base { Q_OBJECT public: KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent=0,const char* name=0, WFlags fl=0); ~KOFilterView(); void updateFilters(); bool filtersEnabled(); @@ -185,34 +214,35 @@ class KOCalEditView : public QScrollView void enableAll(); void enableAlarm(); void disableRO(); void deleteAll(); void selectStdCal(int,bool ); void selectCal(int,bool ); void selectCalAlarm(int,bool ); void selectReadOnly(int,bool ); void setColor(const QColor &,int) ; void deleteCal(int) ; void infoCal(int) ; void readConfig(); + void defaultInfo(); signals: void alarmEnabled ( int cal, bool enable ); void calendarEnabled ( int cal, bool enable ); void calendarReadonly ( int cal, bool readonly ); void setCalendarDefault ( int cal ); void removeCalendar ( int cal ); void calendarAdded( int ); void needsUpdate(); private: QWidget *mw; void toggleList ( QPtrList<KOCalCheckButton> ); - QPtrList<KOCalCheckButton> mStdandardB; + QPtrList<KOCalRadioButton> mStdandardB; QPtrList<KOCalCheckButton> mEnabledB; QPtrList<KOCalCheckButton> mAlarmB; QPtrList<KOCalCheckButton> mROB; QGridLayout* mainLayout; }; #endif // KOFILTERVIEW_H |