![Gerald Combs](/assets/img/avatar_default.png)
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
31 lines
692 B
C++
31 lines
692 B
C++
#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
|