From 44498f98945b7501486da35c5fdc32f94a2be080 Mon Sep 17 00:00:00 2001 From: TakSuyu Date: Sat, 27 Jul 2013 12:42:32 -0700 Subject: Renamed some files to support naming scheme changed modeditwindow -> legacymodeditdialog added modeditdialog mapped slots for modeditdialog --- CMakeLists.txt | 9 +- gui/legacymodeditdialog.cpp | 35 ++++++ gui/legacymodeditdialog.h | 62 ++++++++++ gui/legacymodeditdialog.ui | 281 ++++++++++++++++++++++++++++++++++++++++++++ gui/mainwindow.cpp | 5 +- gui/modeditdialog.cpp | 35 ++++++ gui/modeditdialog.h | 52 ++++++++ gui/modeditdialog.ui | 167 ++++++++++++++++++++++++++ gui/modeditwindow.h | 62 ---------- gui/newmodeditwindow.ui | 159 +++++++++++++++++++++++++ 10 files changed, 800 insertions(+), 67 deletions(-) create mode 100644 gui/legacymodeditdialog.cpp create mode 100644 gui/legacymodeditdialog.h create mode 100644 gui/legacymodeditdialog.ui create mode 100644 gui/modeditdialog.cpp create mode 100644 gui/modeditdialog.h create mode 100644 gui/modeditdialog.ui create mode 100644 gui/newmodeditwindow.ui diff --git a/CMakeLists.txt b/CMakeLists.txt index e0a2123e..afcc9587 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -162,7 +162,8 @@ ADD_DEFINITIONS(-DQUAZIP_STATIC) ######## Headers ######## SET(MULTIMC_HEADERS gui/mainwindow.h -gui/modeditwindow.h +gui/modeditdialog.h +gui/legacymodeditdialog.h gui/settingsdialog.h gui/newinstancedialog.h gui/logindialog.h @@ -193,7 +194,8 @@ SET(MULTIMC_SOURCES main.cpp gui/mainwindow.cpp -gui/modeditwindow.cpp +gui/modeditdialog.cpp +gui/legacymodeditdialog.cpp gui/settingsdialog.cpp gui/newinstancedialog.cpp gui/logindialog.cpp @@ -215,7 +217,8 @@ java/annotations.cpp ######## UIs ######## SET(MULTIMC_UIS gui/mainwindow.ui -gui/modeditwindow.ui +gui/modeditdialog.ui +gui/legacymodeditdialog.ui gui/settingsdialog.ui gui/newinstancedialog.ui gui/logindialog.ui diff --git a/gui/legacymodeditdialog.cpp b/gui/legacymodeditdialog.cpp new file mode 100644 index 00000000..83d36218 --- /dev/null +++ b/gui/legacymodeditdialog.cpp @@ -0,0 +1,35 @@ +/* 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. + */ + +#include "legacymodeditdialog.h" +#include "ui_legacymodeditdialog.h" +#include "instance.h" + +LegacyModEditDialog::LegacyModEditDialog(QWidget *parent, Instance* m_inst) : + QDialog(parent), + ui(new Ui::LegacyModEditDialog) +{ + ui->setupUi(this); +} + +LegacyModEditDialog::~LegacyModEditDialog() +{ + delete ui; +} + +void LegacyModEditDialog::on_buttonBox_rejected() +{ + close(); +} \ No newline at end of file diff --git a/gui/legacymodeditdialog.h b/gui/legacymodeditdialog.h new file mode 100644 index 00000000..5310f769 --- /dev/null +++ b/gui/legacymodeditdialog.h @@ -0,0 +1,62 @@ +/* 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. + */ + +#ifndef LEGACYMODEDITDIALOG_H +#define LEGACYMODEDITDIALOG_H + +#include + +#include "instance.h" + +namespace Ui { +class LegacyModEditDialog; +} + +class LegacyModEditDialog : public QDialog +{ + Q_OBJECT + +public: + explicit LegacyModEditDialog(QWidget *parent = 0, Instance* m_inst = 0); + ~LegacyModEditDialog(); + +private slots: + /* Mapped for implementation + void on_addJarBtn_clicked(); + void on_rmJarBtn_clicked(); + void on_addForgeBtn_clicked(); + void on_moveJarUpBtn_clicked(); + void on_moveJarDownBtn_clicked(); + + void on_addCoreBtn_clicked(); + void on_rmCoreBtn_clicked(); + void on_viewCoreBtn_clicked(); + + void on_addModBtn_clicked(); + void on_rmModBtn_clicked(); + void on_viewModBtn_clicked(); + + void on_addTexPackBtn_clicked(); + void on_rmTexPackBtn_clicked(); + void on_viewTexPackBtn_clicked(); + */ + // Questionable: SettingsDialog doesn't need this for some reason? + void on_buttonBox_rejected(); + +private: + Ui::LegacyModEditDialog *ui; +}; + +#endif // LEGACYMODEDITDIALOG_H diff --git a/gui/legacymodeditdialog.ui b/gui/legacymodeditdialog.ui new file mode 100644 index 00000000..d8b09bfe --- /dev/null +++ b/gui/legacymodeditdialog.ui @@ -0,0 +1,281 @@ + + + LegacyModEditDialog + + + + 0 + 0 + 540 + 420 + + + + Dialog + + + + + + false + + + 3 + + + + Jar Mods + + + + + + true + + + QAbstractItemView::DropOnly + + + + + + + + + &Add + + + + + + + &Remove + + + + + + + MCForge + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Move &Up + + + + + + + Move &Down + + + + + + + + + + Core Mods + + + + + + true + + + QAbstractItemView::DropOnly + + + + + + + + + &Add + + + + + + + &Remove + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + &View Folder + + + + + + + + + + Mods + + + + + + true + + + QAbstractItemView::DropOnly + + + + + + + + + &Add + + + + + + + &Remove + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + &View Folder + + + + + + + + + + false + + + Texture Packs + + + + + + true + + + false + + + QAbstractItemView::DropOnly + + + Qt::IgnoreAction + + + + + + + + + &Add + + + + + + + &Remove + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + &View Folder + + + + + + + + + + + + + QDialogButtonBox::Close + + + + + + + + diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 5336b12c..80f737e3 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -42,7 +42,7 @@ #include "gui/versionselectdialog.h" #include "gui/lwjglselectdialog.h" #include "gui/consolewindow.h" -#include "gui/modeditwindow.h" +#include "gui/legacymodeditdialog.h" #include "kcategorizedview.h" #include "kcategorydrawer.h" @@ -335,10 +335,11 @@ void MainWindow::on_actionViewSelectedInstFolder_triggered() void MainWindow::on_actionEditInstMods_triggered() { + //TODO: Needs to do current ModEditDialog too Instance* inst = selectedInstance(); if (inst) { - ModEditWindow dialog ( this, inst ); + LegacyModEditDialog dialog ( this, inst ); dialog.exec(); } } diff --git a/gui/modeditdialog.cpp b/gui/modeditdialog.cpp new file mode 100644 index 00000000..945a5a91 --- /dev/null +++ b/gui/modeditdialog.cpp @@ -0,0 +1,35 @@ +/* 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. + */ + +#include "modeditdialog.h" +#include "ui_modeditdialog.h" +#include "instance.h" + +ModEditDialog::ModEditDialog(QWidget *parent, Instance* m_inst) : +QDialog(parent), +ui(new Ui::ModEditDialog) +{ + ui->setupUi(this); +} + +ModEditDialog::~ModEditDialog() +{ + delete ui; +} + +void ModEditDialog::on_buttonBox_rejected() +{ + close(); +} \ No newline at end of file diff --git a/gui/modeditdialog.h b/gui/modeditdialog.h new file mode 100644 index 00000000..648b9c08 --- /dev/null +++ b/gui/modeditdialog.h @@ -0,0 +1,52 @@ +/* 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. + */ + +#ifndef MODEDITDIALOG_H +#define MODEDITDIALOG_H + +#include + +#include "instance.h" + +namespace Ui { + class ModEditDialog; +} + +class ModEditDialog : public QDialog +{ + Q_OBJECT + +public: + explicit ModEditDialog(QWidget *parent = 0, Instance* m_inst = 0); + ~ModEditDialog(); + +private slots: + /* Mapped for implementation + 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(); + +private: + Ui::ModEditDialog *ui; +}; + +#endif // MODEDITDIALOG_H \ No newline at end of file diff --git a/gui/modeditdialog.ui b/gui/modeditdialog.ui new file mode 100644 index 00000000..380aec39 --- /dev/null +++ b/gui/modeditdialog.ui @@ -0,0 +1,167 @@ + + + ModEditDialog + + + + 0 + 0 + 543 + 423 + + + + Dialog + + + + + + true + + + + 0 + 0 + + + + 2 + + + Qt::ElideNone + + + false + + + + Library + + + + + + + + + + Mods + + + + + + true + + + + + + + + + &Add + + + + + + + &Remove + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + &View Folder + + + + + + + + + + Resource Pack + + + + + + true + + + + + + + + + &Add + + + + + + + &Remove + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + &View Folder + + + + + + + + + + + + + false + + + QDialogButtonBox::Close + + + + + + + + diff --git a/gui/modeditwindow.h b/gui/modeditwindow.h index 87b02938..e69de29b 100644 --- a/gui/modeditwindow.h +++ b/gui/modeditwindow.h @@ -1,62 +0,0 @@ -/* 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. - */ - -#ifndef MODEDITWINDOW_H -#define MODEDITWINDOW_H - -#include - -#include "instance.h" - -namespace Ui { -class ModEditWindow; -} - -class ModEditWindow : public QDialog -{ - Q_OBJECT - -public: - explicit ModEditWindow(QWidget *parent = 0, Instance* m_inst = 0); - ~ModEditWindow(); - -private slots: - /* Mapped for implementation - void on_addTPackButton_clicked(); - void on_delTPackButton_clicked(); - void on_viewTPackButton_clicked(); - - void on_addMlModButton_clicked(); - void on_delMlModButton_clicked(); - void on_viewMlModbutton_clicked(); - - void on_addCoreModButton_clicked(); - void on_delCoreModButton_clicked(); - void on_viewCoreModButton_clicked(); - - void on_addJarModButton_clicked(); - void on_delJarModButton_clicked(); - void on_mcforgeButton_clicked(); - void on_jarModMoveUpButton_clicked(); - void on_jarModMoveDownButton_clicked(); - */ - // Questionable: SettingsDialog doesn't need this for some reason? - void on_buttonBox_rejected(); - -private: - Ui::ModEditWindow *ui; -}; - -#endif // MODEDITWINDOW_H diff --git a/gui/newmodeditwindow.ui b/gui/newmodeditwindow.ui new file mode 100644 index 00000000..a7587d11 --- /dev/null +++ b/gui/newmodeditwindow.ui @@ -0,0 +1,159 @@ + + + Dialog + + + + 0 + 0 + 569 + 420 + + + + Dialog + + + + + + true + + + + 0 + 0 + + + + 2 + + + Qt::ElideNone + + + false + + + + Library + + + + + + + + + + Mods + + + + + + + + + + + &Add + + + + + + + &Remove + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + &View Folder + + + + + + + + + + Resource Pack + + + + + + + + + + + PushButton + + + + + + + PushButton + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + PushButton + + + + + + + + + + + + + false + + + QDialogButtonBox::Close + + + + + + + + -- cgit v1.2.3