summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (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 945947a..5495d60 100644
--- a/korganizer/kofilterview.h
+++ b/korganizer/kofilterview.h
@@ -1,157 +1,158 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23#ifndef KOFILTERVIEW_H 23#ifndef KOFILTERVIEW_H
24#define KOFILTERVIEW_H 24#define KOFILTERVIEW_H
25 25
26#include <qstring.h> 26#include <qstring.h>
27#include <qcheckbox.h> 27#include <qcheckbox.h>
28#include <qlayout.h> 28#include <qlayout.h>
29#include <qlabel.h> 29#include <qlabel.h>
30#include <qdialog.h>
30#include <qscrollview.h> 31#include <qscrollview.h>
31#include <qpushbutton.h> 32#include <qpushbutton.h>
32#include <kconfig.h> 33#include <kconfig.h>
33#include "kofilterview_base.h" 34#include "kofilterview_base.h"
34 35
35#include <libkcal/calfilter.h> 36#include <libkcal/calfilter.h>
36 37
37#include <kurlrequester.h> 38#include <kurlrequester.h>
38#include <klineedit.h> 39#include <klineedit.h>
39#include <kglobal.h> 40#include <kglobal.h>
40#include <kmessagebox.h> 41#include <kmessagebox.h>
41 42
42class QGridLayout; 43class QGridLayout;
43 44
44using namespace KCal; 45using namespace KCal;
45 46
46class KONewCalPrefs : public QDialog 47class KONewCalPrefs : public QDialog
47{ 48{
48 Q_OBJECT 49 Q_OBJECT
49 public: 50 public:
50 KONewCalPrefs( QWidget *parent=0, const char *name=0 ) : 51 KONewCalPrefs( QWidget *parent=0, const char *name=0 ) :
51 QDialog( parent, name, true ) 52 QDialog( parent, name, true )
52 { 53 {
53 setCaption( i18n("Add new Calendar") ); 54 setCaption( i18n("Add new Calendar") );
54 QVBoxLayout* lay = new QVBoxLayout( this ); 55 QVBoxLayout* lay = new QVBoxLayout( this );
55 lay->setSpacing( 3 ); 56 lay->setSpacing( 3 );
56 lay->setMargin( 3 ); 57 lay->setMargin( 3 );
57 QLabel * lab = new QLabel( i18n("<b>Name of new calendar:</b>"), this ); 58 QLabel * lab = new QLabel( i18n("<b>Name of new calendar:</b>"), this );
58 lay->addWidget( lab ); 59 lay->addWidget( lab );
59 nameE = new KLineEdit( this ); 60 nameE = new KLineEdit( this );
60 lay->addWidget( nameE ); 61 lay->addWidget( nameE );
61 lab = new QLabel( i18n("<b>Local ical (*.ics) file:</b>"), this ); 62 lab = new QLabel( i18n("<b>Local ical (*.ics) file:</b>"), this );
62 lay->addWidget( lab ); 63 lay->addWidget( lab );
63 url = new KURLRequester ( this ); 64 url = new KURLRequester ( this );
64 lay->addWidget( url ); 65 lay->addWidget( url );
65 QPushButton * ok = new QPushButton( i18n("OK"), this ); 66 QPushButton * ok = new QPushButton( i18n("OK"), this );
66 lay->addWidget( ok ); 67 lay->addWidget( ok );
67 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 68 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
68 lay->addWidget( cancel ); 69 lay->addWidget( cancel );
69 connect ( ok,SIGNAL(clicked() ),this , SLOT ( checkValid() ) ); 70 connect ( ok,SIGNAL(clicked() ),this , SLOT ( checkValid() ) );
70 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 71 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
71 setMinimumWidth( 220 ); 72 setMinimumWidth( 220 );
72 resize(sizeHint() ); 73 resize(sizeHint() );
73 } 74 }
74 75
75 QString calName() { return nameE->text(); } 76 QString calName() { return nameE->text(); }
76 QString calFileName() { return url->url(); } 77 QString calFileName() { return url->url(); }
77 78
78public slots: 79public slots:
79void checkValid() { 80void checkValid() {
80 if ( nameE->text().isEmpty() ) { 81 if ( nameE->text().isEmpty() ) {
81 KMessageBox::information( this, i18n("Sorry, the calendar name is empty!") ); 82 KMessageBox::information( this, i18n("Sorry, the calendar name is empty!") );
82 nameE->setText( "LPQJ_"+ QString::number( QTime::currentTime().msec () )); 83 nameE->setText( "LPQJ_"+ QString::number( QTime::currentTime().msec () ));
83 return; 84 return;
84 } 85 }
85 if ( url->url().isEmpty() ) { 86 if ( url->url().isEmpty() ) {
86 KMessageBox::information( this, i18n("Sorry, the file name is empty!") ); 87 KMessageBox::information( this, i18n("Sorry, the file name is empty!") );
87 return; 88 return;
88 } 89 }
89 accept(); 90 accept();
90} 91}
91 92
92public: 93public:
93 KLineEdit* nameE; 94 KLineEdit* nameE;
94 KURLRequester *url; 95 KURLRequester *url;
95}; 96};
96 97
97class KOCalButton : public QPushButton 98class KOCalButton : public QPushButton
98{ 99{
99 Q_OBJECT 100 Q_OBJECT
100 public: 101 public:
101 KOCalButton( QWidget *parent=0, const char *name=0 ) : 102 KOCalButton( QWidget *parent=0, const char *name=0 ) :
102 QPushButton( parent, name) 103 QPushButton( parent, name)
103 { 104 {
104 connect( this, SIGNAL( clicked() ), 105 connect( this, SIGNAL( clicked() ),
105 SLOT( bottonClicked() )); 106 SLOT( bottonClicked() ));
106 mNumber = -1; 107 mNumber = -1;
107 setFocusPolicy(NoFocus); 108 setFocusPolicy(NoFocus);
108 } 109 }
109 void setNum ( int num ) {mNumber = num; } 110 void setNum ( int num ) {mNumber = num; }
110 signals: 111 signals:
111 void selectNum ( int ); 112 void selectNum ( int );
112private: 113private:
113 int mNumber; 114 int mNumber;
114 void keyPressEvent ( QKeyEvent * e ) 115 void keyPressEvent ( QKeyEvent * e )
115 { 116 {
116 e->ignore(); 117 e->ignore();
117 } 118 }
118 119
119private slots : 120private slots :
120 void bottonClicked() { if ( mNumber > 0 ) emit selectNum ( mNumber ); } 121 void bottonClicked() { if ( mNumber > 0 ) emit selectNum ( mNumber ); }
121}; 122};
122class KOCalCheckButton : public QCheckBox 123class KOCalCheckButton : public QCheckBox
123{ 124{
124 Q_OBJECT 125 Q_OBJECT
125 public: 126 public:
126 KOCalCheckButton( QWidget *parent=0, const char *name=0 ) : 127 KOCalCheckButton( QWidget *parent=0, const char *name=0 ) :
127 QCheckBox( parent, name) 128 QCheckBox( parent, name)
128 { 129 {
129 connect( this, SIGNAL( toggled ( bool ) ), 130 connect( this, SIGNAL( toggled ( bool ) ),
130 SLOT( bottonClicked( bool ) )); 131 SLOT( bottonClicked( bool ) ));
131 mNumber = -1; 132 mNumber = -1;
132 setFocusPolicy(NoFocus); 133 setFocusPolicy(NoFocus);
133 //setMaximumWidth( 10 ); 134 //setMaximumWidth( 10 );
134 135
135 } 136 }
136 void setNum ( int num ) {mNumber = num; } 137 void setNum ( int num ) {mNumber = num; }
137 signals: 138 signals:
138 void selectNum ( int, bool ); 139 void selectNum ( int, bool );
139private: 140private:
140 int mNumber; 141 int mNumber;
141 void keyPressEvent ( QKeyEvent * e ) 142 void keyPressEvent ( QKeyEvent * e )
142 { 143 {
143 e->ignore(); 144 e->ignore();
144 } 145 }
145 146
146private slots : 147private slots :
147 void bottonClicked( bool b) { if ( mNumber > 0 ) emit selectNum ( mNumber , b); } 148 void bottonClicked( bool b) { if ( mNumber > 0 ) emit selectNum ( mNumber , b); }
148}; 149};
149 150
150 151
151 152
152class KOFilterView : public KOFilterView_base 153class KOFilterView : public KOFilterView_base
153{ 154{
154 Q_OBJECT 155 Q_OBJECT
155 public: 156 public:
156 KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent=0,const char* name=0, WFlags fl=0); 157 KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent=0,const char* name=0, WFlags fl=0);
157 ~KOFilterView(); 158 ~KOFilterView();