Diffstat (limited to 'korganizer/filtereditdialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | korganizer/filtereditdialog.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/korganizer/filtereditdialog.cpp b/korganizer/filtereditdialog.cpp index df84911..a3cff49 100644 --- a/korganizer/filtereditdialog.cpp +++ b/korganizer/filtereditdialog.cpp @@ -13,87 +13,92 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #include <qlayout.h> #include <qpushbutton.h> #include <qcombobox.h> #include <qcheckbox.h> #include <qradiobutton.h> -#include <qlistbox.h> +#include <q3listbox.h> #include <qapplication.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3PtrList> + +#include <QDesktopWidget> #include <kdebug.h> #include <klocale.h> #include <klineeditdlg.h> #include <kmessagebox.h> #include <libkdepim/categoryselectdialog.h> #include "koprefs.h" #include "filteredit_base.h" #include "filtereditdialog.h" //#include "filtereditdialog.moc" // TODO: Make dialog work on a copy of the filters objects. class ComboFilterBox: public QComboBox { public: ComboFilterBox( QWidget *parent=0, const char *name=0) : QComboBox( parent,name ) { } void popupBox() { popup(); } }; -FilterEditDialog::FilterEditDialog(QPtrList<CalFilter> *filters,QWidget *parent, +FilterEditDialog::FilterEditDialog(Q3PtrList<CalFilter> *filters,QWidget *parent, const char *name) : KDialogBase(parent,name,true,i18n("Edit Calendar Filters"), Ok|Apply|Cancel) { mFilters = filters; QWidget *mainWidget = new QWidget(this); setMainWidget(mainWidget); mSelectionCombo = new ComboFilterBox(mainWidget); connect(mSelectionCombo,SIGNAL(activated(int)),SLOT(filterSelected())); // mSelectionCombo->setEditable ( true ); QPushButton *addButton = new QPushButton(i18n("Add Filter"),mainWidget); connect(addButton,SIGNAL(clicked()),SLOT(slotAdd())); addButton->setMaximumSize( addButton->sizeHint()); mRemoveButton = new QPushButton( i18n("Remove"), mainWidget ); connect( mRemoveButton, SIGNAL( clicked() ), SLOT( slotRemove() ) ); mRemoveButton->setMaximumSize( mRemoveButton->sizeHint()); QPushButton *upButton = new QPushButton(i18n("Up"),mainWidget); upButton->setMaximumSize( upButton->sizeHint()); connect(upButton,SIGNAL(clicked()),SLOT(slotUp())); mEditor = new FilterEdit_base(mainWidget); - QGridLayout *topLayout = new QGridLayout(mainWidget,2,2); + Q3GridLayout *topLayout = new Q3GridLayout(mainWidget,2,2); topLayout->setSpacing(spacingHint()); topLayout->addWidget(mSelectionCombo,0,0); topLayout->addWidget(upButton,0,1); topLayout->addWidget(addButton,0,2); topLayout->addWidget(mRemoveButton,0,3); topLayout->addMultiCellWidget(mEditor,1,1,0,3); mSelectionCombo->setMaximumWidth ( QApplication::desktop()->width() - addButton->maximumWidth() - mRemoveButton->maximumWidth() - upButton->maximumWidth() - spacingHint() * 5 ); connect(mEditor->mCatEditButton,SIGNAL(clicked()), SLOT(editCategorySelection())); // Clicking cancel exits the dialog without saving connect(this,SIGNAL(cancelClicked()),SLOT(reject())); |