Dateien, die als Parameter übergeben werden, werden nach dem Start direkt geladen
This commit is contained in:
52
barecode/src/core/Settings.h
Normal file
52
barecode/src/core/Settings.h
Normal file
@@ -0,0 +1,52 @@
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <QSettings>
|
||||
#include <QString>
|
||||
#include <QFont>
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Settings – Centralised persistent application settings.
|
||||
// ---------------------------------------------------------------------------
|
||||
class Settings : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit Settings(QObject *parent = nullptr);
|
||||
|
||||
// Editor
|
||||
QFont editorFont() const;
|
||||
void setEditorFont(const QFont &font);
|
||||
|
||||
int tabSize() const;
|
||||
void setTabSize(int size);
|
||||
|
||||
bool useSpacesForTabs() const;
|
||||
void setUseSpacesForTabs(bool use);
|
||||
|
||||
// Layout
|
||||
int fileTreeWidth() const;
|
||||
void setFileTreeWidth(int width);
|
||||
|
||||
// Zuletzt geöffnete Dateien (Session-Wiederherstellung)
|
||||
QStringList lastOpenFiles() const;
|
||||
void setLastOpenFiles(const QStringList &files);
|
||||
|
||||
QString lastActiveFile() const;
|
||||
void setLastActiveFile(const QString &file);
|
||||
|
||||
// Recent
|
||||
QString lastProjectPath() const;
|
||||
void setLastProjectPath(const QString &path);
|
||||
|
||||
// Erscheinungsbild
|
||||
bool darkMode() const;
|
||||
void setDarkMode(bool dark);
|
||||
|
||||
signals:
|
||||
void settingsChanged();
|
||||
|
||||
private:
|
||||
QSettings m_settings;
|
||||
};
|
||||
Reference in New Issue
Block a user