summaryrefslogtreecommitdiffabout
path: root/korganizer/kofilterview.h
Unidiff
Diffstat (limited to 'korganizer/kofilterview.h') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kofilterview.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/korganizer/kofilterview.h b/korganizer/kofilterview.h
index 4322299..be7b5b6 100644
--- a/korganizer/kofilterview.h
+++ b/korganizer/kofilterview.h
@@ -68,48 +68,49 @@ class KONewCalPrefs : public QDialog
68 QPushButton * ok = new QPushButton( i18n("OK"), this ); 68 QPushButton * ok = new QPushButton( i18n("OK"), this );
69 lay->addWidget( ok ); 69 lay->addWidget( ok );
70 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 70 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
71 lay->addWidget( cancel ); 71 lay->addWidget( cancel );
72 connect ( ok,SIGNAL(clicked() ),this , SLOT ( checkValid() ) ); 72 connect ( ok,SIGNAL(clicked() ),this , SLOT ( checkValid() ) );
73 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 73 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
74 int minwid = 220; 74 int minwid = 220;
75 if ( QApplication::desktop()->width() >= 320 ) minwid = 300; 75 if ( QApplication::desktop()->width() >= 320 ) minwid = 300;
76 setMinimumWidth( minwid ); 76 setMinimumWidth( minwid );
77 resize(sizeHint() ); 77 resize(sizeHint() );
78 } 78 }
79 79
80 QString calName() { return nameE->text(); } 80 QString calName() { return nameE->text(); }
81 QString calFileName() { return url->url(); } 81 QString calFileName() { return url->url(); }
82 82
83public slots: 83public slots:
84void checkValid() { 84void checkValid() {
85 if ( nameE->text().isEmpty() ) { 85 if ( nameE->text().isEmpty() ) {
86 KMessageBox::information( this, i18n("Sorry, the calendar name is empty!") ); 86 KMessageBox::information( this, i18n("Sorry, the calendar name is empty!") );
87 nameE->setText( "LPQJ_"+ QString::number( QTime::currentTime().msec () )); 87 nameE->setText( "LPQJ_"+ QString::number( QTime::currentTime().msec () ));
88 return; 88 return;
89 } 89 }
90 if ( url->url().isEmpty() ) { 90 if ( url->url().isEmpty() ) {
91 KMessageBox::information( this, i18n("Sorry, the file name is empty!") ); 91 KMessageBox::information( this, i18n("Sorry, the file name is empty!") );
92 url->setURL( nameE->text() + ".ics" );
92 return; 93 return;
93 } 94 }
94 accept(); 95 accept();
95} 96}
96 97
97public: 98public:
98 KLineEdit* nameE; 99 KLineEdit* nameE;
99 KURLRequester *url; 100 KURLRequester *url;
100}; 101};
101 102
102class KOCalButton : public QPushButton 103class KOCalButton : public QPushButton
103{ 104{
104 Q_OBJECT 105 Q_OBJECT
105 public: 106 public:
106 KOCalButton( QWidget *parent=0, const char *name=0 ) : 107 KOCalButton( QWidget *parent=0, const char *name=0 ) :
107 QPushButton( parent, name) 108 QPushButton( parent, name)
108 { 109 {
109 connect( this, SIGNAL( clicked() ), 110 connect( this, SIGNAL( clicked() ),
110 SLOT( bottonClicked() )); 111 SLOT( bottonClicked() ));
111 mNumber = -1; 112 mNumber = -1;
112 setFocusPolicy(NoFocus); 113 setFocusPolicy(NoFocus);
113 } 114 }
114 void setNum ( int num ) {mNumber = num; } 115 void setNum ( int num ) {mNumber = num; }
115 signals: 116 signals: