summaryrefslogtreecommitdiffabout
path: root/korganizer/kotodoview.cpp
authorzautrix <zautrix>2005-06-17 08:17:07 (UTC)
committer zautrix <zautrix>2005-06-17 08:17:07 (UTC)
commitcd71ce2dd43e4cca3b3da3f599616e7b1b6b8deb (patch) (unidiff)
tree9f9d60464230d5c5e0bf32852d59ef87a30659f9 /korganizer/kotodoview.cpp
parent825c34c11200f8ff0229cfb00b82b1880ef55b94 (diff)
downloadkdepimpi-cd71ce2dd43e4cca3b3da3f599616e7b1b6b8deb.zip
kdepimpi-cd71ce2dd43e4cca3b3da3f599616e7b1b6b8deb.tar.gz
kdepimpi-cd71ce2dd43e4cca3b3da3f599616e7b1b6b8deb.tar.bz2
fixxxxx
Diffstat (limited to 'korganizer/kotodoview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/kotodoview.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 99e6a3a..c5fae17 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -67,53 +67,60 @@ KOStopTodoPrefs::KOStopTodoPrefs( Todo* todo, QWidget *parent, const char *name
67 mTodo = todo; 67 mTodo = todo;
68 setCaption( i18n("Stop todo") ); 68 setCaption( i18n("Stop todo") );
69 QVBoxLayout* lay = new QVBoxLayout( this ); 69 QVBoxLayout* lay = new QVBoxLayout( this );
70 lay->setSpacing( 3 ); 70 lay->setSpacing( 3 );
71 lay->setMargin( 3 ); 71 lay->setMargin( 3 );
72 QLabel * lab = new QLabel( i18n("%1\nis running!").arg( todo->summary() ), this ); 72 QLabel * lab = new QLabel( i18n("%1\nis running!").arg( todo->summary() ), this );
73 lay->addWidget( lab ); 73 lay->addWidget( lab );
74 lab->setAlignment( AlignHCenter ); 74 lab->setAlignment( AlignHCenter );
75 75
76 QPushButton * ok = new QPushButton( i18n("Stop and save"), this ); 76 QPushButton * ok = new QPushButton( i18n("Stop and save"), this );
77 lay->addWidget( ok ); 77 lay->addWidget( ok );
78 QPushButton * cancel = new QPushButton( i18n("Continue running"), this ); 78 QPushButton * cancel = new QPushButton( i18n("Continue running"), this );
79 lay->addWidget( cancel ); 79 lay->addWidget( cancel );
80 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 80 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
81 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 81 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
82 ok = new QPushButton( i18n("Stop - do not save"), this ); 82 ok = new QPushButton( i18n("Stop - do not save"), this );
83 connect ( ok,SIGNAL(clicked() ),this , SLOT ( doNotSave() ) ); 83 connect ( ok,SIGNAL(clicked() ),this , SLOT ( doNotSave() ) );
84 lay->addWidget( ok ); 84 lay->addWidget( ok );
85 resize( 200, 200 ); 85 resize( 200, 200 );
86} 86}
87 87
88void KOStopTodoPrefs::accept() 88void KOStopTodoPrefs::accept()
89{ 89{
90 qDebug("KOStopTodoPrefs::accept() "); 90 qDebug("KOStopTodoPrefs::accept() ");
91
92
93#if 0
94 t->setRunningFalse( comment );
95
96 t->setRunning( false );
97#endif
98
91 QDialog::accept(); 99 QDialog::accept();
92} 100}
93void KOStopTodoPrefs::doNotSave() 101void KOStopTodoPrefs::doNotSave()
94{ 102{
95
96 int result = KMessageBox::warningContinueCancel(this, 103 int result = KMessageBox::warningContinueCancel(this,
97 i18n("Do you really want to set\nthe state to stopped\nwithout saving the data?"),mTodo->summary() ); 104 i18n("Do you really want to set\nthe state to stopped\nwithout saving the data?"),mTodo->summary() );
98 if (result != KMessageBox::Continue) return; 105 if (result != KMessageBox::Continue) return;
99 mTodo->stopRunning(); 106 mTodo->stopRunning();
100 QDialog::accept(); 107 QDialog::accept();
101} 108}
102 109
103 110
104class KOTodoViewWhatsThis :public QWhatsThis 111class KOTodoViewWhatsThis :public QWhatsThis
105{ 112{
106public: 113public:
107 KOTodoViewWhatsThis( QWidget *wid, KOTodoView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { }; 114 KOTodoViewWhatsThis( QWidget *wid, KOTodoView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { };
108 115
109protected: 116protected:
110 virtual QString text( const QPoint& p) 117 virtual QString text( const QPoint& p)
111 { 118 {
112 return _view->getWhatsThisText(p) ; 119 return _view->getWhatsThisText(p) ;
113 } 120 }
114private: 121private:
115 QWidget* _wid; 122 QWidget* _wid;
116 KOTodoView * _view; 123 KOTodoView * _view;
117}; 124};
118 125
119KOTodoListView::KOTodoListView(Calendar *calendar,QWidget *parent, 126KOTodoListView::KOTodoListView(Calendar *calendar,QWidget *parent,