Subversion Repositories tpanel

Rev

Rev 309 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 309 Rev 310
Line 25... Line 25...
25
QT_BEGIN_NAMESPACE
25
QT_BEGIN_NAMESPACE
26
class QLineEdit;
26
class QLineEdit;
27
class QTextEdit;
27
class QTextEdit;
28
class QLabel;
28
class QLabel;
29
class QHBoxLayout;
29
class QHBoxLayout;
-
 
30
class TQSingleLine;
-
 
31
class TQMultiLine;
30
QT_END_NAMESPACE
32
QT_END_NAMESPACE
31
 
33
 
32
class TQEditLine : public QWidget
34
class TQEditLine : public QWidget
33
{
35
{
34
    Q_OBJECT
36
    Q_OBJECT
Line 42... Line 44...
42
        void setObjectName(const std::string& name);
44
        void setObjectName(const std::string& name);
43
        void setPasswordChar(uint c);
45
        void setPasswordChar(uint c);
44
        std::string& getText() { return mText; }
46
        std::string& getText() { return mText; }
45
        void setFixedSize(int w, int h);
47
        void setFixedSize(int w, int h);
46
        void setFont(QFont &font);
48
        void setFont(QFont &font);
-
 
49
        void setTextColor(QColor col);
47
        void setPalette(QPalette &pal);
50
        void setPalette(QPalette &pal);
48
        void grabGesture(Qt::GestureType type, Qt::GestureFlags flags = Qt::GestureFlags());
51
        void grabGesture(Qt::GestureType type, Qt::GestureFlags flags = Qt::GestureFlags());
49
        void setPadding(int left, int top, int right, int bottom);
52
        void setPadding(int left, int top, int right, int bottom);
50
        void setFrameSize(int s);
53
        void setFrameSize(int s);
51
        void setWordWrapMode(bool mode = false);
54
        void setWordWrapMode(bool mode = false);
Line 65... Line 68...
65
        void inputChanged(ulong handle, std::string& text);
68
        void inputChanged(ulong handle, std::string& text);
66
        void cursorPositionChanged(ulong handle, int oldPos, int newPos);
69
        void cursorPositionChanged(ulong handle, int oldPos, int newPos);
67
        void focusChanged(ulong handle, bool in);
70
        void focusChanged(ulong handle, bool in);
68
 
71
 
69
    protected:
72
    protected:
70
//        bool event(QEvent *event) override;
-
 
71
        void keyPressEvent(QKeyEvent *event) override;
-
 
72
        void hideEvent(QHideEvent *event) override;
73
        void hideEvent(QHideEvent *event) override;
73
        void leaveEvent(QEvent *event) override;
74
        void leaveEvent(QEvent *event) override;
74
        void closeEvent(QCloseEvent *event) override;
75
        void closeEvent(QCloseEvent *event) override;
75
        void focusInEvent(QFocusEvent *e) override;
-
 
76
        void focusOutEvent(QFocusEvent *e) override;
-
 
77
 
76
 
78
        void onTextChanged(const QString &text);
77
        void onTextChanged(const QString &text);
79
        void onTextAreaChanged();
78
        void onTextAreaChanged();
80
        void onCursorPositionChangedS(int oldPos, int newPos);
79
        void onCursorPositionChangedS(int oldPos, int newPos);
81
        void onEditingFinished();
80
        void onEditingFinished();
-
 
81
        void onFocusChanged(bool in);
-
 
82
        void onKeyPressed(int);
82
 
83
 
83
    private:
84
    private:
84
        void init();
85
        void init();
85
        void _end();
86
        void _end();
86
 
87
 
87
        QHBoxLayout *mLayout{nullptr};
88
        QHBoxLayout *mLayout{nullptr};
88
        QLineEdit *mEdit{nullptr};
89
        TQSingleLine *mEdit{nullptr};
89
        QTextEdit *mTextArea{nullptr};
90
        TQMultiLine *mTextArea{nullptr};
90
 
91
 
91
        std::string mText;
92
        std::string mText;
92
        ulong mHandle{0};
93
        ulong mHandle{0};
93
        bool mChanged{false};
94
        bool mChanged{false};
94
        bool mMultiline{false};
95
        bool mMultiline{false};