source: flair-src/branches/mavlink/tools/FlairGCS/src/ListWidget.h@ 56

Last change on this file since 56 was 56, checked in by Thomas Fuhrmann, 8 years ago

Management of lists using red/black colors

File size: 930 bytes
Line 
1// %flair:license{
2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
4// %flair:license}
5#ifndef LISTWIDGET_H
6#define LISTWIDGET_H
7
8#include "FormLayout.h"
9
10class QListWidget;
11class Layout;
12class QStringList;
13class QListWidgetItem;
14class QPalette;
15
16class ListWidget : public FormLayout {
17 Q_OBJECT
18
19public:
20 ListWidget(Layout *parent, int row, int col, QString name);
21 ListWidget(Layout *parent, int row, int col, QString name, QStringList& items);
22 ~ListWidget();
23
24private:
25 QListWidget* listwidget;
26 int current_item_row;
27 bool is_up_to_date;
28 QPalette list_red_pal;
29 QPalette list_black_pal;
30 void XmlEvent(QDomElement dom);
31 void SetUptodate(void);
32 void Reset(void);
33 void LoadEvent(QDomElement dom);
34 bool IsUptodate(void);
35
36 void ui_to_var(void);
37 void ui_to_xml(void);
38
39private slots:
40 void SelectedItemChanged(int current_row);
41};
42
43#endif // LISTWIDGET_H
Note: See TracBrowser for help on using the repository browser.