Back to index

scribus-ng  1.3.4.dfsg+svn20071115
fontprefs.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 FONTPREFS_H
00008 #define FONTPREFS_H
00009 
00010 #include <qlayout.h>
00011 #include <qpushbutton.h>
00012 #include <qtable.h>
00013 #include <qcheckbox.h>
00014 #include <qheader.h>
00015 #include <qptrlist.h>
00016 #include <qtabwidget.h>
00017 #include <qwidget.h>
00018 #include <qcombobox.h>
00019 #include <qlistbox.h>
00020 #include <qlistview.h>
00021 #include "scribusapi.h"
00022 #include "scribusstructs.h"
00023 #include "prefsmanager.h"
00024 
00025 class ScribusDoc;
00026 
00028 class SCRIBUS_API FontPrefs : public QTabWidget
00029 {
00030        Q_OBJECT
00031 
00032 public:
00033        FontPrefs( QWidget* parent, bool Hdoc, QString PPath, ScribusDoc* doc );
00034        ~FontPrefs() {};
00035        void restoreDefaults();
00036 
00037        struct fontSet
00038        {
00039               bool FlagPS;
00040               bool FlagUse;
00041               bool FlagSub;
00042               bool FlagOTF;
00043               bool FlagNames;
00044        };
00045        QMap<QString, fontSet> fontFlags;
00046        QMap<QString,QString> RList;
00047        QPtrList<QComboBox> FlagsRepl;
00048 
00049 private:
00050        QWidget* tab1;
00051        QWidget* tab;
00052        QWidget* tab3;
00053        QListBox* PathList;
00054        QListView* fontList;
00055        QTable* Table3;
00056        QHeader *Header;
00057        QHeader *Header2;
00058        QPushButton* DelB;
00059        QPushButton* ChangeB;
00060        QPushButton* AddB;
00061        QPushButton* RemoveB;
00062 
00063        QStringList UsedFonts;
00064        QString HomeP;
00065        QString CurrentPath;
00066        bool DocAvail;
00067        ScribusDoc* docc;
00068        QPixmap ttfFont;
00069        QPixmap otfFont;
00070        QPixmap psFont;
00071        QPixmap substFont;
00072        //QPixmap okIcon;
00073        //QPixmap empty;
00074        QPixmap checkOn;
00075        QPixmap checkOff;
00076 
00077 public slots:
00078        void slotClick(QListViewItem* ite, const QPoint &, int col);
00079        void ReplaceSel(int r, int c);
00080        void UpdateFliste();
00081        void DelEntry();
00082        void SelectPath(QListBoxItem *c);
00083        void AddPath();
00084        void ChangePath();
00085        void DelPath();
00086 
00087 protected:
00088        void readPaths();
00089        void writePaths();
00090        void rebuildDialog();
00091 
00092        QVBoxLayout* tab1Layout;
00093        QVBoxLayout* tabLayout;
00094        QHBoxLayout* Layout2a;
00095        QHBoxLayout* tab3Layout;
00096        QVBoxLayout* LayoutR;
00097 };
00098 
00099 #endif // FONTPREFS_H