Scribus
Open source desktop publishing at your fingertips
charselect.h
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 CHARSELECT_H
8 #define CHARSELECT_H
9 
10 #include "scribusapi.h"
11 #include "scrpalettebase.h"
12 #include "chartablemodel.h"
13 #include "unicodesearch.h"
14 #include "ui_charselect.h"
15 
16 class PageItem;
17 class CharSelectEnhanced;
18 
19 
33 class SCRIBUS_API CharSelect : public ScrPaletteBase, public Ui::CharSelect
34 {
35  Q_OBJECT
36 
37 public:
38  CharSelect(QWidget* parent);
39  ~CharSelect();
40 
41  void hide();
42  void show();
43  void setDoc(ScribusDoc* doc);
44  void setEnabled(bool state, PageItem* item=0);
45 
46  const QString & getCharacters();
47 
50  return m_userTableModel;
51  };
52 
53  virtual void changeEvent(QEvent *e);
54 
55 signals:
59  void insertSpecialChar();
61  void insertUserSpecialChar(QChar, QString);
62 
63 
64 private:
65  ScribusDoc* m_doc;
67  CharTableModel * m_userTableModel;
68  UnicodeSearchModel *m_unicodeSearchModel;
69 
70  CharSelectEnhanced * m_enhanced;
71 
73  QString chToIns;
74 
75  QString paletteFileMask;
76 
77  PageItem *m_Item;
78 
79  void saveUserContent(QString f);
80  void loadUserContent(QString f);
81 
82  void openEnhanced();
83  void closeEnhanced();
84 
85 private slots:
86  void userNewChar(uint i, QString font);
87  void hideButton_toggled(bool);
88  void slot_insertSpecialChar();
89  void slot_insertSpecialChars(const QString & chars);
90  void slot_insertUserSpecialChar(QChar, QString font);
91  void slot_selectionChanged( const QItemSelection&, const QItemSelection& );
92  void uniLoadButton_clicked();
93  void uniSaveButton_clicked();
94  void uniClearButton_clicked();
95 };
96 
97 #endif
A model (MVC) to handle unicode characters map. It's a backend for CharTableView - its GUI representa...
Definition: chartablemodel.h:30
Qt4 model for QTableView used in UnicodeSearch dialog. It contains only 2 columns with hex-descriptio...
Definition: unicodesearch.h:69
Character Palette for batch glyphs inserting. Enhanced instance is created/destroyed on every call fr...
Definition: charselectenhanced.h:20
CharTableModel * userTableModel()
Used for StoryEditor.
Definition: charselect.h:49
the Document Class
Definition: scribusdoc.h:90
Character Palette for direct glyphs inserting. The "classical" one is opened as CharSelectEnhanced in...
Definition: charselect.h:33
Definition: pageitem.h:92
virtual void hide()
Sample way to grab keystrokes, simply calls superclass at this point.
Definition: scrpalettebase.cpp:210
Definition: scrpalettebase.h:38