File: dbcloadsavewindow.h

package info (click to toggle)
savvycan 220-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 12,456 kB
  • sloc: cpp: 61,803; sh: 293; javascript: 91; python: 44; makefile: 8
file content (55 lines) | stat: -rw-r--r-- 1,279 bytes parent folder | download
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
48
49
50
51
52
53
54
55
#ifndef DBCLOADSAVEWINDOW_H
#define DBCLOADSAVEWINDOW_H

#include <QDialog>
#include <QTableWidget>
#include <QComboBox>
#include "dbchandler.h"
#include "dbcmaineditor.h"

namespace Ui {
class DBCLoadSaveWindow;
}

class DBCLoadSaveWindow : public QDialog
{
    Q_OBJECT

public:
    explicit DBCLoadSaveWindow(const QVector<CANFrame> *frames, QWidget *parent = 0);
    ~DBCLoadSaveWindow();

private slots:
    void loadFile();
    void loadJSON();
    void saveFile();
    void removeFile();
    void moveUp();
    void moveDown();
    void editFile();
    void cellChanged(int row, int col);
    void cellDoubleClicked(int row, int col);
    void matchingCriteriaChanged(int index);
    void newFile();

signals:
    void updatedDBCSettings();

private:
    Ui::DBCLoadSaveWindow *ui;
    DBCHandler *dbcHandler;
    DBCFile *currentlyEditingFile;
    const QVector<CANFrame> *referenceFrames;
    DBCMainEditor *editorWindow;
    bool inhibitCellProcessing;

    void swapTableRows(bool up);
    QList<QTableWidgetItem*> takeRow(int row);
    void setRow(int row, const QList<QTableWidgetItem*>& rowItems);
    bool eventFilter(QObject *obj, QEvent *event);
    void updateSettings();
    QComboBox * addMatchingCriteriaCombobox(int row);
};

#endif // DBCLOADSAVEWINDOW_H