Expose new settings, add tabs to settings editor

This commit is contained in:
GriffinR
2023-12-08 15:13:21 -05:00
parent 61b1789d4b
commit 571ff8e328
6 changed files with 1174 additions and 714 deletions

View File

@@ -67,6 +67,8 @@ public:
this->theme = "default";
this->textEditorOpenFolder = "";
this->textEditorGotoLine = "";
this->paletteEditorBitDepth = 24;
this->projectSettingsTab = 0;
}
void setRecentProject(QString project);
void setReopenOnLaunch(bool enabled);
@@ -91,6 +93,7 @@ public:
void setTextEditorOpenFolder(const QString &command);
void setTextEditorGotoLine(const QString &command);
void setPaletteEditorBitDepth(int bitDepth);
void setProjectSettingsTab(int tab);
QString getRecentProject();
bool getReopenOnLaunch();
MapSortOrder getMapSortOrder();
@@ -114,6 +117,7 @@ public:
QString getTextEditorOpenFolder();
QString getTextEditorGotoLine();
int getPaletteEditorBitDepth();
int getProjectSettingsTab();
protected:
virtual QString getConfigFilepath() override;
virtual void parseConfigKeyValue(QString key, QString value) override;
@@ -155,6 +159,7 @@ private:
QString textEditorOpenFolder;
QString textEditorGotoLine;
int paletteEditorBitDepth;
int projectSettingsTab;
};
extern PorymapConfig porymapConfig;

View File

@@ -48,13 +48,16 @@ private:
void createProjectPathsTable();
QString chooseProjectFile(const QString &defaultFilepath);
void choosePrefabsFile();
void chooseImageFile(QLineEdit * filepathEdit);
void chooseFile(QLineEdit * filepathEdit, const QString &description, const QString &extensions);
private slots:
void dialogButtonClicked(QAbstractButton *button);
void choosePrefabsFileClicked(bool);
void importDefaultPrefabsClicked(bool);
void updateAttributeLimits(const QString &attrSize);
void markEdited();
void on_mainTabs_tabBarClicked(int index);
};
#endif // PROJECTSETTINGSEDITOR_H

View File

@@ -64,4 +64,15 @@ signals:
void textChanged(const QString &text);
};
class UIntHexSpinBox : public UIntSpinBox
{
Q_OBJECT
public:
UIntHexSpinBox(QWidget *parent = nullptr) : UIntSpinBox(parent) {
this->setPrefix("0x");
this->setDisplayIntegerBase(16);
this->setHasPadding(true);
}
};
#endif // UINTSPINBOX_H