Back to index

scribus-ng  1.3.4.dfsg+svn20071115
fontpreview.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 FONTPREVIEW_UI_H
00008 #define FONTPREVIEW_UI_H
00009 
00010 #include <qdialog.h>
00011 #include <qpixmap.h>
00012 #include "fontpreviewbase.h"
00013 
00014 class PrefsContext;
00015 class SampleItem;
00016 class ScribusDoc;
00017 
00018 
00025 class FontPreview : public FontPreviewBase
00026 {
00027        Q_OBJECT
00028 
00029 public:
00033        FontPreview(QString fontName = QString::null, QWidget* parent = 0, ScribusDoc* doc=0);
00034        ~FontPreview();
00035 
00038        QString getCurrentFont();
00039 
00040 protected:
00042        QPixmap ttfFont;
00043        QPixmap otfFont;
00044        QPixmap psFont;
00045        QPixmap okIcon;
00047        QString defaultStr;
00049        PrefsContext* prefs;
00051        uint sortColumn;
00053        uint xsize;
00054        uint ysize;
00056        SampleItem *sampleItem;
00057 
00061        void updateFontList(QString searchStr);
00066        void keyReleaseEvent(QKeyEvent *k);
00069        void paintSample(QListViewItem *item);
00075        bool allowSample();
00076        ScribusDoc* m_Doc;
00077 
00078 protected slots:
00080        virtual void languageChange();
00086        virtual void searchEdit_textChanged(const QString &s);
00088        virtual void searchButton_clicked();
00091        //virtual void fontList_currentChanged( QListViewItem * item);
00092        virtual void fontList_mouseButtonClicked(int button, QListViewItem *item, const QPoint &point, int column);
00094        void displayButton_clicked();
00096        void resetDisplayButton_clicked();
00097        void sizeSpin_valueChanged( int );
00098        void cancelButton_clicked();
00099        void okButton_clicked();
00100 };
00101 
00102 #endif // FONTPREVIEW_H
00103