diff options
author | Gerald Combs <gerald@wireshark.org> | 2012-10-08 20:01:59 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2012-10-08 20:01:59 +0000 |
commit | 445148ac0e6eddf177c30e81811da90b7e2267aa (patch) | |
tree | f87bcf0a462aa11e92a3d1f697c197589a12c7d6 /ui/qt/syntax_line_edit.h | |
parent | 693ed306d3ac7e606f9e977c824b79f7a5ec4614 (diff) | |
download | wireshark-445148ac0e6eddf177c30e81811da90b7e2267aa.tar.gz |
Add a PacketRangeGroupBox widget. Use it to implement "Export Selected
Packets". Not yet tested on Windows. "Ignore Packet" hasn't been
implemented so we can't test that either.
Create a SyntaxLineEdit widget from the QLineEdit code in
DisplayFilterEdit. Use it in the file import and export dialogs and the
PacketRangeGroupBox widget. This lets us provide instant feedback
instead of popping up an error dialog.
Expand the Tango color list based on
http://emilis.info/other/extended_tango .
Rearrange QtShark.pro to (hopefully) work better with Qt Creator.
svn path=/trunk/; revision=45405
Diffstat (limited to 'ui/qt/syntax_line_edit.h')
-rw-r--r-- | ui/qt/syntax_line_edit.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/ui/qt/syntax_line_edit.h b/ui/qt/syntax_line_edit.h new file mode 100644 index 0000000000..d41164ef0f --- /dev/null +++ b/ui/qt/syntax_line_edit.h @@ -0,0 +1,30 @@ +#ifndef SYNTAX_LINE_EDIT_H +#define SYNTAX_LINE_EDIT_H + +#include <QLineEdit> + +class SyntaxLineEdit : public QLineEdit +{ + Q_OBJECT + Q_PROPERTY(SyntaxState syntaxState READ syntaxState) + Q_ENUMS(SyntaxState) +public: + explicit SyntaxLineEdit(QWidget *parent = 0); + enum SyntaxState { Empty, Invalid, Deprecated, Valid }; + + SyntaxState syntaxState() const { return syntax_state_; } + void setSyntaxState(SyntaxState state = Empty); + QString styleSheet() const; + +private: + SyntaxState syntax_state_; + QString style_sheet_; + QString state_style_sheet_; + +signals: + +public slots: + void setStyleSheet(const QString &style_sheet); +}; + +#endif // SYNTAX_LINE_EDIT_H |