summaryrefslogtreecommitdiffabout
path: root/korganizer/kofilterview.h
Side-by-side diff
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 54fe2c5..02107cf 100644
--- a/korganizer/kofilterview.h
+++ b/korganizer/kofilterview.h
@@ -44,206 +44,207 @@
class QGridLayout;
using namespace KCal;
class KONewCalPrefs : public QDialog
{
Q_OBJECT
public:
KONewCalPrefs( QWidget *parent=0, const char *name=0 ) :
QDialog( parent, name, true )
{
setCaption( i18n("Add new Calendar") );
QVBoxLayout* lay = new QVBoxLayout( this );
lay->setSpacing( 3 );
lay->setMargin( 3 );
QLabel * lab = new QLabel( i18n("<b>Name of new calendar:</b>"), this );
lay->addWidget( lab );
nameE = new KLineEdit( this );
lay->addWidget( nameE );
lab = new QLabel( i18n("<b>Local ical (*.ics) file:</b>"), this );
lay->addWidget( lab );
url = new KURLRequester ( this );
lay->addWidget( url );
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()) );
setMinimumWidth( 220 );
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!") );
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:
void selectNum ( int );
private:
int mNumber;
void keyPressEvent ( QKeyEvent * e )
{
e->ignore();
}
private slots :
void bottonClicked() { if ( mNumber > 0 ) emit selectNum ( mNumber ); }
};
class KOCalCheckButton : public QCheckBox
{
Q_OBJECT
public:
KOCalCheckButton( QWidget *parent=0, const char *name=0 ) :
QCheckBox( 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 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();
void setFiltersEnabled(bool);
CalFilter *selectedFilter();
void setSelectedFilter(QString);
void setSelectedFilter( int );
signals:
void filterChanged();
void editFilters();
private:
QPtrList<CalFilter> *mFilters;
};
class KOCalEditView : public QScrollView
{
Q_OBJECT
public:
KOCalEditView( QWidget* parent=0,const char* name=0);
~KOCalEditView();
int addCalendar( QString calName, QString fileName, bool ask = true );
int getBirtdayID();
public slots:
void addCal();
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();
+ void checkCalendar();
private:
QWidget *mw;
void toggleList ( QPtrList<KOCalCheckButton> );
QPtrList<KOCalRadioButton> mStdandardB;
QPtrList<KOCalCheckButton> mEnabledB;
QPtrList<KOCalCheckButton> mAlarmB;
QPtrList<KOCalCheckButton> mROB;
QGridLayout* mainLayout;
};
#endif // KOFILTERVIEW_H