| 1 | // ---------------------------------- patternEditor.h --------------------------------------------------------------------------- |
| 2 | // header file used by patternEditor.cpp |
| 3 | |
| 4 | //=============================================================================================================================== |
| 5 | //=============================================================================================================================== |
| 6 | // This file is part of "luckyBackup" project |
| 7 | // Copyright, Loukas Avgeriou |
| 8 | // luckyBackup is distributed under the terms of the GNU General Public License |
| 9 | // luckyBackup is free software: you can redistribute it and/or modify |
| 10 | // it under the terms of the GNU General Public License as published by |
| 11 | // the Free Software Foundation, either version 3 of the License, or |
| 12 | // (at your option) any later version. |
| 13 | // |
| 14 | // luckyBackup is distributed in the hope that it will be useful, |
| 15 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | // GNU General Public License for more details. |
| 18 | // |
| 19 | // You should have received a copy of the GNU General Public License |
| 20 | // along with luckyBackup. If not, see <http://www.gnu.org/licenses/>. |
| 21 | |
| 22 | |
| 23 | // project version : Please see "main.cpp" for project version |
| 24 | |
| 25 | // developer : luckyb |
| 26 | // last modified : 26 Feb 2010 |
| 27 | //=============================================================================================================================== |
| 28 | //=============================================================================================================================== |
| 29 | |
| 30 | #ifndef PATTERNEDITOR_H |
| 31 | #define PATTERNEDITOR_H |
| 32 | |
| 33 | #include "ui_patternEditor.h" |
| 34 | |
| 35 | //============================================================================================================== |
| 36 | //Declaration of patternEditor class |
| 37 | |
| 38 | class patternEditor : public QDialog |
| 39 | { |
| 40 | Q_OBJECT |
| 41 | |
| 42 | public: |
| 43 | patternEditor (QString, QWidget *parent=0); |
| 44 | QString getPattern(); |
| 45 | |
| 46 | private slots: |
| 47 | void okay(); |
| 48 | void cancel(); |
| 49 | void resetFileds(); |
| 50 | void browse(const int); //SLOT to browse for a directory or file |
| 51 | void fillPattern(); //SLOT to fill-in the pattern from all the info from the dialog |
| 52 | void fileRadioChanged(); //SLOT when the specific file radio button is toggled |
| 53 | |
| 54 | private: |
| 55 | Ui::patternEditor uiP; |
| 56 | QString itsPattern; |
| 57 | QString SourceRoot; //this holds the source of the task |
| 58 | QString patternLine; //this holds the final pattern to insert |
| 59 | QString anchorSource; //this holds the final directory of the source when "backup the entire source directory by name" is used |
| 60 | int count; //simple count variable |
| 61 | |
| 62 | protected: |
| 63 | void closeEvent(QCloseEvent*); |
| 64 | }; |
| 65 | |
| 66 | #endif |
| 67 | |
| 68 | // end of patternEditor.h --------------------------------------------------------------------------- |