You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
80 lines
2.8 KiB
80 lines
2.8 KiB
#ifndef SETTINGS_H
|
|
#define SETTINGS_H
|
|
|
|
#include <QDialog>
|
|
#include <QTextStream>
|
|
#include <QMessageBox>
|
|
#include "applicationlaunchers.h"
|
|
#include "addApplicationLauncher.h"
|
|
#define APPLICATION_VERSION "1.0"
|
|
#define APPLICATION_AUTHOR "DrewTechs"
|
|
|
|
namespace Ui {
|
|
class Settings;
|
|
}
|
|
|
|
class Settings : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
//explicit Settings(QWidget *parent = nullptr);
|
|
Settings(QString newDefaultNotebookPath, QString newOpenedNotebookList,
|
|
QString newGeneralSettingsConfigFile, QString newApplicationLauncherConfigFile,
|
|
QList<ApplicationLaunchers*> newApplicationLaunchers, int tabPage, QWidget *parent = nullptr);
|
|
~Settings();
|
|
|
|
void init();
|
|
|
|
|
|
/* Application Launcher Settings */
|
|
QList<ApplicationLaunchers*> applicationLaunchers;
|
|
|
|
void appendApplicationLauncher(ApplicationLaunchers* launcher);
|
|
void removeApplicationLauncherAt(int idx);
|
|
|
|
/* Setter Functions */
|
|
void setDefaultNotebookPath(QString newDefaultNotebookPath);
|
|
void setOpenNotebookList(QString newOpenedNotebookList);
|
|
void setGeneralSettingsConfigFile(QString newGeneralSettingsConfigFile);
|
|
void setApplicationLauncherConfigFile(QString newApplicationLauncherConfigFile);
|
|
void setSettingsTabPage(int newSettingsTab);
|
|
void setProgramVersion(QString progVersion);
|
|
void setProgramAuthor(QString progAuthor);
|
|
|
|
/* Getter Functions */
|
|
QString getDefaultNotebookPath();
|
|
QString getOpenedNotebookList();
|
|
QString getGeneralSettingsConfigFile();
|
|
QString getApplicationLauncherConfigFile();
|
|
ApplicationLaunchers* getApplicationLauncherAt(int idx);
|
|
int getSettingsTabPage();
|
|
QString getProgramVersion();
|
|
QString getProgramAuthor();
|
|
|
|
private slots:
|
|
void on_addApplication_Button_clicked();
|
|
void on_editApplication_Button_clicked();
|
|
void on_removeApplication_Button_clicked();
|
|
void on_selectDir_defaultNbPath_Button_clicked();
|
|
void on_selectDir_generalSettingConf_Button_clicked();
|
|
void on_selectDir_appLauncher_Button_clicked();
|
|
void on_selectDir_nbListConfig_Button_clicked();
|
|
void on_helpItems_itemSelectionChanged();
|
|
void helpList_DisplayItem(int pageSelected);
|
|
void on_dialogButtonBox_accepted();
|
|
void on_dialogButtonBox_rejected();
|
|
|
|
private:
|
|
Ui::Settings *ui;
|
|
/* General Settings */
|
|
QString defaultNotebookPath = ""; // Default directory to save Notebooks in
|
|
QString openedNotebookList = ""; // List of Previously Opened Notebooks via the last instance.
|
|
QString generalSettingsConfigFile = ""; // General Settings Configuration File.
|
|
QString applicationLauncherConfigFile = ""; // Application Launcher Configuration.
|
|
int settingsTabPage = 0;
|
|
QString programVersion = APPLICATION_VERSION;
|
|
QString programAuthor = APPLICATION_AUTHOR;
|
|
};
|
|
|
|
#endif // SETTINGS_H
|
|
|