summaryrefslogtreecommitdiffabout
path: root/korganizer/kofilterview.cpp
authorMichael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
committer Michael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
commita08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (side-by-side diff)
tree8ee90d686081c52e7c69b5ce946e9b1a7d690001 /korganizer/kofilterview.cpp
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2
initial public commit of qt4 portp1
Diffstat (limited to 'korganizer/kofilterview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kofilterview.cpp48
1 files changed, 26 insertions, 22 deletions
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp
index ee9c9f6..8335ba9 100644
--- a/korganizer/kofilterview.cpp
+++ b/korganizer/kofilterview.cpp
@@ -27,10 +27,14 @@
#include <qlayout.h>
#include <qlabel.h>
#include <qdialog.h>
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <qtextcodec.h>
-#include <qwhatsthis.h>
+#include <q3whatsthis.h>
#include <qdir.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
+#include <Q3Frame>
+#include <Q3PtrList>
#include <libkcal/calfilter.h>
@@ -47,8 +51,8 @@
-KOFilterView::KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent,
- const char* name,WFlags fl )
+KOFilterView::KOFilterView(Q3PtrList<CalFilter> *filterList,QWidget* parent,
+ const char* name,Qt::WFlags fl )
: KOFilterView_base(parent,name,fl)
{
mFilters = filterList;
@@ -114,14 +118,14 @@ void KOFilterView::setSelectedFilter( int fil )
KOCalEditView::KOCalEditView(QWidget* parent,
const char* name )
- : QScrollView(parent,name)
+ : Q3ScrollView(parent,name)
{
mw = 0;
setResizePolicy( AutoOneFit );
- setFrameStyle ( QFrame::Panel | QFrame::Plain );
+ setFrameStyle ( Q3Frame::Panel | Q3Frame::Plain );
setLineWidth ( 1 );
setMidLineWidth ( 1 );
- setFocusPolicy(NoFocus);
+ setFocusPolicy(Qt::NoFocus);
}
KOCalEditView::~KOCalEditView()
@@ -247,55 +251,55 @@ void KOCalEditView::readConfig()
mw = new QWidget ( viewport() );
addChild(mw);
int ii = 0;
- mainLayout = new QGridLayout ( mw , 2, 8 );
+ mainLayout = new Q3GridLayout ( mw , 2, 8 );
mainLayout->setMargin( 2 );
mainLayout->setSpacing( 2 );
QPushButton * addButT = new QPushButton ( mw );
- addButT->setFocusPolicy(NoFocus);
+ addButT->setFocusPolicy(Qt::NoFocus);
mainLayout->addWidget( addButT,0,0 );
addButT->setText( "D");
connect(addButT,SIGNAL(clicked()),SLOT(defaultInfo()));
- QWhatsThis::add( addButT, i18n("Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.") );
+ Q3WhatsThis::add( addButT, i18n("Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.") );
//addBut->setPixmap ( SmallIcon("greenhook16"));
QPushButton *addBut = new QPushButton ( mw );
- addBut->setFocusPolicy(NoFocus);
+ addBut->setFocusPolicy(Qt::NoFocus);
mainLayout->addWidget( addBut,0,++ii );
addBut->setPixmap ( SmallIcon("eye"));
- QWhatsThis::add( addBut, i18n("In this column you can <b>set a calendar to be visible</b>. If a calendar is not visible its entries are not displayed in the views. You can add items to it and it is loaded/saved as usual.") );
+ Q3WhatsThis::add( addBut, i18n("In this column you can <b>set a calendar to be visible</b>. If a calendar is not visible its entries are not displayed in the views. You can add items to it and it is loaded/saved as usual.") );
connect(addBut,SIGNAL(clicked()),SLOT(enableAll()));
int max = addBut->sizeHint().height();
addBut->setMaximumWidth( max );
addButT->setFixedSize( QSize( max, max ) );
QLabel* lab = new QLabel (i18n(" Calendar \n Resource "), mw );
mainLayout->addWidget( lab,0,++ii );
- QWhatsThis::add( lab, i18n("In this column you can see the <b>name of the calendar</b>. If you click on the name button you will get an information box about the loaded calendar file. If the file was not loaded at startup you can try to load it here again.") );
+ Q3WhatsThis::add( lab, i18n("In this column you can see the <b>name of the calendar</b>. If you click on the name button you will get an information box about the loaded calendar file. If the file was not loaded at startup you can try to load it here again.") );
//lab = new QLabel ( i18n(" "), mw );
//mainLayout->addWidget( lab,0,++ii );
//lab->setFixedWidth( 1 );
addBut = new QPushButton ( mw );
- addBut->setFocusPolicy(NoFocus);
+ addBut->setFocusPolicy(Qt::NoFocus);
mainLayout->addWidget( addBut,0,++ii );
addBut->setPixmap ( SmallIcon("bell"));
- QWhatsThis::add( addBut, i18n("In this column you can <b>disable the alarms of a calendar all together</b>. The alarm data in the calendar itself is not changed, the alarms are marked internally as \"do not use\". Useful if you load a calendar of another person but do not want to get notified about alarms of that person.") );
+ Q3WhatsThis::add( addBut, i18n("In this column you can <b>disable the alarms of a calendar all together</b>. The alarm data in the calendar itself is not changed, the alarms are marked internally as \"do not use\". Useful if you load a calendar of another person but do not want to get notified about alarms of that person.") );
connect(addBut,SIGNAL(clicked()),SLOT(enableAlarm()));
addBut->setMaximumWidth( addBut->sizeHint().height() );
addBut = new QPushButton ( mw );
- addBut->setFocusPolicy(NoFocus);
+ addBut->setFocusPolicy(Qt::NoFocus);
mainLayout->addWidget( addBut,0,++ii );
addBut->setPixmap ( SmallIcon("pencil"));
- QWhatsThis::add( addBut, i18n("In this column you can <b>set a calendar and all entries of the calendar to read only</b>. If a calendar is readonly the entries cannot be edited and no items can be added to the calendar. If you change a setting of a calendar to readonly in this column all data will be saved because the data of a readonly calendar is not saved later.") );
+ Q3WhatsThis::add( addBut, i18n("In this column you can <b>set a calendar and all entries of the calendar to read only</b>. If a calendar is readonly the entries cannot be edited and no items can be added to the calendar. If you change a setting of a calendar to readonly in this column all data will be saved because the data of a readonly calendar is not saved later.") );
connect(addBut,SIGNAL(clicked()),SLOT(disableRO()));
addBut->setMaximumWidth( addBut->sizeHint().height() );
lab = new QLabel ( "", mw );
mainLayout->addWidget( lab,0,++ii );
addBut = new QPushButton ( mw );
- addBut->setFocusPolicy(NoFocus);
+ addBut->setFocusPolicy(Qt::NoFocus);
mainLayout->addWidget( addBut,0,++ii );
addBut->setPixmap ( SmallIcon("plus"));
connect(addBut,SIGNAL(clicked()),SLOT(addCal()));
- QWhatsThis::add( addBut, i18n("Click this button to <b>add a calendar</b>. You can add an existing calendar file or you can add a new calendar and KO/Pi creates a new empty calendar file for you.") );
+ Q3WhatsThis::add( addBut, i18n("Click this button to <b>add a calendar</b>. You can add an existing calendar file or you can add a new calendar and KO/Pi creates a new empty calendar file for you.") );
lab = new QLabel ( " ", mw );
mainLayout->addWidget( lab,0,++ii );
@@ -431,11 +435,11 @@ int KOCalEditView::addCalendar( QString name, QString file, bool ask )
if ( KMessageBox::questionYesNo(this, i18n("The file\n%1\ndoes not exist!\nShall I create it for you?").arg( KGlobal::formatMessage (absFile,0) ) )== KMessageBox::No )
return 0;
QFile fileIn( absFile );
- if (!fileIn.open( IO_WriteOnly ) ) {
+ if (!fileIn.open( QIODevice::WriteOnly ) ) {
KMessageBox::sorry( this, i18n("Sorry, cannot create the file\n%1!\nNo calendar added!").arg( file ) );
return 0;
}
- QTextStream tsIn( &fileIn );
+ Q3TextStream tsIn( &fileIn );
tsIn.setCodec( QTextCodec::codecForName("utf8") );
tsIn << "BEGIN:VCALENDAR\nPRODID:-//KDE-Pim//Platform-independent 2.1.0\nVERSION:2.0\nEND:VCALENDAR\n";
fileIn.close();
@@ -475,7 +479,7 @@ void KOCalEditView::disableRO()
{
toggleList( mROB, false );
}
-void KOCalEditView::toggleList ( QPtrList<KOCalCheckButton> list , bool enable )
+void KOCalEditView::toggleList ( Q3PtrList<KOCalCheckButton> list , bool enable )
{
bool dis = !enable;
KOCalCheckButton* it = list.first();