Back to index

scribus-ng  1.3.4.dfsg+svn20071115
search.h
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 #ifndef SEARCHREPLACE_H
00008 #define SEARCHREPLACE_H
00009 
00010 #include <qvariant.h>
00011 #include <qdialog.h>
00012 
00013 #include "scribusapi.h"
00014 #include "scribusstructs.h"
00015 class QVBoxLayout;
00016 class QHBoxLayout;
00017 class QGridLayout;
00018 class QCheckBox;
00019 class QComboBox;
00020 class QGroupBox;
00021 class QLineEdit;
00022 class QPushButton;
00023 class MSpinBox;
00024 class FontCombo;
00025 class StyleSelect;
00026 class ShadeButton;
00027 class PrefsContext;
00028 class QLabel;
00029 
00030 class ColorCombo;
00031 class ScribusDoc;
00032 class PageItem;
00033 
00034 class SCRIBUS_API SearchReplace : public QDialog
00035 {
00036        Q_OBJECT
00037 
00038 public:
00039        SearchReplace( QWidget* parent, ScribusDoc *doc, PageItem* ite, bool mode = true );
00040        ~SearchReplace() {};
00041        virtual void slotDoSearch();
00042        virtual void slotDoReplace();
00043 
00044        QLabel* SText1;
00045        QLabel* RText1;
00046        QGroupBox* Search;
00047        QCheckBox* SStroke;
00048        QCheckBox* SFill;
00049        QCheckBox* SStrokeS;
00050        QCheckBox* SFillS;
00051        QCheckBox* SSize;
00052        QCheckBox* SFont;
00053        QCheckBox* SStyle;
00054        QCheckBox* SText;
00055        QCheckBox* SEffect;
00056        QCheckBox* REffect;
00057        QLineEdit* STextVal;
00058        QComboBox* SStyleVal;
00059        FontCombo* SFontVal;
00060        MSpinBox* SSizeVal;
00061        ColorCombo* SFillVal;
00062        ShadeButton *SFillSVal;
00063        ColorCombo* SStrokeVal;
00064        ShadeButton *SStrokeSVal;
00065        QGroupBox* Replace;
00066        QCheckBox* RStroke;
00067        QCheckBox* RStrokeS;
00068        QCheckBox* RFill;
00069        QCheckBox* RFillS;
00070        QCheckBox* RSize;
00071        QCheckBox* RFont;
00072        QCheckBox* RStyle;
00073        QCheckBox* RText;
00074        QLineEdit* RTextVal;
00075        QComboBox* RStyleVal;
00076        FontCombo* RFontVal;
00077        MSpinBox* RSizeVal;
00078        ColorCombo* RFillVal;
00079        ShadeButton *RFillSVal;
00080        ColorCombo* RStrokeVal;
00081        ShadeButton *RStrokeSVal;
00082        StyleSelect* SEffVal;
00083        StyleSelect* REffVal;
00084        QCheckBox* Word;
00085        QCheckBox* CaseIgnore;
00086        QPushButton* DoSearch;
00087        QPushButton* DoReplace;
00088        QPushButton* AllReplace;
00089        QPushButton* clearButton;
00090        QPushButton* Leave;
00091        PageItem* Item;
00092        ScribusDoc* Doc;
00093        uint ReplStart;
00094        PrefsContext* prefs;
00095        bool NotFound;
00096        bool SMode;
00097 
00098 public slots:
00099        virtual void slotSearch();
00100        virtual void slotReplace();
00101        virtual void slotReplaceAll();
00102        virtual void enableTxSearch();
00103        virtual void enableStyleSearch();
00104        virtual void enableFontSearch();
00105        virtual void enableSizeSearch();
00106        virtual void enableEffSearch();
00107        virtual void enableFillSearch();
00108        virtual void enableFillSSearch();
00109        virtual void enableStrokeSearch();
00110        virtual void enableStrokeSSearch();
00111        virtual void enableTxReplace();
00112        virtual void enableStyleReplace();
00113        virtual void enableFontReplace();
00114        virtual void enableSizeReplace();
00115        virtual void enableEffReplace();
00116        virtual void enableFillReplace();
00117        virtual void enableFillSReplace();
00118        virtual void enableStrokeReplace();
00119        virtual void enableStrokeSReplace();
00120        virtual void writePrefs();
00121        virtual void clear();
00122 
00123 signals:
00124        void NewFont(const QString&);
00125        void NewAbs(int);
00126 
00127 protected:
00128        QVBoxLayout* SearchReplaceLayout;
00129        QHBoxLayout* SelLayout;
00130        QGridLayout* SearchLayout;
00131        QGridLayout* ReplaceLayout;
00132        QHBoxLayout* OptsLayout;
00133        QHBoxLayout* ButtonsLayout;
00134        virtual void readPrefs();
00135 
00137        int matchesFound;
00138 
00139 };
00140 
00141 #endif // SEARCHREPLACE_H