From 743af4769ee59b5830d79139852dda0679b28a03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 17 May 2015 23:38:28 +0200 Subject: GH-952 Hardcore version page tweakery Version patches get a lot of new flags that determine which actions are allowed Version page respects the flags Customize, revert and edit for version patches Builting patches can be customized --- application/pages/VersionPage.h | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'application/pages/VersionPage.h') diff --git a/application/pages/VersionPage.h b/application/pages/VersionPage.h index 0965edeb..45732b25 100644 --- a/application/pages/VersionPage.h +++ b/application/pages/VersionPage.h @@ -46,22 +46,29 @@ public: return "Instance-version"; } virtual bool shouldDisplay() const; -private -slots: - // version tab +private slots: void on_forgeBtn_clicked(); void on_liteloaderBtn_clicked(); - void on_reloadLibrariesBtn_clicked(); - void on_removeLibraryBtn_clicked(); - void on_resetLibraryOrderBtn_clicked(); - void on_moveLibraryUpBtn_clicked(); - void on_moveLibraryDownBtn_clicked(); + void on_reloadBtn_clicked(); + void on_removeBtn_clicked(); + void on_resetOrderBtn_clicked(); + void on_moveUpBtn_clicked(); + void on_moveDownBtn_clicked(); void on_jarmodBtn_clicked(); + void on_revertBtn_clicked(); + void on_editBtn_clicked(); + void on_customizeBtn_clicked(); void updateVersionControls(); void disableVersionControls(); - void on_changeMCVersionBtn_clicked(); + void on_changeVersionBtn_clicked(); + +private: + ProfilePatchPtr current(); + int currentRow(); + void updateButtons(int row = -1); + void preselect(int row = 0); protected: /// FIXME: this shouldn't be necessary! @@ -71,9 +78,9 @@ private: Ui::VersionPage *ui; std::shared_ptr m_version; OneSixInstance *m_inst; + int currentIdx = 0; -public -slots: +public slots: void versionCurrent(const QModelIndex ¤t, const QModelIndex &previous); private slots: -- cgit v1.2.3