init
This commit is contained in:
64
device/workfileedit/workfileedit.h
Normal file
64
device/workfileedit/workfileedit.h
Normal file
@@ -0,0 +1,64 @@
|
||||
#ifndef WORKFILEEDIT_H
|
||||
#define WORKFILEEDIT_H
|
||||
#include <QStyledItemDelegate>
|
||||
#include <QModelIndex>
|
||||
#include <QPainter>
|
||||
#include <QWidget>
|
||||
#include <QStandardItemModel>
|
||||
#include <QItemSelectionModel>
|
||||
#include <QtWidgets/QTableView>
|
||||
#include "comboboxdelegate.h"
|
||||
#include "spinboxdelegate.h"
|
||||
#include "checkboxdelegate.h"
|
||||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
|
||||
|
||||
#define WORKFILEEDIT WorkFileEdit::instance()
|
||||
class WorkFileEdit
|
||||
{
|
||||
|
||||
public:
|
||||
WorkFileEdit();
|
||||
~WorkFileEdit();
|
||||
static WorkFileEdit* instance();
|
||||
void move_P();
|
||||
void move_N();
|
||||
void add_row();
|
||||
void delete_row();
|
||||
void insert_row();
|
||||
|
||||
void new_file();
|
||||
void open_file(QString aFileName);
|
||||
void delete_file();
|
||||
void save_file(QString aFileName);
|
||||
|
||||
void SetTableView(QTableView *WorkFileTableView);
|
||||
//void SetItemSelectionMode(QItemSelectionModel *pWorkFileSelection);
|
||||
void SetComboBoxDelegate(ComboBoxDelegate *pComboBox);
|
||||
void SetSpinBoxDelegate(SpinBoxDelegate *SpinBox);
|
||||
//void SetCheckBoxDelegate(CheckBoxDelegate *CheckBox);
|
||||
void SetTableViewParam();
|
||||
void iniModelFromStringList(QStringList& aFileContent);
|
||||
QString getWorkFileName();
|
||||
private:
|
||||
static WorkFileEdit* uniqueInstance;
|
||||
|
||||
|
||||
//QItemSelectionModel *pWorkFileSelection;
|
||||
QStandardItemModel *pWorkFileModel;
|
||||
QTableView *pWorkFileTableView;
|
||||
ComboBoxDelegate *pComboBox;
|
||||
SpinBoxDelegate *pSpinBox;
|
||||
//CheckBoxDelegate *pCheckBox;
|
||||
QString WorkFileName;
|
||||
QStringList headerList;
|
||||
|
||||
|
||||
void moveRow(QTableView *tableView, int currentRow, int toRow);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // WORKFILEEDIT_H
|
||||
Reference in New Issue
Block a user