forked from len0rd/rockbox
qeditor: introduce a message widget to display non-interactive messages
Change-Id: Iad43efa1f09428389fbd09403c1ae20d2805f1c5 Reviewed-on: http://gerrit.rockbox.org/987 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
This commit is contained in:
parent
3b4e63173d
commit
b08620dd30
4 changed files with 120 additions and 0 deletions
|
|
@ -338,4 +338,32 @@ private slots:
|
|||
void OnDataSelChanged(int index);
|
||||
};
|
||||
|
||||
class MessageWidget : public QFrame
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum MessageType
|
||||
{
|
||||
Positive,
|
||||
Information,
|
||||
Warning,
|
||||
Error
|
||||
};
|
||||
|
||||
MessageWidget(QWidget *parent = 0);
|
||||
virtual ~MessageWidget();
|
||||
void SetMessage(MessageType type, const QString& msg);
|
||||
|
||||
protected:
|
||||
void UpdateType();
|
||||
|
||||
QLabel *m_icon;
|
||||
QLabel *m_text;
|
||||
QToolButton *m_close;
|
||||
MessageType m_type;
|
||||
|
||||
private slots:
|
||||
void OnClose(bool clicked);
|
||||
};
|
||||
|
||||
#endif /* AUX_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue