Welcome to mirror list, hosted at ThFree Co, Russian Federation.

traffic_panel.hpp « qt - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0cf25e3357188f33f58f9daec5eb427a1ad7fb0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#pragma once

#include <QtWidgets/QStyledItemDelegate>

class QAbstractItemModel;
class QComboBox;
class QTableView;
class QWidget;

class ComboBoxDelegate : public QStyledItemDelegate
{
  Q_OBJECT

public:
  ComboBoxDelegate(QObject * parent = 0);

  QWidget * createEditor(QWidget * parent, QStyleOptionViewItem const & option,
                         QModelIndex const & index) const Q_DECL_OVERRIDE;

  void setEditorData(QWidget * editor, QModelIndex const & index) const Q_DECL_OVERRIDE;

  void setModelData(QWidget * editor, QAbstractItemModel * model,
                    QModelIndex const & index) const Q_DECL_OVERRIDE;

  void updateEditorGeometry(QWidget * editor, QStyleOptionViewItem const & option,
                            QModelIndex const & index) const Q_DECL_OVERRIDE;
};

class TrafficPanel : public QWidget
{
  Q_OBJECT

public:
  explicit TrafficPanel(QAbstractItemModel * trafficModel, QWidget * parent);

private:
  void CreateTable(QAbstractItemModel * trafficModel);
  void FillTable();

signals:

public slots:
  // void OnCheckBoxClicked(int row, int state);

private:
  QTableView * m_table = Q_NULLPTR;
};