From 95febe543615c16d5b97cdd6f379c9a62102321d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Wed, 17 Jul 2019 02:01:29 +0200 Subject: [PATCH] NOISSUE convert rest of the instance pages to use toolbars for side menus --- application/InstancePageProvider.h | 4 +- application/pages/instance/ModFolderPage.cpp | 6 + application/pages/instance/ModFolderPage.ui | 1 - .../pages/instance/ScreenshotsPage.cpp | 23 +- application/pages/instance/ScreenshotsPage.h | 16 +- application/pages/instance/ScreenshotsPage.ui | 158 ++++----- application/pages/instance/ServersPage.cpp | 27 +- application/pages/instance/ServersPage.h | 17 +- application/pages/instance/ServersPage.ui | 331 +++++++++--------- application/pages/instance/VersionPage.cpp | 20 +- application/pages/instance/WorldListPage.cpp | 57 +-- application/pages/instance/WorldListPage.h | 41 ++- application/pages/instance/WorldListPage.ui | 274 +++++++-------- 13 files changed, 460 insertions(+), 515 deletions(-) diff --git a/application/InstancePageProvider.h b/application/InstancePageProvider.h index 450d3955..dde36aef 100644 --- a/application/InstancePageProvider.h +++ b/application/InstancePageProvider.h @@ -45,7 +45,7 @@ public: values.append(new ResourcePackPage(onesix.get())); values.append(new TexturePackPage(onesix.get())); values.append(new NotesPage(onesix.get())); - values.append(new WorldListPage(onesix.get(), onesix->worldList(), "worlds", "worlds", tr("Worlds"), "Worlds")); + values.append(new WorldListPage(onesix.get(), onesix->worldList())); values.append(new ServersPage(onesix.get())); // values.append(new GameOptionsPage(onesix.get())); values.append(new ScreenshotsPage(FS::PathCombine(onesix->gameRoot(), "screenshots"))); @@ -56,7 +56,7 @@ public: { values.append(new LegacyUpgradePage(legacy)); values.append(new NotesPage(legacy.get())); - values.append(new WorldListPage(legacy.get(), legacy->worldList(), "worlds", "worlds", tr("Worlds"), "Worlds")); + values.append(new WorldListPage(legacy.get(), legacy->worldList())); values.append(new ScreenshotsPage(FS::PathCombine(legacy->gameRoot(), "screenshots"))); } auto logMatcher = inst->getLogFileMatcher(); diff --git a/application/pages/instance/ModFolderPage.cpp b/application/pages/instance/ModFolderPage.cpp index f70166e4..bd070b94 100644 --- a/application/pages/instance/ModFolderPage.cpp +++ b/application/pages/instance/ModFolderPage.cpp @@ -38,6 +38,12 @@ ModFolderPage::ModFolderPage(BaseInstance *inst, std::shared_ptr : QMainWindow(parent), ui(new Ui::ModFolderPage) { ui->setupUi(this); + + QWidget* spacer = new QWidget(); + spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + // toolBar is a pointer to an existing toolbar + ui->actionsToolbar->insertWidget(ui->actionView_configs, spacer); + m_inst = inst; on_RunningState_changed(m_inst && m_inst->isRunning()); m_mods = mods; diff --git a/application/pages/instance/ModFolderPage.ui b/application/pages/instance/ModFolderPage.ui index 7f371100..1fcaa4d9 100644 --- a/application/pages/instance/ModFolderPage.ui +++ b/application/pages/instance/ModFolderPage.ui @@ -96,7 +96,6 @@ - diff --git a/application/pages/instance/ScreenshotsPage.cpp b/application/pages/instance/ScreenshotsPage.cpp index e61bf5c1..0c00d1c4 100644 --- a/application/pages/instance/ScreenshotsPage.cpp +++ b/application/pages/instance/ScreenshotsPage.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include @@ -209,7 +210,7 @@ public: }; ScreenshotsPage::ScreenshotsPage(QString path, QWidget *parent) - : QWidget(parent), ui(new Ui::ScreenshotsPage) + : QMainWindow(parent), ui(new Ui::ScreenshotsPage) { m_model.reset(new QFileSystemModel()); m_filterModel.reset(new FilterModel()); @@ -222,7 +223,6 @@ ScreenshotsPage::ScreenshotsPage(QString path, QWidget *parent) m_valid = FS::ensureFolderPathExists(m_folder); ui->setupUi(this); - ui->tabWidget->tabBar()->hide(); ui->listView->setIconSize(QSize(128, 128)); ui->listView->setGridSize(QSize(192, 160)); ui->listView->setSpacing(9); @@ -248,10 +248,10 @@ bool ScreenshotsPage::eventFilter(QObject *obj, QEvent *evt) switch (keyEvent->key()) { case Qt::Key_Delete: - on_deleteBtn_clicked(); + on_actionDelete_triggered(); return true; case Qt::Key_F2: - on_renameBtn_clicked(); + on_actionRename_triggered(); return true; default: break; @@ -264,6 +264,13 @@ ScreenshotsPage::~ScreenshotsPage() delete ui; } +QMenu * ScreenshotsPage::createPopupMenu() +{ + QMenu* filteredMenu = QMainWindow::createPopupMenu(); + filteredMenu->removeAction( ui->toolBar->toggleViewAction() ); + return filteredMenu; +} + void ScreenshotsPage::onItemActivated(QModelIndex index) { if (!index.isValid()) @@ -273,12 +280,12 @@ void ScreenshotsPage::onItemActivated(QModelIndex index) DesktopServices::openFile(info.absoluteFilePath()); } -void ScreenshotsPage::on_viewFolderBtn_clicked() +void ScreenshotsPage::on_actionView_Folder_triggered() { DesktopServices::openDirectory(m_folder, true); } -void ScreenshotsPage::on_uploadBtn_clicked() +void ScreenshotsPage::on_actionUpload_triggered() { auto selection = ui->listView->selectionModel()->selectedRows(); if (selection.isEmpty()) @@ -353,7 +360,7 @@ void ScreenshotsPage::on_uploadBtn_clicked() m_uploadActive = false; } -void ScreenshotsPage::on_deleteBtn_clicked() +void ScreenshotsPage::on_actionDelete_triggered() { auto mbox = CustomMessageBox::selectable( this, tr("Are you sure?"), tr("This will delete all selected screenshots."), @@ -370,7 +377,7 @@ void ScreenshotsPage::on_deleteBtn_clicked() } } -void ScreenshotsPage::on_renameBtn_clicked() +void ScreenshotsPage::on_actionRename_triggered() { auto selection = ui->listView->selectionModel()->selectedIndexes(); if (selection.isEmpty()) diff --git a/application/pages/instance/ScreenshotsPage.h b/application/pages/instance/ScreenshotsPage.h index 928f134c..22ead49a 100644 --- a/application/pages/instance/ScreenshotsPage.h +++ b/application/pages/instance/ScreenshotsPage.h @@ -15,7 +15,7 @@ #pragma once -#include +#include #include "pages/BasePage.h" #include @@ -31,7 +31,7 @@ struct ScreenShot; class ScreenshotList; class ImgurAlbumCreation; -class ScreenshotsPage : public QWidget, public BasePage +class ScreenshotsPage : public QMainWindow, public BasePage { Q_OBJECT @@ -67,11 +67,15 @@ public: { return !m_uploadActive; } + +protected: + QMenu * createPopupMenu() override; + private slots: - void on_uploadBtn_clicked(); - void on_deleteBtn_clicked(); - void on_renameBtn_clicked(); - void on_viewFolderBtn_clicked(); + void on_actionUpload_triggered(); + void on_actionDelete_triggered(); + void on_actionRename_triggered(); + void on_actionView_Folder_triggered(); void onItemActivated(QModelIndex); private: diff --git a/application/pages/instance/ScreenshotsPage.ui b/application/pages/instance/ScreenshotsPage.ui index d05c4384..a669e292 100644 --- a/application/pages/instance/ScreenshotsPage.ui +++ b/application/pages/instance/ScreenshotsPage.ui @@ -1,106 +1,80 @@ ScreenshotsPage - + 0 0 - 723 - 532 + 800 + 600 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - 0 - - - - Tab 1 - - - - - - QAbstractItemView::ExtendedSelection - - - QAbstractItemView::SelectRows - - - - - - - - - &Upload - - - - - - - &Delete - - - - - - - &Rename - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - &View Folder - - - - - - + + MainWindow + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + QAbstractItemView::ExtendedSelection + + + QAbstractItemView::SelectRows + - - - + + + + + + toolBar + + + RightToolBarArea + + + false + + + + + + + + + Upload + + + + + Delete + + + + + Rename + + + + + View Folder + + - - listView - uploadBtn - deleteBtn - renameBtn - viewFolderBtn - diff --git a/application/pages/instance/ServersPage.cpp b/application/pages/instance/ServersPage.cpp index eb4757ac..44ede664 100644 --- a/application/pages/instance/ServersPage.cpp +++ b/application/pages/instance/ServersPage.cpp @@ -11,6 +11,7 @@ #include #include +#include static const int COLUMN_COUNT = 2; // 3 , TBD: latency and other nice things. @@ -556,10 +557,9 @@ private: }; ServersPage::ServersPage(MinecraftInstance * inst, QWidget* parent) - : QWidget(parent), ui(new Ui::ServersPage) + : QMainWindow(parent), ui(new Ui::ServersPage) { ui->setupUi(this); - ui->tabWidget->tabBar()->hide(); m_inst = inst; m_model = new ServersModel(inst->gameRoot(), this); ui->serversView->setIconSize(QSize(64,64)); @@ -596,6 +596,13 @@ ServersPage::~ServersPage() m_model->saveNow(); } +QMenu * ServersPage::createPopupMenu() +{ + QMenu* filteredMenu = QMainWindow::createPopupMenu(); + filteredMenu->removeAction( ui->toolBar->toggleViewAction() ); + return filteredMenu; +} + void ServersPage::on_RunningState_changed(bool running) { if(m_locked == running) @@ -674,9 +681,9 @@ void ServersPage::updateState() ui->addressLine->setEnabled(serverEditEnabled); ui->nameLine->setEnabled(serverEditEnabled); ui->resourceComboBox->setEnabled(serverEditEnabled); - ui->moveDownBtn->setEnabled(serverEditEnabled); - ui->moveUpBtn->setEnabled(serverEditEnabled); - ui->removeBtn->setEnabled(serverEditEnabled); + ui->actionMove_Down->setEnabled(serverEditEnabled); + ui->actionMove_Up->setEnabled(serverEditEnabled); + ui->actionRemove->setEnabled(serverEditEnabled); if(server) { @@ -691,7 +698,7 @@ void ServersPage::updateState() ui->resourceComboBox->setCurrentIndex(0); } - ui->addBtn->setDisabled(m_locked); + ui->actionAdd->setDisabled(m_locked); } void ServersPage::openedImpl() @@ -704,7 +711,7 @@ void ServersPage::closedImpl() m_model->unobserve(); } -void ServersPage::on_addBtn_clicked() +void ServersPage::on_actionAdd_triggered() { int position = m_model->addEmptyRow(currentServer + 1); if(position < 0) @@ -719,12 +726,12 @@ void ServersPage::on_addBtn_clicked() currentServer = position; } -void ServersPage::on_removeBtn_clicked() +void ServersPage::on_actionRemove_triggered() { m_model->removeRow(currentServer); } -void ServersPage::on_moveUpBtn_clicked() +void ServersPage::on_actionMove_Up_triggered() { if(m_model->moveUp(currentServer)) { @@ -732,7 +739,7 @@ void ServersPage::on_moveUpBtn_clicked() } } -void ServersPage::on_moveDownBtn_clicked() +void ServersPage::on_actionMove_Down_triggered() { if(m_model->moveDown(currentServer)) { diff --git a/application/pages/instance/ServersPage.h b/application/pages/instance/ServersPage.h index 96356002..9c9cc388 100644 --- a/application/pages/instance/ServersPage.h +++ b/application/pages/instance/ServersPage.h @@ -15,7 +15,7 @@ #pragma once -#include +#include #include #include "pages/BasePage.h" @@ -30,7 +30,7 @@ struct Server; class ServersModel; class MinecraftInstance; -class ServersPage : public QWidget, public BasePage +class ServersPage : public QMainWindow, public BasePage { Q_OBJECT @@ -57,6 +57,10 @@ public: { return "Servers-management"; } + +protected: + QMenu * createPopupMenu() override; + private: void updateState(); void scheduleSave(); @@ -66,10 +70,11 @@ private slots: void currentChanged(const QModelIndex ¤t, const QModelIndex &previous); void rowsRemoved(const QModelIndex &parent, int first, int last); - void on_addBtn_clicked(); - void on_removeBtn_clicked(); - void on_moveUpBtn_clicked(); - void on_moveDownBtn_clicked(); + void on_actionAdd_triggered(); + void on_actionRemove_triggered(); + void on_actionMove_Up_triggered(); + void on_actionMove_Down_triggered(); + void on_RunningState_changed(bool running); void nameEdited(const QString & name); diff --git a/application/pages/instance/ServersPage.ui b/application/pages/instance/ServersPage.ui index faa918f4..5023cd73 100644 --- a/application/pages/instance/ServersPage.ui +++ b/application/pages/instance/ServersPage.ui @@ -1,198 +1,183 @@ ServersPage - + 0 0 - 706 - 575 + 1318 + 879 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - 0 - - + + MainWindow + + + + + 0 + + + 0 + + + 0 + + + 0 + + + - + 0 0 - - Tab 1 + + true + + + true + + + QAbstractItemView::SingleSelection + + + QAbstractItemView::SelectRows + + + + 64 + 64 + + + + false + + + false - - - - - - - - Ask to download - - - - - Always download - - - - - Never download - - - - - - - - Reso&urces - - - resourceComboBox - - - - - - - - - - &Name - - - nameLine - - - - - - - - - - Address - - - addressLine - - - - - - - - 0 - 0 - - - - true - - - true - - - QAbstractItemView::SingleSelection - - - QAbstractItemView::SelectRows - - - - 64 - 64 - - - - false - - - false - - - - - - - - - - - &Add - - - - - - - &Remove - - - - - - - Move Up - - - - - - - Move Down - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - + + + + + 6 + + + 6 + + + + + &Name + + + nameLine + + + + + + + + + + Address + + + addressLine + + + + + + + + + + Reso&urces + + + resourceComboBox + + + + + + + + Ask to download + + + + + Always download + + + + + Never download + + + + + + + + + + + toolBar + + + Qt::LeftToolBarArea|Qt::RightToolBarArea + + + Qt::ToolButtonTextOnly + + + false + + + RightToolBarArea + + + false + + + + + + + + + Add + + + + + Remove + + + + + Move Up + + + + + Move Down + + - tabWidget serversView nameLine addressLine resourceComboBox - addBtn - removeBtn - moveUpBtn - moveDownBtn diff --git a/application/pages/instance/VersionPage.cpp b/application/pages/instance/VersionPage.cpp index 4195f416..a34f564c 100644 --- a/application/pages/instance/VersionPage.cpp +++ b/application/pages/instance/VersionPage.cpp @@ -111,23 +111,11 @@ VersionPage::VersionPage(MinecraftInstance *inst, QWidget *parent) : QMainWindow(parent), ui(new Ui::VersionPage), m_inst(inst) { ui->setupUi(this); -/* - auto labelSelection = new QLabel(tr("Selection")); - labelSelection->setAlignment(Qt::AlignHCenter); - ui->toolBar->insertWidget(ui->actionChange_version, labelSelection); - auto labelEdit = new QLabel(tr("Edit")); - labelEdit->setAlignment(Qt::AlignHCenter); - ui->toolBar->insertWidget(ui->actionCustomize, labelEdit); - - auto labelInstall = new QLabel(tr("Install")); - labelInstall->setAlignment(Qt::AlignHCenter); - ui->toolBar->insertWidget(ui->actionInstall_Forge, labelInstall); - - auto labelAdvanced = new QLabel(tr("Advanced")); - labelAdvanced->setAlignment(Qt::AlignHCenter); - ui->toolBar->insertWidget(ui->actionAdd_to_Minecraft_jar, labelAdvanced); -*/ + QWidget* spacer = new QWidget(); + spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + // toolBar is a pointer to an existing toolbar + ui->toolBar->insertWidget(ui->actionReload, spacer); m_profile = m_inst->getComponentList(); diff --git a/application/pages/instance/WorldListPage.cpp b/application/pages/instance/WorldListPage.cpp index be72af22..bd559991 100644 --- a/application/pages/instance/WorldListPage.cpp +++ b/application/pages/instance/WorldListPage.cpp @@ -19,6 +19,7 @@ #include #include "dialogs/ModEditDialogCommon.h" #include +#include #include #include #include @@ -31,13 +32,16 @@ #include #include -WorldListPage::WorldListPage(BaseInstance *inst, std::shared_ptr worlds, QString id, - QString iconName, QString displayName, QString helpPage, - QWidget *parent) - : QWidget(parent), m_inst(inst), ui(new Ui::WorldListPage), m_worlds(worlds), m_iconName(iconName), m_id(id), m_displayName(displayName), m_helpName(helpPage) +WorldListPage::WorldListPage(BaseInstance *inst, std::shared_ptr worlds, QWidget *parent) + : QMainWindow(parent), m_inst(inst), ui(new Ui::WorldListPage), m_worlds(worlds) { ui->setupUi(this); - ui->tabWidget->tabBar()->hide(); + + QWidget* spacer = new QWidget(); + spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + // toolBar is a pointer to an existing toolbar + ui->toolBar->insertWidget(ui->actionRefresh, spacer); + QSortFilterProxyModel * proxy = new QSortFilterProxyModel(this); proxy->setSortCaseSensitivity(Qt::CaseInsensitive); proxy->setSourceModel(m_worlds.get()); @@ -46,12 +50,10 @@ WorldListPage::WorldListPage(BaseInstance *inst, std::shared_ptr worl ui->worldTreeView->installEventFilter(this); auto head = ui->worldTreeView->header(); - head->setSectionResizeMode(0, QHeaderView::Stretch); head->setSectionResizeMode(1, QHeaderView::ResizeToContents); - connect(ui->worldTreeView->selectionModel(), - SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)), this, - SLOT(worldChanged(const QModelIndex &, const QModelIndex &))); + + connect(ui->worldTreeView->selectionModel(), &QItemSelectionModel::currentChanged, this, &WorldListPage::worldChanged); worldChanged(QModelIndex(), QModelIndex()); } @@ -71,6 +73,13 @@ WorldListPage::~WorldListPage() delete ui; } +QMenu * WorldListPage::createPopupMenu() +{ + QMenu* filteredMenu = QMainWindow::createPopupMenu(); + filteredMenu->removeAction( ui->toolBar->toggleViewAction() ); + return filteredMenu; +} + bool WorldListPage::shouldDisplay() const { return true; @@ -81,7 +90,7 @@ bool WorldListPage::worldListFilter(QKeyEvent *keyEvent) switch (keyEvent->key()) { case Qt::Key_Delete: - on_rmWorldBtn_clicked(); + on_actionRemove_triggered(); return true; default: break; @@ -101,7 +110,7 @@ bool WorldListPage::eventFilter(QObject *obj, QEvent *ev) return QWidget::eventFilter(obj, ev); } -void WorldListPage::on_rmWorldBtn_clicked() +void WorldListPage::on_actionRemove_triggered() { auto proxiedIndex = getSelectedWorld(); @@ -123,7 +132,7 @@ void WorldListPage::on_rmWorldBtn_clicked() m_worlds->startWatching(); } -void WorldListPage::on_viewFolderBtn_clicked() +void WorldListPage::on_actionView_Folder_triggered() { DesktopServices::openDirectory(m_worlds->dir().absolutePath(), true); } @@ -136,7 +145,7 @@ QModelIndex WorldListPage::getSelectedWorld() return proxy->mapToSource(index); } -void WorldListPage::on_copySeedBtn_clicked() +void WorldListPage::on_actionCopy_Seed_triggered() { QModelIndex index = getSelectedWorld(); @@ -148,7 +157,7 @@ void WorldListPage::on_copySeedBtn_clicked() MMC->clipboard()->setText(QString::number(seed)); } -void WorldListPage::on_mcEditBtn_clicked() +void WorldListPage::on_actionMCEdit_triggered() { if(m_mceditStarting) return; @@ -236,17 +245,17 @@ void WorldListPage::worldChanged(const QModelIndex ¤t, const QModelIndex & { QModelIndex index = getSelectedWorld(); bool enable = index.isValid(); - ui->copySeedBtn->setEnabled(enable); - ui->mcEditBtn->setEnabled(enable); - ui->rmWorldBtn->setEnabled(enable); - ui->copyBtn->setEnabled(enable); - ui->renameBtn->setEnabled(enable); + ui->actionCopy_Seed->setEnabled(enable); + ui->actionMCEdit->setEnabled(enable); + ui->actionRemove->setEnabled(enable); + ui->actionCopy->setEnabled(enable); + ui->actionRename->setEnabled(enable); } -void WorldListPage::on_addBtn_clicked() +void WorldListPage::on_actionAdd_triggered() { auto list = GuiUtil::BrowseForFiles( - m_helpName, + displayName(), tr("Select a Minecraft world zip"), tr("Minecraft World Zip File (*.zip)"), QString(), this->parentWidget()); if (!list.empty()) @@ -279,7 +288,7 @@ bool WorldListPage::worldSafetyNagQuestion() } -void WorldListPage::on_copyBtn_clicked() +void WorldListPage::on_actionCopy_triggered() { QModelIndex index = getSelectedWorld(); if (!index.isValid()) @@ -301,7 +310,7 @@ void WorldListPage::on_copyBtn_clicked() } } -void WorldListPage::on_renameBtn_clicked() +void WorldListPage::on_actionRename_triggered() { QModelIndex index = getSelectedWorld(); if (!index.isValid()) @@ -324,7 +333,7 @@ void WorldListPage::on_renameBtn_clicked() } } -void WorldListPage::on_refreshBtn_clicked() +void WorldListPage::on_actionRefresh_triggered() { m_worlds->update(); } diff --git a/application/pages/instance/WorldListPage.h b/application/pages/instance/WorldListPage.h index 15f98119..d07f8d9f 100644 --- a/application/pages/instance/WorldListPage.h +++ b/application/pages/instance/WorldListPage.h @@ -15,7 +15,7 @@ #pragma once -#include +#include #include "minecraft/MinecraftInstance.h" #include "pages/BasePage.h" @@ -28,31 +28,33 @@ namespace Ui class WorldListPage; } -class WorldListPage : public QWidget, public BasePage +class WorldListPage : public QMainWindow, public BasePage { Q_OBJECT public: - explicit WorldListPage(BaseInstance *inst, std::shared_ptr worlds, QString id, - QString iconName, QString displayName, QString helpPage = "", - QWidget *parent = 0); + explicit WorldListPage( + BaseInstance *inst, + std::shared_ptr worlds, + QWidget *parent = 0 + ); virtual ~WorldListPage(); virtual QString displayName() const override { - return m_displayName; + return tr("Worlds"); } virtual QIcon icon() const override { - return MMC->getThemedIcon(m_iconName); + return MMC->getThemedIcon("worlds"); } virtual QString id() const override { - return m_id; + return "worlds"; } virtual QString helpPage() const override { - return m_helpName; + return "Worlds"; } virtual bool shouldDisplay() const override; @@ -62,6 +64,7 @@ public: protected: bool eventFilter(QObject *obj, QEvent *ev) override; bool worldListFilter(QKeyEvent *ev); + QMenu * createPopupMenu() override; protected: BaseInstance *m_inst; @@ -77,20 +80,16 @@ private: std::shared_ptr m_worlds; unique_qobject_ptr m_mceditProcess; bool m_mceditStarting = false; - QString m_iconName; - QString m_id; - QString m_displayName; - QString m_helpName; private slots: - void on_copySeedBtn_clicked(); - void on_mcEditBtn_clicked(); - void on_rmWorldBtn_clicked(); - void on_addBtn_clicked(); - void on_copyBtn_clicked(); - void on_renameBtn_clicked(); - void on_refreshBtn_clicked(); - void on_viewFolderBtn_clicked(); + void on_actionCopy_Seed_triggered(); + void on_actionMCEdit_triggered(); + void on_actionRemove_triggered(); + void on_actionAdd_triggered(); + void on_actionCopy_triggered(); + void on_actionRename_triggered(); + void on_actionRefresh_triggered(); + void on_actionView_Folder_triggered(); void worldChanged(const QModelIndex ¤t, const QModelIndex &previous); void mceditState(LoggedProcess::State state); }; diff --git a/application/pages/instance/WorldListPage.ui b/application/pages/instance/WorldListPage.ui index bc104854..37721ae0 100644 --- a/application/pages/instance/WorldListPage.ui +++ b/application/pages/instance/WorldListPage.ui @@ -1,171 +1,133 @@ WorldListPage - + 0 0 - 723 - 532 + 800 + 600 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - 0 - - - - Tab 1 + + MainWindow + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + true + + + QAbstractItemView::DragDrop + + + true + + + true + + + true + + + false - - - - - - - Add - - - - - - - - - - Rename - - - - - - - Copy - - - - - - - &Remove - - - - - - - MCEdit - - - - - - - - - - Copy Seed - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Refresh - - - - - - - &View Folder - - - - - - - - - - 0 - 0 - - - - true - - - QAbstractItemView::DragDrop - - - true - - - true - - - true - - - false - - - - - - - + + + + + + toolBar + + + Qt::LeftToolBarArea|Qt::RightToolBarArea + + + Qt::ToolButtonTextOnly + + + false + + + RightToolBarArea + + + false + + + + + + + + + + + + + + + Add + + + + + Rename + + + + + Copy + + + + + Remove + + + + + MCEdit + + + + + Copy Seed + + + + + Refresh + + + + + View Folder + + - - - LineSeparator - QWidget -
widgets/LineSeparator.h
- 1 -
-
- - tabWidget - worldTreeView - addBtn - renameBtn - copyBtn - rmWorldBtn - mcEditBtn - copySeedBtn - refreshBtn - viewFolderBtn -