Back to index

scribus-ng  1.3.4.dfsg+svn20071115
swprefsgui.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 SWPREFSGUI_H
00008 #define SWPREFSGUI_H
00009 
00010 #include "prefspanel.h"
00011 
00012 #include <qtextedit.h>
00013 #include <qsyntaxhighlighter.h>
00014 
00015 class QWidget;
00016 class QVBoxLayout;
00017 class QHBoxLayout;
00018 class QGridLayout;
00019 class QSpacerItem;
00020 class QPushButton;
00021 class QLabel;
00022 class QString;
00023 class PrefsPanel;
00024 
00025 
00030 class SWPrefsGui : public PrefsPanel
00031 {
00032        Q_OBJECT
00033 
00034        public:
00035               SWPrefsGui(QWidget* parent);
00036               ~SWPrefsGui();
00037 
00038               QLabel* titleLabel;
00039               QTextEdit* cfgEdit;
00040               QPushButton* okButton;
00041               QPushButton* resetButton;
00042 
00043        public slots:
00045               void apply();
00047               virtual void okButton_pressed();
00049               virtual void resetButton_pressed();
00051               virtual void cfgEdit_changed();
00052 
00053        protected:
00056               bool loadCfgFile(QString filename);
00057 
00058               QGridLayout* SWPrefsGuiLayout;
00059               QVBoxLayout* editLayout;
00060               QHBoxLayout* buttonLayout;
00061               QSpacerItem* buttonSpacer;
00062 
00063        protected slots:
00064               virtual void languageChange();
00065 };
00066 
00070 class SWSyntaxHighlighter : public QSyntaxHighlighter
00071 {
00072        public:
00073               SWSyntaxHighlighter(QTextEdit *textEdit);
00074 
00079               int highlightParagraph(const QString &text, int endStateOfLastPara);
00080 };
00081 
00082 #endif