|
a/src/qtgui/spell_w.h |
|
b/src/qtgui/spell_w.h |
|
... |
|
... |
23 |
#include <qwidget.h>
|
23 |
#include <qwidget.h>
|
24 |
|
24 |
|
25 |
#include "ui_spell.h"
|
25 |
#include "ui_spell.h"
|
26 |
class SpellW : public QWidget, public Ui::SpellBase
|
26 |
class SpellW : public QWidget, public Ui::SpellBase
|
27 |
{
|
27 |
{
|
28 |
Q_OBJECT
|
28 |
Q_OBJECT;
|
29 |
public:
|
29 |
public:
|
30 |
SpellW(QWidget* parent = 0)
|
30 |
SpellW(QWidget* parent = 0)
|
31 |
: QWidget(parent)
|
31 |
: QWidget(parent), m_prevmode(TYPECMB_NONE) {
|
32 |
{
|
|
|
33 |
setupUi(this);
|
32 |
setupUi(this);
|
34 |
init();
|
33 |
init();
|
35 |
}
|
34 |
}
|
36 |
|
35 |
|
37 |
virtual bool eventFilter(QObject *target, QEvent *event );
|
36 |
virtual bool eventFilter(QObject *target, QEvent *event );
|
|
|
37 |
|
|
|
38 |
enum comboboxchoice {TYPECMB_NONE, TYPECMB_WILD, TYPECMB_REG, TYPECMB_STEM,
|
|
|
39 |
TYPECMB_ASPELL, TYPECMB_STATS};
|
38 |
public slots:
|
40 |
public slots:
|
39 |
virtual void doExpand();
|
41 |
virtual void doExpand();
|
40 |
virtual void wordChanged(const QString&);
|
42 |
virtual void wordChanged(const QString&);
|
41 |
virtual void textDoubleClicked();
|
43 |
virtual void textDoubleClicked();
|
42 |
virtual void textDoubleClicked(int, int);
|
44 |
virtual void textDoubleClicked(int, int);
|
43 |
virtual void modeSet(int);
|
45 |
virtual void setMode(comboboxchoice);
|
44 |
|
46 |
|
|
|
47 |
private slots:
|
|
|
48 |
virtual void onModeChanged(int);
|
|
|
49 |
|
45 |
signals:
|
50 |
signals:
|
46 |
void wordSelect(QString);
|
51 |
void wordSelect(QString);
|
47 |
|
52 |
|
48 |
private:
|
53 |
private:
|
49 |
enum comboboxchoice {TYPECMB_WILD, TYPECMB_REG, TYPECMB_STEM,
|
|
|
50 |
TYPECMB_ASPELL, TYPECMB_STATS};
|
|
|
51 |
// combobox index to expansion type
|
54 |
// combobox index to expansion type
|
52 |
std::vector<comboboxchoice> m_c2t;
|
55 |
std::vector<comboboxchoice> m_c2t;
|
|
|
56 |
comboboxchoice m_prevmode;
|
|
|
57 |
|
53 |
void init();
|
58 |
void init();
|
54 |
void copy();
|
59 |
void copy();
|
55 |
void showStats();
|
60 |
void showStats();
|
|
|
61 |
int cmbIdx(comboboxchoice mode);
|
|
|
62 |
void setModeCommon(comboboxchoice mode);
|
56 |
};
|
63 |
};
|
57 |
|
64 |
|
58 |
#endif /* _ASPELL_W_H_INCLUDED_ */
|
65 |
#endif /* _ASPELL_W_H_INCLUDED_ */
|