summaryrefslogtreecommitdiffstats
path: root/gui/dialogs/DerpModEditDialog.h
diff options
context:
space:
mode:
Diffstat (limited to 'gui/dialogs/DerpModEditDialog.h')
-rw-r--r--gui/dialogs/DerpModEditDialog.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/gui/dialogs/DerpModEditDialog.h b/gui/dialogs/DerpModEditDialog.h
new file mode 100644
index 00000000..e9e61c65
--- /dev/null
+++ b/gui/dialogs/DerpModEditDialog.h
@@ -0,0 +1,67 @@
+/* Copyright 2013 MultiMC Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+#include <QDialog>
+
+#include <logic/DerpInstance.h>
+
+class EnabledItemFilter;
+namespace Ui
+{
+class DerpModEditDialog;
+}
+
+class DerpModEditDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ explicit DerpModEditDialog(DerpInstance *inst, QWidget *parent = 0);
+ virtual ~DerpModEditDialog();
+
+private
+slots:
+ void on_addModBtn_clicked();
+ void on_rmModBtn_clicked();
+ void on_viewModBtn_clicked();
+
+ void on_addResPackBtn_clicked();
+ void on_rmResPackBtn_clicked();
+ void on_viewResPackBtn_clicked();
+ // Questionable: SettingsDialog doesn't need this for some reason?
+ void on_buttonBox_rejected();
+ void on_forgeBtn_clicked();
+ void on_liteloaderBtn_clicked();
+ void on_customEditorBtn_clicked();
+ void updateVersionControls();
+ void disableVersionControls();
+
+protected:
+ bool eventFilter(QObject *obj, QEvent *ev);
+ bool loaderListFilter(QKeyEvent *ev);
+ bool resourcePackListFilter(QKeyEvent *ev);
+
+private:
+ Ui::DerpModEditDialog *ui;
+ std::shared_ptr<DerpVersion> m_version;
+ std::shared_ptr<ModList> m_mods;
+ std::shared_ptr<ModList> m_resourcepacks;
+ EnabledItemFilter *main_model;
+ DerpInstance *m_inst;
+public
+slots:
+ void loaderCurrent(QModelIndex current, QModelIndex previous);
+};