/* For general Scribus (>=1.3.2) copyright and licensing information please refer to the COPYING file provided with the program. Following this notice may exist a copyright and/or license notice that predates the release of Scribus 1.3.2 for which a new license (GPL+exception) is in place. */ #ifndef CHARSELECT_H #define CHARSELECT_H #include #include "scribusapi.h" class QTimer; class QLabel; class QPushbutton; class QTable; class QLayout; class QToolTip; class QStringList; class QComboBox; class QFont; class QWidget; class QLineEdit; class FontCombo; class PageItem; class ScribusMainWindow; class SCRIBUS_API Zoom : public QDialog { Q_OBJECT public: Zoom( QWidget* parent, QPixmap pix, uint val); ~Zoom() {}; void paintEvent(QPaintEvent *); QPixmap pixm; QString valu; }; class ChTable; class SCRIBUS_API CharSelect : public QDialog { Q_OBJECT public: CharSelect(QWidget* parent, PageItem *item); CharSelect(QWidget* parent, PageItem *item, QString font); ~CharSelect() {}; const QString & getCharacters(); bool needReturn; QString m_characters; void scanFont(); void setupRangeCombo(); void generatePreview(int charClass); ChTable* zTabelle; QLabel* insText; QLabel* sample; QLabel* fontLabel; QLabel* rangeLabel; QLineEdit* insCode; FontCombo* fontSelector; QComboBox* rangeSelector; QPushButton* insertButton; QPushButton* deleteButton; QPushButton* closeButton; PageItem *ite; ScribusMainWindow *ap; typedef QValueList charClassDef; QValueList allClasses; QValueList characters; QValueList charactersFull; QValueList charactersLatin1; QValueList charactersLatin1Supplement; QValueList charactersLatinExtendedA; QValueList charactersLatinExtendedB; QValueList charactersGeneralPunctuation; QValueList charactersSuperSubscripts; QValueList charactersCurrencySymbols; QValueList charactersLetterlikeSymbols; QValueList charactersNumberForms; QValueList charactersArrows; QValueList charactersMathematicalOperators; QValueList charactersBoxDrawing; QValueList charactersBlockElements; QValueList charactersGeometricShapes; QValueList charactersMiscellaneousSymbols; QValueList charactersDingbats; QValueList charactersSmallFormVariants; QValueList charactersAlphabeticPresentationForms; QValueList charactersSpecial; QValueList charactersGreek; QValueList charactersGreekExtended; QValueList charactersCyrillic; QValueList charactersCyrillicSupplement; QValueList charactersArabic; QValueList charactersArabicPresentationFormsA; QValueList charactersArabicPresentationFormsB; QValueList charactersHebrew; QMap usedCharClasses; QString chToIns; QString fontInUse; uint maxCount; int characterClass; public slots: void newChar(); void newChar(uint r, uint c); void delChar(); void newFont(int font); void newCharClass(int c); void delEdit(); void insChar(); protected: void run(QWidget* parent, PageItem* item, ScribusMainWindow* pl); bool eventFilter( QObject *obj, QEvent *ev ); void recalcCellSizes(); QVBoxLayout* zAuswahlLayout; QHBoxLayout* selectionsLayout; QHBoxLayout* layout1; QVBoxLayout* layout2; QHBoxLayout* layout3; }; class SCRIBUS_API ChTable : public QTable { Q_OBJECT public: ChTable(CharSelect* parent, ScribusMainWindow *pl); ~ChTable() {}; void resizeData( int ) {}; QRect cellGeometry ( int row, int col ) const; void paintCell( QPainter * p, int row, int col, const QRect & cr, bool selected, const QColorGroup & cg ); void paintFocus( QPainter * /*p*/, const QRect & /*cr*/ ) {}; bool mPressed; bool alternate; Zoom* dia; ScribusMainWindow *ap; CharSelect* par; QTimer* watchTimer; uint maxCount; uint rowA; uint colA; public slots: void showAlternate(); signals: void selectChar(uint, uint); void delChar(); protected: virtual void keyPressEvent(QKeyEvent *k); virtual void contentsMouseReleaseEvent(QMouseEvent *m); virtual void contentsMousePressEvent(QMouseEvent* e); }; #endif // QUERY_H