summaryrefslogtreecommitdiffabout
path: root/korganizer/kofilterview.h
Side-by-side diff
Diffstat (limited to 'korganizer/kofilterview.h') (more/less context) (show 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
QPushButton * ok = new QPushButton( i18n("OK"), this );
lay->addWidget( ok );
QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
lay->addWidget( cancel );
connect ( ok,SIGNAL(clicked() ),this , SLOT ( checkValid() ) );
connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
int minwid = 220;
if ( QApplication::desktop()->width() >= 320 ) minwid = 300;
setMinimumWidth( minwid );
resize(sizeHint() );
}
QString calName() { return nameE->text(); }
QString calFileName() { return url->url(); }
public slots:
void checkValid() {
if ( nameE->text().isEmpty() ) {
KMessageBox::information( this, i18n("Sorry, the calendar name is empty!") );
nameE->setText( "LPQJ_"+ QString::number( QTime::currentTime().msec () ));
return;
}
if ( url->url().isEmpty() ) {
KMessageBox::information( this, i18n("Sorry, the file name is empty!") );
+ url->setURL( nameE->text() + ".ics" );
return;
}
accept();
}
public:
KLineEdit* nameE;
KURLRequester *url;
};
class KOCalButton : public QPushButton
{
Q_OBJECT
public:
KOCalButton( QWidget *parent=0, const char *name=0 ) :
QPushButton( parent, name)
{
connect( this, SIGNAL( clicked() ),
SLOT( bottonClicked() ));
mNumber = -1;
setFocusPolicy(NoFocus);
}
void setNum ( int num ) {mNumber = num; }
signals: