Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
Executable
+69
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* @RDE_HEADER@
|
||||
* <short description>
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Malte Schröder, SLSE, 2016-06-08
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QMap>
|
||||
#include <QStandardItemModel>
|
||||
|
||||
#include <LtsLicence/lts_licence.h>
|
||||
#include "licenceedit.h"
|
||||
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class MainWindow;
|
||||
}
|
||||
|
||||
class QSortFilterProxyModel;
|
||||
|
||||
class MainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MainWindow(QWidget *parent = nullptr);
|
||||
~MainWindow();
|
||||
|
||||
bool init();
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
|
||||
private slots:
|
||||
void onNewLicence(const LtsLicence::Licence &licence);
|
||||
void onActionOpen();
|
||||
void onActionSave();
|
||||
void onActionSaveAs();
|
||||
|
||||
void onActionAdd();
|
||||
void onActionEdit();
|
||||
void onActionRemove();
|
||||
bool onActionReset();
|
||||
|
||||
private:
|
||||
enum class CryptState
|
||||
{
|
||||
Unknown = 0,
|
||||
Decrypted,
|
||||
Encrypted
|
||||
} ;
|
||||
|
||||
void insertRow(const LtsLicence::Licence &licence, int currentRowLicModel);
|
||||
void enableDisableButtons();
|
||||
void setCurrentIndex();
|
||||
void setTVHeaders();
|
||||
private:
|
||||
Ui::MainWindow *m_ui;
|
||||
QMap<QString, LtsLicence::Licence> m_licences;
|
||||
QString m_fileName;
|
||||
LicenceEdit *m_licenceEdit;
|
||||
QStandardItemModel *m_licencesModel;
|
||||
QSortFilterProxyModel *m_filterProxyModel;
|
||||
CryptState m_cryptState;
|
||||
};
|
||||
Reference in new issue
Block a user