mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-25 18:16:57 -05:00
Expose new settings, add tabs to settings editor
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user