diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /korganizer/searchdialog.cpp | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'korganizer/searchdialog.cpp')
-rw-r--r-- | korganizer/searchdialog.cpp | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp index 082a6eacc..487296a6d 100644 --- a/korganizer/searchdialog.cpp +++ b/korganizer/searchdialog.cpp @@ -24,12 +24,12 @@ without including the source code for Qt in the source distribution. */ -#include <qlayout.h> -#include <qcheckbox.h> -#include <qgroupbox.h> -#include <qhbuttongroup.h> -#include <qlabel.h> -#include <qlineedit.h> +#include <tqlayout.h> +#include <tqcheckbox.h> +#include <tqgroupbox.h> +#include <tqhbuttongroup.h> +#include <tqlabel.h> +#include <tqlineedit.h> #include <klocale.h> #include <kmessagebox.h> @@ -45,67 +45,67 @@ #include "searchdialog.h" #include "searchdialog.moc" -SearchDialog::SearchDialog(Calendar *calendar,QWidget *parent) +SearchDialog::SearchDialog(Calendar *calendar,TQWidget *parent) : KDialogBase(Plain,i18n("Find Events"),User1|Close,User1,parent,0,false,false, KGuiItem( i18n("&Find"), "find") ) { mCalendar = calendar; - QFrame *topFrame = plainPage(); - QVBoxLayout *layout = new QVBoxLayout(topFrame,0,spacingHint()); + TQFrame *topFrame = plainPage(); + TQVBoxLayout *layout = new TQVBoxLayout(topFrame,0,spacingHint()); // Search expression - QHBoxLayout *subLayout = new QHBoxLayout(); + TQHBoxLayout *subLayout = new TQHBoxLayout(); layout->addLayout(subLayout); - searchEdit = new QLineEdit( "*", topFrame ); // Find all events by default - searchLabel = new QLabel( searchEdit, i18n("&Search for:"), topFrame ); + searchEdit = new TQLineEdit( "*", topFrame ); // Find all events by default + searchLabel = new TQLabel( searchEdit, i18n("&Search for:"), topFrame ); subLayout->addWidget( searchLabel ); subLayout->addWidget( searchEdit ); searchEdit->setFocus(); - connect( searchEdit, SIGNAL( textChanged( const QString & ) ), - this, SLOT( searchTextChanged( const QString & ) ) ); + connect( searchEdit, TQT_SIGNAL( textChanged( const TQString & ) ), + this, TQT_SLOT( searchTextChanged( const TQString & ) ) ); - QHButtonGroup *itemsGroup = new QHButtonGroup( i18n("Search For"), topFrame ); + TQHButtonGroup *itemsGroup = new TQHButtonGroup( i18n("Search For"), topFrame ); layout->addWidget( itemsGroup ); - mEventsCheck = new QCheckBox( i18n("&Events"), itemsGroup ); - mTodosCheck = new QCheckBox( i18n("To-&dos"), itemsGroup ); - mJournalsCheck = new QCheckBox( i18n("&Journal entries"), itemsGroup ); + mEventsCheck = new TQCheckBox( i18n("&Events"), itemsGroup ); + mTodosCheck = new TQCheckBox( i18n("To-&dos"), itemsGroup ); + mJournalsCheck = new TQCheckBox( i18n("&Journal entries"), itemsGroup ); mEventsCheck->setChecked( true ); mTodosCheck->setChecked( true ); // Date range - QGroupBox *rangeGroup = new QGroupBox( 1, Horizontal, i18n( "Date Range" ), + TQGroupBox *rangeGroup = new TQGroupBox( 1, Horizontal, i18n( "Date Range" ), topFrame ); layout->addWidget( rangeGroup ); - QWidget *rangeWidget = new QWidget( rangeGroup ); - QHBoxLayout *rangeLayout = new QHBoxLayout( rangeWidget, 0, spacingHint() ); + TQWidget *rangeWidget = new TQWidget( rangeGroup ); + TQHBoxLayout *rangeLayout = new TQHBoxLayout( rangeWidget, 0, spacingHint() ); mStartDate = new KDateEdit( rangeWidget ); - rangeLayout->addWidget( new QLabel( mStartDate, i18n("Fr&om:"), rangeWidget ) ); + rangeLayout->addWidget( new TQLabel( mStartDate, i18n("Fr&om:"), rangeWidget ) ); rangeLayout->addWidget( mStartDate ); mEndDate = new KDateEdit( rangeWidget ); - rangeLayout->addWidget( new QLabel( mEndDate, i18n("&To:"), rangeWidget ) ); - mEndDate->setDate( QDate::currentDate().addDays( 365 ) ); + rangeLayout->addWidget( new TQLabel( mEndDate, i18n("&To:"), rangeWidget ) ); + mEndDate->setDate( TQDate::currentDate().addDays( 365 ) ); rangeLayout->addWidget( mEndDate ); - mInclusiveCheck = new QCheckBox( i18n("E&vents have to be completely included"), + mInclusiveCheck = new TQCheckBox( i18n("E&vents have to be completely included"), rangeGroup ); mInclusiveCheck->setChecked( false ); - mIncludeUndatedTodos = new QCheckBox( i18n("Include to-dos &without due date"), rangeGroup ); + mIncludeUndatedTodos = new TQCheckBox( i18n("Include to-dos &without due date"), rangeGroup ); mIncludeUndatedTodos->setChecked( true ); // Subjects to search - QHButtonGroup *subjectGroup = new QHButtonGroup( i18n("Search In"), topFrame ); + TQHButtonGroup *subjectGroup = new TQHButtonGroup( i18n("Search In"), topFrame ); layout->addWidget(subjectGroup); - mSummaryCheck = new QCheckBox( i18n("Su&mmaries"), subjectGroup ); + mSummaryCheck = new TQCheckBox( i18n("Su&mmaries"), subjectGroup ); mSummaryCheck->setChecked( true ); - mDescriptionCheck = new QCheckBox( i18n("Desc&riptions"), subjectGroup ); - mCategoryCheck = new QCheckBox( i18n("Cate&gories"), subjectGroup ); + mDescriptionCheck = new TQCheckBox( i18n("Desc&riptions"), subjectGroup ); + mCategoryCheck = new TQCheckBox( i18n("Cate&gories"), subjectGroup ); // Results list view @@ -117,29 +117,29 @@ SearchDialog::SearchDialog(Calendar *calendar,QWidget *parent) KOGlobals::fitDialogToScreen( this, true ); } - connect( this,SIGNAL(user1Clicked()),SLOT(doSearch())); + connect( this,TQT_SIGNAL(user1Clicked()),TQT_SLOT(doSearch())); // Propagate edit and delete event signals from event list view - connect( listView, SIGNAL( showIncidenceSignal( Incidence * ) ), - SIGNAL( showIncidenceSignal( Incidence *) ) ); - connect( listView, SIGNAL( editIncidenceSignal( Incidence * ) ), - SIGNAL( editIncidenceSignal( Incidence * ) ) ); - connect( listView, SIGNAL( deleteIncidenceSignal( Incidence * ) ), - SIGNAL( deleteIncidenceSignal( Incidence * ) ) ); + connect( listView, TQT_SIGNAL( showIncidenceSignal( Incidence * ) ), + TQT_SIGNAL( showIncidenceSignal( Incidence *) ) ); + connect( listView, TQT_SIGNAL( editIncidenceSignal( Incidence * ) ), + TQT_SIGNAL( editIncidenceSignal( Incidence * ) ) ); + connect( listView, TQT_SIGNAL( deleteIncidenceSignal( Incidence * ) ), + TQT_SIGNAL( deleteIncidenceSignal( Incidence * ) ) ); } SearchDialog::~SearchDialog() { } -void SearchDialog::searchTextChanged( const QString &_text ) +void SearchDialog::searchTextChanged( const TQString &_text ) { enableButton( KDialogBase::User1, !_text.isEmpty() ); } void SearchDialog::doSearch() { - QRegExp re; + TQRegExp re; re.setWildcard( true ); // most people understand these better. re.setCaseSensitive( false ); @@ -166,7 +166,7 @@ void SearchDialog::doSearch() void SearchDialog::updateView() { - QRegExp re; + TQRegExp re; re.setWildcard( true ); // most people understand these better. re.setCaseSensitive( false ); re.setPattern( searchEdit->text() ); @@ -179,10 +179,10 @@ void SearchDialog::updateView() listView->showIncidences( mMatchedEvents ); } -void SearchDialog::search( const QRegExp &re ) +void SearchDialog::search( const TQRegExp &re ) { - QDate startDt = mStartDate->date(); - QDate endDt = mEndDate->date(); + TQDate startDt = mStartDate->date(); + TQDate endDt = mEndDate->date(); Event::List events; if (mEventsCheck->isChecked()) { @@ -204,7 +204,7 @@ void SearchDialog::search( const QRegExp &re ) } } } else { - QDate dt = startDt; + TQDate dt = startDt; while ( dt <= endDt ) { todos += mCalendar->todos( dt ); dt = dt.addDays( 1 ); @@ -214,7 +214,7 @@ void SearchDialog::search( const QRegExp &re ) Journal::List journals; if (mJournalsCheck->isChecked()) { - QDate dt = startDt; + TQDate dt = startDt; while ( dt <= endDt ) { journals += mCalendar->journals( dt ); dt = dt.addDays( 1 ); |