[Companion] Work in progress - QTreeView in MdiChild (#4197)
[Companion] QTreeView in MdiChild, Horus and X7 support added, fixes for #4224
This commit is contained in:
+25
-15
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <QtGui>
|
||||
#include "eeprominterface.h"
|
||||
#include "modelslist.h"
|
||||
|
||||
namespace Ui {
|
||||
class MdiChild;
|
||||
@@ -44,52 +45,62 @@ class MdiChild : public QWidget
|
||||
|
||||
void newFile();
|
||||
bool loadFile(const QString & fileName, bool resetCurrentFile=true);
|
||||
bool loadBackup();
|
||||
bool save();
|
||||
bool saveAs(bool isNew=false);
|
||||
bool saveFile(const QString & fileName, bool setCurrent=true);
|
||||
bool hasSelection();
|
||||
QString userFriendlyCurrentFile();
|
||||
QString currentFile() { return curFile; }
|
||||
bool hasPasteData();
|
||||
bool hasSelection() const;
|
||||
bool hasPasteData() const;
|
||||
QString userFriendlyCurrentFile() const;
|
||||
QString currentFile() const { return curFile; }
|
||||
void viableModelSelected(bool viable);
|
||||
void eepromInterfaceChanged();
|
||||
void setEEpromAvail(int eavail);
|
||||
int getCurrentRow() const;
|
||||
|
||||
void refresh(bool expand=false);
|
||||
void keyPressEvent(QKeyEvent * event);
|
||||
|
||||
signals:
|
||||
void copyAvailable(bool val);
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent * event);
|
||||
|
||||
private slots:
|
||||
protected slots:
|
||||
void documentWasModified();
|
||||
void on_simulateButton_clicked();
|
||||
|
||||
void on_radioSettings_clicked();
|
||||
void setDefault();
|
||||
|
||||
public slots:
|
||||
void showModelsListContextMenu(const QPoint & pos);
|
||||
void checkAndInitModel(int row);
|
||||
void generalEdit();
|
||||
void modelEdit();
|
||||
void wizardEdit();
|
||||
void openEditWindow();
|
||||
void openModelEditWindow();
|
||||
bool loadBackup();
|
||||
void confirmDelete();
|
||||
void deleteSelectedModels();
|
||||
|
||||
void cut();
|
||||
void copy();
|
||||
void paste();
|
||||
void writeEeprom();
|
||||
void simulate();
|
||||
void print(int model=-1, QString filename="");
|
||||
void modelSimulate();
|
||||
void radioSimulate();
|
||||
void print(int model=-1, const QString & filename="");
|
||||
void setModified();
|
||||
void updateTitle();
|
||||
|
||||
private:
|
||||
bool maybeSave();
|
||||
void setCurrentFile(const QString & fileName);
|
||||
QString strippedName(const QString & fullFileName);
|
||||
bool loadOtxFile(const QString & fileName);
|
||||
|
||||
void doCopy(QByteArray * gmData);
|
||||
void doPaste(QByteArray * gmData, int index);
|
||||
|
||||
|
||||
Ui::MdiChild * ui;
|
||||
TreeModel * modelsListModel;
|
||||
|
||||
QString curFile;
|
||||
|
||||
@@ -98,7 +109,6 @@ class MdiChild : public QWidget
|
||||
|
||||
bool isUntitled;
|
||||
bool fileChanged;
|
||||
int EEPromAvail;
|
||||
};
|
||||
|
||||
#endif // _MDICHILD_H_
|
||||
|
||||
Reference in New Issue
Block a user