1 /* 2 For general Scribus (>=1.3.2) copyright and licensing information please refer 3 to the COPYING file provided with the program. Following this notice may exist 4 a copyright and/or license notice that predates the release of Scribus 1.3.2 5 for which a new license (GPL+exception) is in place. 6 */ 7 #ifndef PROPERTYWIDGET_OPENTYPEFONTFEATURES_H 8 #define PROPERTYWIDGET_OPENTYPEFONTFEATURES_H 9 10 #include "ui_propertywidget_fontfeaturesbase.h" 11 #include "propertywidgetbase.h" 12 13 class CharStyle; 14 class ParagraphStyle; 15 class ScribusDoc; 16 class ScribusMainWindow; 17 18 class PropertyWidget_FontFeatures : public QFrame, Ui::PropertyWidget_FontFeatures, 19 public PropertyWidgetBase 20 { 21 Q_OBJECT 22 23 public: 24 PropertyWidget_FontFeatures(QWidget *parent); ~PropertyWidget_FontFeatures()25 ~PropertyWidget_FontFeatures() {} 26 void enableFeatures(const QStringList& fontFeatures); 27 28 protected: 29 void connectSignals(); 30 void disconnectSignals(); 31 void disableAllFeatures(); 32 PageItem* m_item; 33 ScribusMainWindow* m_ScMW; 34 35 void configureWidgets(); 36 void initWidgets(); 37 void setCurrentItem(PageItem *item); 38 void changeEvent(QEvent *e) override; 39 40 quint64 featureFlags(); 41 42 public slots: 43 void setMainWindow(ScribusMainWindow *mw); 44 void setDoc(ScribusDoc *d); 45 void handleSelectionChanged(); 46 void languageChange(); unitChange()47 void unitChange() {} 48 void showFontFeatures(const QString& s, const QStringList& availableFeatures); 49 void updateCharStyle(const CharStyle& charStyle); 50 void updateStyle(const ParagraphStyle& newCurrent); 51 52 private slots: 53 void handleFontFeatures(); 54 55 signals: 56 void needsRelayout(); 57 }; 58 59 #endif 60