searchnodeoptions.h

00001 /*
00002  * Silence
00003  *
00004  * Copyright (C) 2009 Manuel Unglaub
00005  *
00006  * This file is part of Silence.
00007  *
00008  * Silence is free software: you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation, version GPLv2 only of the License.
00011  *
00012  * Silence is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016 
00017  * You should have received a copy of the GNU General Public License
00018  * along with Silence.  If not, see <http://www.gnu.org/licenses/>.
00019  */
00020 
00021 #ifndef SEARCHNODEOPTIONS_H
00022 #define SEARCHNODEOPTIONS_H
00023 
00024 #include <QCheckBox>
00025 #include <QComboBox>
00026 #include <QDateEdit>
00027 #include <QFrame>
00028 #include <QGridLayout>
00029 #include <QGroupBox>
00030 #include <QLabel>
00031 #include <QPushButton>
00032 #include <QRadioButton>
00033 
00034 
00042 class SearchNodeOptions : public QFrame
00043 {
00044     Q_OBJECT
00045 
00046     public:
00055         SearchNodeOptions(QWidget *parent = 0, Qt::WindowFlags f = 0);
00056 
00062         ~SearchNodeOptions();
00063 
00064     signals:
00070         void enabledFulltext(bool enabled);
00071 
00077         void enabledMimetype(bool enabled);
00078 
00084         void enabledCreationDate(bool enabled);
00085 
00091         void enabledModificationDate(bool enabled);
00092 
00098         void mimetypeSelected(QString mimetype);
00099 
00105         void changedCreatedFrom(QDate date);
00106 
00112         void changedCreatedTo(QDate date);
00113 
00119         void changedModifiedFrom(QDate date);
00120 
00126         void changedModifiedTo(QDate date);
00127 
00128     private slots:
00129         void toggleVisibility();
00130         void enableMimetype(bool enabled);
00131         void enableCreationDate(bool enabled);
00132         void enableModificationDate(bool enabled);
00133         void enableFulltext(bool enabled);
00134         void changedMimetype(QString mimetype);
00135         void changeCreatedFrom(QDate date);
00136         void changeCreatedTo(QDate date);
00137         void changeModifiedFrom(QDate date);
00138         void changeModifiedTo(QDate date);
00139 
00140     private:
00141     bool showOptions;
00142         QGridLayout *layout,
00143                     *optboxlayout,
00144                     *dateboxlayout;
00145         QFrame *datebox;
00146         QLabel *title;
00147         QPushButton *showBtn;
00148 
00149         QGroupBox *optionbox;
00150         QRadioButton    *captionBtn,
00151                         *fulltextBtn;
00152         QCheckBox   *cbMime,
00153                     *cbCreated,
00154                     *cbModified;
00155         QDateEdit   *fromCreated,
00156                     *toCreated,
00157                     *fromModified,
00158                     *toModified;
00159         QComboBox *mimeCombo;
00160         QLabel  *clbland,
00161                 *mlbland;
00162 
00163         QWidget* createOptionbox();
00164 };
00165 
00166 #endif // SEARCHNODEOPTIONS_H
00167 
00168 
Generated on Fri May 14 19:12:50 2010 for Silence by  doxygen 1.6.3