diff options
| -rw-r--r-- | src/iuserinterface.h | 5 | ||||
| -rw-r--r-- | src/main.cpp | 2 | ||||
| -rw-r--r-- | src/mainwindow.cpp | 78 | ||||
| -rw-r--r-- | src/mainwindow.h | 15 | ||||
| -rw-r--r-- | src/mainwindow.ui | 2101 | ||||
| -rw-r--r-- | src/organizercore.cpp | 4 | ||||
| -rw-r--r-- | src/settings.cpp | 96 | ||||
| -rw-r--r-- | src/settings.h | 13 | ||||
| -rw-r--r-- | src/statusbar.cpp | 65 | ||||
| -rw-r--r-- | src/statusbar.h | 14 |
10 files changed, 1186 insertions, 1207 deletions
diff --git a/src/iuserinterface.h b/src/iuserinterface.h index 7205f982..a309ed9b 100644 --- a/src/iuserinterface.h +++ b/src/iuserinterface.h @@ -10,14 +10,9 @@ #include <QMenu>
-class Settings;
-
class IUserInterface
{
public:
-
- virtual void storeSettings(Settings &settings) = 0;
-
virtual void registerPluginTool(MOBase::IPluginTool *tool, QString name = QString(), QMenu *menu = nullptr) = 0;
virtual void registerPluginTools(std::vector<MOBase::IPluginTool *> toolPlugins) = 0;
virtual void registerModPage(MOBase::IPluginModPage *modPage) = 0;
diff --git a/src/main.cpp b/src/main.cpp index 6d4108fa..aa781c19 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -736,8 +736,6 @@ int runApplication(MOApplication &application, SingleInstance &instance, // this must be before readSettings(), see DockFixer in mainwindow.cpp splash.finish(&mainWindow); - mainWindow.readSettings(settings); - log::debug("displaying main window"); mainWindow.show(); mainWindow.activateWindow(); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 28e1de2e..7e471d24 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -285,8 +285,6 @@ MainWindow::MainWindow(Settings &settings : QMainWindow(parent) , ui(new Ui::MainWindow) , m_WasVisible(false) - , m_menuBarVisible(true) - , m_statusBarVisible(true) , m_linksSeparator(nullptr) , m_Tutorial(this, "MainWindow") , m_OldProfileIndex(-1) @@ -312,7 +310,7 @@ MainWindow::MainWindow(Settings &settings QWebEngineProfile::defaultProfile()->setPersistentStoragePath(settings.getCacheDirectory()); ui->setupUi(this); - m_statusBar.reset(new StatusBar(statusBar(), ui)); + ui->statusBar->setup(ui); { auto* ni = NexusInterface::instance(&m_PluginContainer); @@ -336,7 +334,7 @@ MainWindow::MainWindow(Settings &settings // in the rare case where the user restarts MO through the settings, this // will correctly pick up the previous values updateWindowTitle(ni->getAPIUserAccount()); - m_statusBar->setAPI(ni->getAPIStats(), ni->getAPIUserAccount()); + ui->statusBar->setAPI(ni->getAPIStats(), ni->getAPIUserAccount()); } languageChange(settings.language()); @@ -708,7 +706,7 @@ void MainWindow::updateWindowTitle(const APIUserAccount& user) void MainWindow::onRequestsChanged(const APIStats& stats, const APIUserAccount& user) { - m_statusBar->setAPI(stats, user); + ui->statusBar->setAPI(stats, user); } @@ -902,7 +900,7 @@ QMenu* MainWindow::createPopupMenu() void MainWindow::on_actionMainMenuToggle_triggered() { - showMenuBar(!ui->menuBar->isVisible()); + ui->menuBar->setVisible(!ui->menuBar->isVisible()); } void MainWindow::on_actionToolBarMainToggle_triggered() @@ -912,7 +910,7 @@ void MainWindow::on_actionToolBarMainToggle_triggered() void MainWindow::on_actionStatusBarToggle_triggered() { - showStatusBar(!ui->statusBar->isVisible()); + ui->statusBar->setVisible(!ui->statusBar->isVisible()); } void MainWindow::on_actionToolBarSmallIcons_triggered() @@ -964,36 +962,6 @@ void MainWindow::setToolbarButtonStyle(Qt::ToolButtonStyle s) } } -void MainWindow::showMenuBar(bool b) -{ - ui->menuBar->setVisible(b); - m_menuBarVisible = b; -} - -void MainWindow::showStatusBar(bool b) -{ - ui->statusBar->setVisible(b); - m_statusBarVisible = b; - - // the central widget typically has no bottom padding because the status bar - // is more than enough, but when it's hidden, the bottom widget (currently - // the log) touches the bottom border of the window, which looks ugly - // - // when hiding the statusbar, the central widget is given the same border - // margin as it has on the top (which is typically 6, as it's the default from - // the qt designer) - - auto m = ui->centralWidget->layout()->contentsMargins(); - - if (b) { - m.setBottom(0); - } else { - m.setBottom(m.top()); - } - - ui->centralWidget->layout()->setContentsMargins(m); -} - void MainWindow::on_centralWidget_customContextMenuRequested(const QPoint &pos) { // this allows for getting the context menu even if both the menubar and all @@ -1075,8 +1043,8 @@ void MainWindow::updateProblemsButton() } // updating the status bar, may be null very early when MO is starting - if (m_statusBar) { - m_statusBar->setNotifications(numProblems > 0); + if (ui->statusBar) { + ui->statusBar->setNotifications(numProblems > 0); } } @@ -1319,6 +1287,8 @@ void MainWindow::hookUpWindowTutorials() void MainWindow::showEvent(QShowEvent *event) { + readSettings(m_OrganizerCore.settings()); + refreshFilters(); QMainWindow::showEvent(event); @@ -1378,7 +1348,10 @@ void MainWindow::closeEvent(QCloseEvent* event) { if (!confirmExit()) { event->ignore(); + return; } + + storeSettings(m_OrganizerCore.settings()); } bool MainWindow::confirmExit() @@ -2259,17 +2232,12 @@ void MainWindow::readSettings(const Settings& settings) settings.geometry().restoreState(this); settings.geometry().restoreToolbars(this); settings.geometry().restoreState(ui->splitter); - - if (auto v=settings.geometry().getMenubarVisible()) { - showMenuBar(*v); - } - - if (auto v=settings.geometry().getStatusbarVisible()) { - showStatusBar(*v); - } + settings.geometry().restoreVisibility(ui->menuBar); + settings.geometry().restoreVisibility(ui->statusBar); { - auto v = settings.geometry().getFiltersVisible().value_or(false); + settings.geometry().restoreVisibility(ui->categoriesGroup, false); + const auto v = ui->categoriesGroup->isVisible(); setCategoryListVisible(v); ui->displayCategoriesBtn->setChecked(v); } @@ -2339,12 +2307,12 @@ void MainWindow::storeSettings(Settings& s) { s.geometry().saveState(this); s.geometry().saveGeometry(this); - s.geometry().setMenubarVisible(m_menuBarVisible); + s.geometry().saveVisibility(ui->menuBar); + s.geometry().saveVisibility(ui->statusBar); s.geometry().saveToolbars(this); - s.geometry().setStatusbarVisible(m_statusBarVisible); s.geometry().saveState(ui->splitter); s.geometry().saveMainWindowMonitor(this); - s.geometry().setFiltersVisible(ui->displayCategoriesBtn->isChecked()); + s.geometry().saveVisibility(ui->categoriesGroup); s.geometry().saveState(ui->espList->header()); s.geometry().saveState(ui->dataTree->header()); @@ -2606,7 +2574,7 @@ void MainWindow::setESPListSorting(int index) void MainWindow::refresher_progress(int percent) { setEnabled(percent == 100); - m_statusBar->setProgress(percent); + ui->statusBar->setProgress(percent); } void MainWindow::directory_refreshed() @@ -5216,7 +5184,7 @@ void MainWindow::on_actionSettings_triggered() activateProxy(settings.useProxy()); } - m_statusBar->checkSettings(m_OrganizerCore.settings()); + ui->statusBar->checkSettings(m_OrganizerCore.settings()); updateDownloadView(); m_OrganizerCore.setLogLevel(settings.logLevel()); @@ -5525,7 +5493,7 @@ void MainWindow::updateAvailable() { ui->actionUpdate->setEnabled(true); ui->actionUpdate->setToolTip(tr("Update available")); - m_statusBar->setUpdateAvailable(true); + ui->statusBar->setUpdateAvailable(true); } @@ -6858,7 +6826,7 @@ void MainWindow::keyReleaseEvent(QKeyEvent *event) // if the menubar is hidden, pressing Alt will make it visible if (event->key() == Qt::Key_Alt) { if (!ui->menuBar->isVisible()) { - showMenuBar(true); + ui->menuBar->show(); } } diff --git a/src/mainwindow.h b/src/mainwindow.h index 8542dc8a..a905a163 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -40,7 +40,6 @@ class Executable; class CategoryFactory; class LockedDialogBase; class OrganizerCore; -class StatusBar; class PluginListSortProxy; namespace BSA { class Archive; } @@ -118,8 +117,6 @@ public: QWidget *parent = 0); ~MainWindow(); - void storeSettings(Settings& settings) override; - void readSettings(const Settings& settings); void processUpdates(Settings& settings); virtual ILockedWaitingForProcess* lock() override; @@ -331,12 +328,6 @@ private: bool m_WasVisible; - // this has to be remembered because by the time storeSettings() is called, - // the window is closed and the all bars are hidden - bool m_menuBarVisible, m_statusBarVisible; - - std::unique_ptr<StatusBar> m_statusBar; - // last separator on the toolbar, used to add spacer for right-alignment and // as an insert point for executables QAction* m_linksSeparator; @@ -685,11 +676,9 @@ private slots: // ui slots void on_categoriesOrBtn_toggled(bool checked); void on_managedArchiveLabel_linkHovered(const QString &link); + void storeSettings(Settings& settings); + void readSettings(const Settings& settings); void setupModList(); - void showMenuBar(bool b); - void showStatusBar(bool b); }; - - #endif // MAINWINDOW_H diff --git a/src/mainwindow.ui b/src/mainwindow.ui index e9910b83..02c6dec0 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -48,1239 +48,1239 @@ </property> <item> <widget class="QWidget" name="horizontalLayoutWidget_2"> - <layout class="QHBoxLayout" name="horizontalLayout_10" stretch="0,2"> + <layout class="QHBoxLayout" name="horizontalLayout_10" stretch="0,2"> + <item> + <layout class="QVBoxLayout" name="verticalLayout_8"> <item> - <layout class="QVBoxLayout" name="verticalLayout_8"> - <item> - <widget class="QGroupBox" name="categoriesGroup"> - <property name="title"> - <string>Categories</string> - </property> - <layout class="QVBoxLayout" name="verticalLayout_10" stretch="6,0,0"> - <property name="spacing"> + <widget class="QGroupBox" name="categoriesGroup"> + <property name="title"> + <string>Categories</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout_10" stretch="6,0,0"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>3</number> + </property> + <property name="topMargin"> + <number>7</number> + </property> + <property name="rightMargin"> + <number>3</number> + </property> + <property name="bottomMargin"> + <number>1</number> + </property> + <item> + <widget class="QTreeWidget" name="categoriesList"> + <property name="minimumSize"> + <size> + <width>120</width> + <height>0</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>214</width> + <height>16777215</height> + </size> + </property> + <property name="contextMenuPolicy"> + <enum>Qt::CustomContextMenu</enum> + </property> + <property name="selectionMode"> + <enum>QAbstractItemView::ExtendedSelection</enum> + </property> + <property name="indentation"> <number>0</number> </property> - <property name="leftMargin"> - <number>3</number> + <property name="uniformRowHeights"> + <bool>true</bool> </property> - <property name="topMargin"> - <number>7</number> + <attribute name="headerVisible"> + <bool>false</bool> + </attribute> + <column> + <property name="text"> + <string notr="true">1</string> + </property> + </column> + </widget> + </item> + <item> + <widget class="QPushButton" name="clickBlankButton"> + <property name="enabled"> + <bool>false</bool> </property> - <property name="rightMargin"> - <number>3</number> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> </property> - <property name="bottomMargin"> - <number>1</number> + <property name="minimumSize"> + <size> + <width>0</width> + <height>25</height> + </size> </property> - <item> - <widget class="QTreeWidget" name="categoriesList"> - <property name="minimumSize"> - <size> - <width>120</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>214</width> - <height>16777215</height> - </size> - </property> - <property name="contextMenuPolicy"> - <enum>Qt::CustomContextMenu</enum> - </property> - <property name="selectionMode"> - <enum>QAbstractItemView::ExtendedSelection</enum> - </property> - <property name="indentation"> - <number>0</number> - </property> - <property name="uniformRowHeights"> - <bool>true</bool> - </property> - <attribute name="headerVisible"> - <bool>false</bool> - </attribute> - <column> - <property name="text"> - <string notr="true">1</string> - </property> - </column> - </widget> - </item> - <item> - <widget class="QPushButton" name="clickBlankButton"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>25</height> - </size> - </property> - <property name="text"> - <string>Clear</string> - </property> - <property name="flat"> - <bool>true</bool> - </property> - </widget> - </item> - <item> - <widget class="QWidget" name="widget" native="true"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_11"> - <item> - <widget class="QRadioButton" name="categoriesAndBtn"> - <property name="toolTip"> - <string>If checked, only mods that match all selected categories are displayed.</string> - </property> - <property name="text"> - <string>And</string> - </property> - <property name="checked"> - <bool>true</bool> - </property> - </widget> - </item> - <item> - <widget class="QRadioButton" name="categoriesOrBtn"> - <property name="toolTip"> - <string>If checked, all mods that match at least one of the selected categories are displayed.</string> - </property> - <property name="text"> - <string>Or</string> - </property> - </widget> - </item> - </layout> - </widget> - </item> - </layout> - </widget> - </item> - </layout> - </item> - <item> - <widget class="QSplitter" name="splitter"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <widget class="QWidget" name="layoutWidget"> - <layout class="QVBoxLayout" name="verticalLayout"> - <property name="spacing"> - <number>2</number> - </property> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_6" stretch="0,1,0,0,0,0,0,0,0"> - <item> - <widget class="QLabel" name="label_3"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Profile</string> - </property> - <property name="buddy"> - <cstring>profileBox</cstring> - </property> - </widget> - </item> - <item> - <widget class="QComboBox" name="profileBox"> - <property name="toolTip"> - <string>Pick a module collection</string> - </property> - <property name="whatsThis"> - <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Create profiles here. Each profile contains its own list of active mods and esps. This way you can quickly switch between setups for different playthroughs.</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Please note that right now your esp load order is not kept separate for different profiles.</span></p></body></html></string> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QPushButton" name="listOptionsBtn"> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>16777215</height> - </size> - </property> - <property name="toolTip"> - <string>Open list options...</string> - </property> - <property name="whatsThis"> - <string>Refresh list. This is usually not necessary unless you modified data outside the program.</string> - </property> - <property name="text"> - <string/> - </property> - <property name="icon"> - <iconset resource="resources.qrc"> - <normaloff>:/MO/gui/settings</normaloff>:/MO/gui/settings</iconset> - </property> - <property name="iconSize"> - <size> - <width>16</width> - <height>16</height> - </size> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="openFolderMenu"> - <property name="toolTip"> - <string>Show Open Folders menu...</string> - </property> - <property name="text"> - <string/> - </property> - <property name="icon"> - <iconset resource="resources.qrc"> - <normaloff>:/MO/gui/open_folder</normaloff>:/MO/gui/open_folder</iconset> - </property> - </widget> - </item> + <property name="text"> + <string>Clear</string> + </property> + <property name="flat"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QWidget" name="widget" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_11"> <item> - <widget class="QPushButton" name="restoreModsButton"> + <widget class="QRadioButton" name="categoriesAndBtn"> <property name="toolTip"> - <string>Restore Backup...</string> + <string>If checked, only mods that match all selected categories are displayed.</string> </property> <property name="text"> - <string notr="true"/> + <string>And</string> </property> - <property name="icon"> - <iconset resource="resources.qrc"> - <normaloff>:/MO/gui/restore</normaloff>:/MO/gui/restore</iconset> + <property name="checked"> + <bool>true</bool> </property> </widget> </item> <item> - <widget class="QPushButton" name="saveModsButton"> + <widget class="QRadioButton" name="categoriesOrBtn"> <property name="toolTip"> - <string>Create Backup</string> - </property> - <property name="text"> - <string notr="true"/> - </property> - <property name="icon"> - <iconset resource="resources.qrc"> - <normaloff>:/MO/gui/backup</normaloff>:/MO/gui/backup</iconset> + <string>If checked, all mods that match at least one of the selected categories are displayed.</string> </property> - </widget> - </item> - <item> - <widget class="QLabel" name="activeModslabel"> <property name="text"> - <string>Active:</string> - </property> - </widget> - </item> - <item> - <widget class="LCDNumber" name="activeModsCounter"> - <property name="minimumSize"> - <size> - <width>0</width> - <height>26</height> - </size> - </property> - <property name="whatsThis"> - <string>This provides statistics about the mod list. The total number of active mod is normally displayed. Other statistics may be accessed with the tooltip of this counter.</string> - </property> - <property name="frameShadow"> - <enum>QFrame::Sunken</enum> - </property> - <property name="digitCount"> - <number>5</number> - </property> - <property name="segmentStyle"> - <enum>QLCDNumber::Flat</enum> + <string>Or</string> </property> </widget> </item> </layout> + </widget> + </item> + </layout> + </widget> + </item> + </layout> + </item> + <item> + <widget class="QSplitter" name="splitter"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <widget class="QWidget" name="layoutWidget"> + <layout class="QVBoxLayout" name="verticalLayout"> + <property name="spacing"> + <number>2</number> + </property> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_6" stretch="0,1,0,0,0,0,0,0,0"> + <item> + <widget class="QLabel" name="label_3"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Profile</string> + </property> + <property name="buddy"> + <cstring>profileBox</cstring> + </property> + </widget> </item> <item> - <widget class="ModListView" name="modList"> - <property name="minimumSize"> + <widget class="QComboBox" name="profileBox"> + <property name="toolTip"> + <string>Pick a module collection</string> + </property> + <property name="whatsThis"> + <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Create profiles here. Each profile contains its own list of active mods and esps. This way you can quickly switch between setups for different playthroughs.</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Please note that right now your esp load order is not kept separate for different profiles.</span></p></body></html></string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> <size> - <width>330</width> - <height>400</height> + <width>40</width> + <height>20</height> </size> </property> - <property name="contextMenuPolicy"> - <enum>Qt::CustomContextMenu</enum> + </spacer> + </item> + <item> + <widget class="QPushButton" name="listOptionsBtn"> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>16777215</height> + </size> </property> <property name="toolTip"> - <string>List of available mods.</string> + <string>Open list options...</string> </property> <property name="whatsThis"> - <string>This is a list of installed mods. Use the checkboxes to activate/deactivate mods and drag & drop mods to change their "installation" orders.</string> + <string>Refresh list. This is usually not necessary unless you modified data outside the program.</string> </property> - <property name="styleSheet"> + <property name="text"> + <string/> + </property> + <property name="icon"> + <iconset resource="resources.qrc"> + <normaloff>:/MO/gui/settings</normaloff>:/MO/gui/settings</iconset> + </property> + <property name="iconSize"> + <size> + <width>16</width> + <height>16</height> + </size> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="openFolderMenu"> + <property name="toolTip"> + <string>Show Open Folders menu...</string> + </property> + <property name="text"> + <string/> + </property> + <property name="icon"> + <iconset resource="resources.qrc"> + <normaloff>:/MO/gui/open_folder</normaloff>:/MO/gui/open_folder</iconset> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="restoreModsButton"> + <property name="toolTip"> + <string>Restore Backup...</string> + </property> + <property name="text"> <string notr="true"/> </property> - <property name="editTriggers"> - <set>QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked</set> + <property name="icon"> + <iconset resource="resources.qrc"> + <normaloff>:/MO/gui/restore</normaloff>:/MO/gui/restore</iconset> </property> - <property name="showDropIndicator" stdset="0"> - <bool>true</bool> + </widget> + </item> + <item> + <widget class="QPushButton" name="saveModsButton"> + <property name="toolTip"> + <string>Create Backup</string> </property> - <property name="dragEnabled"> - <bool>true</bool> + <property name="text"> + <string notr="true"/> </property> - <property name="dragDropMode"> - <enum>QAbstractItemView::DragDrop</enum> + <property name="icon"> + <iconset resource="resources.qrc"> + <normaloff>:/MO/gui/backup</normaloff>:/MO/gui/backup</iconset> </property> - <property name="defaultDropAction"> - <enum>Qt::MoveAction</enum> + </widget> + </item> + <item> + <widget class="QLabel" name="activeModslabel"> + <property name="text"> + <string>Active:</string> </property> - <property name="alternatingRowColors"> - <bool>true</bool> + </widget> + </item> + <item> + <widget class="LCDNumber" name="activeModsCounter"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>26</height> + </size> </property> - <property name="selectionMode"> - <enum>QAbstractItemView::ExtendedSelection</enum> + <property name="whatsThis"> + <string>This provides statistics about the mod list. The total number of active mod is normally displayed. Other statistics may be accessed with the tooltip of this counter.</string> </property> - <property name="selectionBehavior"> - <enum>QAbstractItemView::SelectRows</enum> + <property name="frameShadow"> + <enum>QFrame::Sunken</enum> </property> - <property name="indentation"> - <number>20</number> + <property name="digitCount"> + <number>5</number> </property> - <property name="uniformRowHeights"> - <bool>true</bool> + <property name="segmentStyle"> + <enum>QLCDNumber::Flat</enum> </property> - <property name="itemsExpandable"> - <bool>true</bool> + </widget> + </item> + </layout> + </item> + <item> + <widget class="ModListView" name="modList"> + <property name="minimumSize"> + <size> + <width>330</width> + <height>400</height> + </size> + </property> + <property name="contextMenuPolicy"> + <enum>Qt::CustomContextMenu</enum> + </property> + <property name="toolTip"> + <string>List of available mods.</string> + </property> + <property name="whatsThis"> + <string>This is a list of installed mods. Use the checkboxes to activate/deactivate mods and drag & drop mods to change their "installation" orders.</string> + </property> + <property name="styleSheet"> + <string notr="true"/> + </property> + <property name="editTriggers"> + <set>QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked</set> + </property> + <property name="showDropIndicator" stdset="0"> + <bool>true</bool> + </property> + <property name="dragEnabled"> + <bool>true</bool> + </property> + <property name="dragDropMode"> + <enum>QAbstractItemView::DragDrop</enum> + </property> + <property name="defaultDropAction"> + <enum>Qt::MoveAction</enum> + </property> + <property name="alternatingRowColors"> + <bool>true</bool> + </property> + <property name="selectionMode"> + <enum>QAbstractItemView::ExtendedSelection</enum> + </property> + <property name="selectionBehavior"> + <enum>QAbstractItemView::SelectRows</enum> + </property> + <property name="indentation"> + <number>20</number> + </property> + <property name="uniformRowHeights"> + <bool>true</bool> + </property> + <property name="itemsExpandable"> + <bool>true</bool> + </property> + <property name="sortingEnabled"> + <bool>true</bool> + </property> + <property name="expandsOnDoubleClick"> + <bool>false</bool> + </property> + <attribute name="headerDefaultSectionSize"> + <number>35</number> + </attribute> + <attribute name="headerShowSortIndicator" stdset="0"> + <bool>true</bool> + </attribute> + <attribute name="headerStretchLastSection"> + <bool>false</bool> + </attribute> + </widget> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_4" stretch="0,0,1,1,0,1,1"> + <item> + <widget class="QPushButton" name="displayCategoriesBtn"> + <property name="maximumSize"> + <size> + <width>20</width> + <height>16777215</height> + </size> </property> - <property name="sortingEnabled"> - <bool>true</bool> + <property name="text"> + <string notr="true">x</string> </property> - <property name="expandsOnDoubleClick"> - <bool>false</bool> + <property name="iconSize"> + <size> + <width>20</width> + <height>20</height> + </size> </property> - <attribute name="headerDefaultSectionSize"> - <number>35</number> - </attribute> - <attribute name="headerShowSortIndicator" stdset="0"> + <property name="checkable"> <bool>true</bool> - </attribute> - <attribute name="headerStretchLastSection"> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="label_2"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Filter</string> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="currentCategoryLabel"> + <property name="font"> + <font> + <pointsize>8</pointsize> + <italic>true</italic> + </font> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_5"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item alignment="Qt::AlignLeft"> + <widget class="QPushButton" name="clearFiltersButton"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>22</height> + </size> + </property> + <property name="baseSize"> + <size> + <width>95</width> + <height>0</height> + </size> + </property> + <property name="visible"> <bool>false</bool> - </attribute> + </property> + <property name="layoutDirection"> + <enum>Qt::RightToLeft</enum> + </property> + <property name="styleSheet"> + <string notr="true">border:1px solid #ff0000;</string> + </property> + <property name="text"> + <string>Clear all Filters</string> + </property> + <property name="icon"> + <iconset resource="resources.qrc"> + <normaloff>:/MO/gui/edit_clear</normaloff>:/MO/gui/edit_clear</iconset> + </property> + <property name="iconSize"> + <size> + <width>12</width> + <height>12</height> + </size> + </property> </widget> </item> <item> - <layout class="QHBoxLayout" name="horizontalLayout_4" stretch="0,0,1,1,0,1,1"> - <item> - <widget class="QPushButton" name="displayCategoriesBtn"> - <property name="maximumSize"> - <size> - <width>20</width> - <height>16777215</height> - </size> - </property> - <property name="text"> - <string notr="true">x</string> - </property> - <property name="iconSize"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="label_2"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Filter</string> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="currentCategoryLabel"> - <property name="font"> - <font> - <pointsize>8</pointsize> - <italic>true</italic> - </font> - </property> - </widget> - </item> + <widget class="QComboBox" name="groupCombo"> + <property name="baseSize"> + <size> + <width>220</width> + <height>0</height> + </size> + </property> + <property name="focusPolicy"> + <enum>Qt::ClickFocus</enum> + </property> <item> - <spacer name="horizontalSpacer_5"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item alignment="Qt::AlignLeft"> - <widget class="QPushButton" name="clearFiltersButton"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>22</height> - </size> - </property> - <property name="baseSize"> - <size> - <width>95</width> - <height>0</height> - </size> - </property> - <property name="visible"> - <bool>false</bool> - </property> - <property name="layoutDirection"> - <enum>Qt::RightToLeft</enum> - </property> - <property name="styleSheet"> - <string notr="true">border:1px solid #ff0000;</string> - </property> - <property name="text"> - <string>Clear all Filters</string> - </property> - <property name="icon"> - <iconset resource="resources.qrc"> - <normaloff>:/MO/gui/edit_clear</normaloff>:/MO/gui/edit_clear</iconset> - </property> - <property name="iconSize"> - <size> - <width>12</width> - <height>12</height> - </size> - </property> - </widget> + <property name="text"> + <string>No groups</string> + </property> </item> <item> - <widget class="QComboBox" name="groupCombo"> - <property name="baseSize"> - <size> - <width>220</width> - <height>0</height> - </size> - </property> - <property name="focusPolicy"> - <enum>Qt::ClickFocus</enum> - </property> - <item> - <property name="text"> - <string>No groups</string> - </property> - </item> - <item> - <property name="text"> - <string>Categories</string> - </property> - </item> - <item> - <property name="text"> - <string>Nexus IDs</string> - </property> - </item> - </widget> + <property name="text"> + <string>Categories</string> + </property> </item> <item> - <widget class="MOBase::LineEditClear" name="modFilterEdit"> - <property name="baseSize"> - <size> - <width>220</width> - <height>0</height> - </size> - </property> - <property name="placeholderText"> - <string>Filter</string> - </property> - </widget> + <property name="text"> + <string>Nexus IDs</string> + </property> </item> - </layout> + </widget> </item> - </layout> - </widget> - <widget class="QWidget" name="layoutWidget_2"> - <layout class="QVBoxLayout" name="verticalLayout_2"> <item> - <widget class="QFrame" name="startGroup"> - <layout class="QHBoxLayout" name="horizontalLayout_5" stretch="1,0"> + <widget class="MOBase::LineEditClear" name="modFilterEdit"> + <property name="baseSize"> + <size> + <width>220</width> + <height>0</height> + </size> + </property> + <property name="placeholderText"> + <string>Filter</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + <widget class="QWidget" name="layoutWidget_2"> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <item> + <widget class="QFrame" name="startGroup"> + <layout class="QHBoxLayout" name="horizontalLayout_5" stretch="1,0"> + <item> + <widget class="QComboBox" name="executablesListBox"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>40</height> + </size> + </property> + <property name="font"> + <font> + <pointsize>9</pointsize> + <weight>75</weight> + <bold>true</bold> + </font> + </property> + <property name="toolTip"> + <string>Pick a program to run.</string> + </property> + <property name="whatsThis"> + <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Choose the program to run. Once you start using ModOrganizer, you should always run your game and tools from here or through shortcuts created here, otherwise mods installed through MO will not be visible.</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">You can add new Tools to this list, but I can't promise tools I haven't tested will work.</span></p></body></html></string> + </property> + <property name="iconSize"> + <size> + <width>32</width> + <height>32</height> + </size> + </property> + <property name="frame"> + <bool>false</bool> + </property> + </widget> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout_12" stretch="0,0"> <item> - <widget class="QComboBox" name="executablesListBox"> + <widget class="QPushButton" name="startButton"> <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="minimumSize"> <size> - <width>0</width> - <height>40</height> + <width>120</width> + <height>0</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>16777215</height> </size> </property> <property name="font"> <font> - <pointsize>9</pointsize> + <pointsize>10</pointsize> <weight>75</weight> <bold>true</bold> </font> </property> <property name="toolTip"> - <string>Pick a program to run.</string> + <string>Run program</string> </property> <property name="whatsThis"> <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Choose the program to run. Once you start using ModOrganizer, you should always run your game and tools from here or through shortcuts created here, otherwise mods installed through MO will not be visible.</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">You can add new Tools to this list, but I can't promise tools I haven't tested will work.</span></p></body></html></string> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Run the selected program with ModOrganizer enabled.</span></p></body></html></string> + </property> + <property name="locale"> + <locale language="English" country="UnitedStates"/> + </property> + <property name="text"> + <string>Run</string> + </property> + <property name="icon"> + <iconset resource="resources.qrc"> + <normaloff>:/MO/gui/run</normaloff>:/MO/gui/run</iconset> </property> <property name="iconSize"> <size> - <width>32</width> - <height>32</height> + <width>36</width> + <height>36</height> </size> </property> - <property name="frame"> - <bool>false</bool> - </property> </widget> </item> <item> - <layout class="QVBoxLayout" name="verticalLayout_12" stretch="0,0"> - <item> - <widget class="QPushButton" name="startButton"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>120</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>16777215</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>10</pointsize> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - <property name="toolTip"> - <string>Run program</string> - </property> - <property name="whatsThis"> - <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Run the selected program with ModOrganizer enabled.</span></p></body></html></string> - </property> - <property name="locale"> - <locale language="English" country="UnitedStates"/> - </property> - <property name="text"> - <string>Run</string> - </property> - <property name="icon"> - <iconset resource="resources.qrc"> - <normaloff>:/MO/gui/run</normaloff>:/MO/gui/run</iconset> - </property> - <property name="iconSize"> - <size> - <width>36</width> - <height>36</height> - </size> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="linkButton"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>140</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>16777215</height> - </size> - </property> - <property name="baseSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="toolTip"> - <string>Create a shortcut in your start menu or on the desktop to the specified program</string> - </property> - <property name="whatsThis"> - <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + <widget class="QPushButton" name="linkButton"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>140</width> + <height>0</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>16777215</height> + </size> + </property> + <property name="baseSize"> + <size> + <width>0</width> + <height>0</height> + </size> + </property> + <property name="toolTip"> + <string>Create a shortcut in your start menu or on the desktop to the specified program</string> + </property> + <property name="whatsThis"> + <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">This creates a start menu shortcut that directly starts the selected program with the MO active.</span></p></body></html></string> - </property> - <property name="text"> - <string>Shortcut</string> - </property> - <property name="icon"> - <iconset resource="resources.qrc"> - <normaloff>:/MO/gui/link</normaloff>:/MO/gui/link</iconset> - </property> - </widget> - </item> - </layout> + </property> + <property name="text"> + <string>Shortcut</string> + </property> + <property name="icon"> + <iconset resource="resources.qrc"> + <normaloff>:/MO/gui/link</normaloff>:/MO/gui/link</iconset> + </property> + </widget> </item> </layout> - </widget> - </item> - <item> - <widget class="QTabWidget" name="tabWidget"> - <property name="minimumSize"> - <size> - <width>340</width> - <height>250</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>16777215</height> - </size> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QTabWidget" name="tabWidget"> + <property name="minimumSize"> + <size> + <width>340</width> + <height>250</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>16777215</height> + </size> + </property> + <property name="contextMenuPolicy"> + <enum>Qt::NoContextMenu</enum> + </property> + <property name="tabShape"> + <enum>QTabWidget::Rounded</enum> + </property> + <property name="currentIndex"> + <number>0</number> + </property> + <widget class="QWidget" name="espTab"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>16777215</height> + </size> + </property> + <attribute name="title"> + <string>Plugins</string> + </attribute> + <layout class="QVBoxLayout" name="verticalLayout_4"> + <property name="leftMargin"> + <number>6</number> </property> - <property name="contextMenuPolicy"> - <enum>Qt::NoContextMenu</enum> + <property name="topMargin"> + <number>6</number> </property> - <property name="tabShape"> - <enum>QTabWidget::Rounded</enum> + <property name="rightMargin"> + <number>6</number> </property> - <property name="currentIndex"> + <property name="bottomMargin"> <number>0</number> </property> - <widget class="QWidget" name="espTab"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>16777215</height> - </size> - </property> - <attribute name="title"> - <string>Plugins</string> - </attribute> - <layout class="QVBoxLayout" name="verticalLayout_4"> - <property name="leftMargin"> - <number>6</number> - </property> - <property name="topMargin"> - <number>6</number> - </property> - <property name="rightMargin"> - <number>6</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_7"> <item> - <layout class="QHBoxLayout" name="horizontalLayout_7"> - <item> - <widget class="QPushButton" name="bossButton"> - <property name="visible"> + <widget class="QPushButton" name="bossButton"> + <property name="visible"> <bool>true</bool> - </property> - <property name="text"> - <string>Sort</string> - </property> - <property name="icon"> - <iconset resource="resources.qrc"> - <normaloff>:/MO/gui/sort</normaloff>:/MO/gui/sort</iconset> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_2"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QPushButton" name="restoreButton"> - <property name="toolTip"> - <string>Restore Backup...</string> - </property> - <property name="text"> - <string notr="true"/> - </property> - <property name="icon"> - <iconset resource="resources.qrc"> - <normaloff>:/MO/gui/restore</normaloff>:/MO/gui/restore</iconset> - </property> - <property name="iconSize"> - <size> - <width>16</width> - <height>16</height> - </size> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="saveButton"> - <property name="toolTip"> - <string>Create Backup</string> - </property> - <property name="text"> - <string notr="true"/> - </property> - <property name="icon"> - <iconset resource="resources.qrc"> - <normaloff>:/MO/gui/backup</normaloff>:/MO/gui/backup</iconset> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="activePluginsLabel"> - <property name="text"> - <string>Active:</string> - </property> - </widget> - </item> - <item> - <widget class="LCDNumber" name="activePluginsCounter"> - <property name="minimumSize"> - <size> - <width>0</width> - <height>26</height> - </size> - </property> - <property name="whatsThis"> - <string>This provides statistics about the plugin list. The total number of active plugins is normally displayed. Other statistics may be accessed with the tooltip of this counter.</string> - </property> - <property name="frameShadow"> - <enum>QFrame::Sunken</enum> - </property> - <property name="digitCount"> - <number>4</number> - </property> - <property name="segmentStyle"> - <enum>QLCDNumber::Flat</enum> - </property> - </widget> - </item> - </layout> + </property> + <property name="text"> + <string>Sort</string> + </property> + <property name="icon"> + <iconset resource="resources.qrc"> + <normaloff>:/MO/gui/sort</normaloff>:/MO/gui/sort</iconset> + </property> + </widget> </item> <item> - <widget class="PluginListView" name="espList"> - <property name="minimumSize"> + <spacer name="horizontalSpacer_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> <size> - <width>250</width> - <height>250</height> + <width>40</width> + <height>20</height> </size> </property> - <property name="contextMenuPolicy"> - <enum>Qt::CustomContextMenu</enum> - </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="restoreButton"> <property name="toolTip"> - <string>List of available esp/esm files</string> - </property> - <property name="whatsThis"> - <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">This list contains the esps, esms, and esls contained in the active mods. These require their own load order. Use drag&amp;drop to modify this load order. Please note that MO will only save the load order for mods that are active/checked.<br />There is a great tool named &quot;BOSS&quot; to automatically sort these files.</span></p></body></html></string> - </property> - <property name="editTriggers"> - <set>QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked</set> + <string>Restore Backup...</string> </property> - <property name="dragEnabled"> - <bool>true</bool> + <property name="text"> + <string notr="true"/> </property> - <property name="dragDropOverwriteMode"> - <bool>false</bool> + <property name="icon"> + <iconset resource="resources.qrc"> + <normaloff>:/MO/gui/restore</normaloff>:/MO/gui/restore</iconset> </property> - <property name="dragDropMode"> - <enum>QAbstractItemView::InternalMove</enum> + <property name="iconSize"> + <size> + <width>16</width> + <height>16</height> + </size> </property> - <property name="defaultDropAction"> - <enum>Qt::MoveAction</enum> + </widget> + </item> + <item> + <widget class="QPushButton" name="saveButton"> + <property name="toolTip"> + <string>Create Backup</string> </property> - <property name="alternatingRowColors"> - <bool>true</bool> + <property name="text"> + <string notr="true"/> </property> - <property name="selectionMode"> - <enum>QAbstractItemView::ExtendedSelection</enum> + <property name="icon"> + <iconset resource="resources.qrc"> + <normaloff>:/MO/gui/backup</normaloff>:/MO/gui/backup</iconset> </property> - <property name="selectionBehavior"> - <enum>QAbstractItemView::SelectRows</enum> + </widget> + </item> + <item> + <widget class="QLabel" name="activePluginsLabel"> + <property name="text"> + <string>Active:</string> </property> - <property name="indentation"> - <number>0</number> + </widget> + </item> + <item> + <widget class="LCDNumber" name="activePluginsCounter"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>26</height> + </size> </property> - <property name="uniformRowHeights"> - <bool>true</bool> + <property name="whatsThis"> + <string>This provides statistics about the plugin list. The total number of active plugins is normally displayed. Other statistics may be accessed with the tooltip of this counter.</string> </property> - <property name="itemsExpandable"> - <bool>false</bool> + <property name="frameShadow"> + <enum>QFrame::Sunken</enum> </property> - <property name="sortingEnabled"> - <bool>true</bool> + <property name="digitCount"> + <number>4</number> </property> - <property name="expandsOnDoubleClick"> - <bool>false</bool> + <property name="segmentStyle"> + <enum>QLCDNumber::Flat</enum> </property> - <attribute name="headerStretchLastSection"> - <bool>false</bool> - </attribute> </widget> </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_3"> - <item> - <widget class="MOBase::LineEditClear" name="espFilterEdit"> - <property name="text"> - <string/> - </property> - <property name="placeholderText"> - <string>Filter</string> - </property> - </widget> - </item> - </layout> - </item> </layout> - </widget> - <widget class="QWidget" name="bsaTab"> - <property name="visible"> - <bool>false</bool> - </property> - <attribute name="title"> - <string>Archives</string> - </attribute> - <layout class="QVBoxLayout" name="verticalLayout_9"> - <property name="leftMargin"> - <number>6</number> + </item> + <item> + <widget class="PluginListView" name="espList"> + <property name="minimumSize"> + <size> + <width>250</width> + <height>250</height> + </size> + </property> + <property name="contextMenuPolicy"> + <enum>Qt::CustomContextMenu</enum> + </property> + <property name="toolTip"> + <string>List of available esp/esm files</string> + </property> + <property name="whatsThis"> + <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">This list contains the esps, esms, and esls contained in the active mods. These require their own load order. Use drag&amp;drop to modify this load order. Please note that MO will only save the load order for mods that are active/checked.<br />There is a great tool named &quot;BOSS&quot; to automatically sort these files.</span></p></body></html></string> + </property> + <property name="editTriggers"> + <set>QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked</set> + </property> + <property name="dragEnabled"> + <bool>true</bool> + </property> + <property name="dragDropOverwriteMode"> + <bool>false</bool> + </property> + <property name="dragDropMode"> + <enum>QAbstractItemView::InternalMove</enum> + </property> + <property name="defaultDropAction"> + <enum>Qt::MoveAction</enum> + </property> + <property name="alternatingRowColors"> + <bool>true</bool> + </property> + <property name="selectionMode"> + <enum>QAbstractItemView::ExtendedSelection</enum> </property> - <property name="topMargin"> - <number>6</number> + <property name="selectionBehavior"> + <enum>QAbstractItemView::SelectRows</enum> </property> - <property name="rightMargin"> - <number>6</number> + <property name="indentation"> + <number>0</number> </property> - <property name="bottomMargin"> - <number>6</number> + <property name="uniformRowHeights"> + <bool>true</bool> </property> + <property name="itemsExpandable"> + <bool>false</bool> + </property> + <property name="sortingEnabled"> + <bool>true</bool> + </property> + <property name="expandsOnDoubleClick"> + <bool>false</bool> + </property> + <attribute name="headerStretchLastSection"> + <bool>false</bool> + </attribute> + </widget> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_3"> <item> - <layout class="QHBoxLayout" name="horizontalLayout_9" stretch="0"> - <item> - <widget class="QLabel" name="managedArchiveLabel"> - <property name="toolTip"> - <string><html><head/><body><p>BSAs / BA2s are bundles of game assets (textures, scripts, etc.). By default, the engine loads these bundles in a separate step from loose files. <p>Their load order is specified by the priority of the corresponding plugin (right pane, plugins tab).</p><p>If there is a matching plugin, the game will load them no matter what.</p></body></html></string> - </property> - <property name="text"> - <string><html><head/><body><p>Currently detected archives. (<a href="#"><span style=" text-decoration: underline; color:#0000ff;">What is an archive?</span></a>)</p></body></html></string> - </property> - <property name="wordWrap"> - <bool>true</bool> - </property> - </widget> - </item> - </layout> + <widget class="MOBase::LineEditClear" name="espFilterEdit"> + <property name="text"> + <string/> + </property> + <property name="placeholderText"> + <string>Filter</string> + </property> + </widget> </item> + </layout> + </item> + </layout> + </widget> + <widget class="QWidget" name="bsaTab"> + <property name="visible"> + <bool>false</bool> + </property> + <attribute name="title"> + <string>Archives</string> + </attribute> + <layout class="QVBoxLayout" name="verticalLayout_9"> + <property name="leftMargin"> + <number>6</number> + </property> + <property name="topMargin"> + <number>6</number> + </property> + <property name="rightMargin"> + <number>6</number> + </property> + <property name="bottomMargin"> + <number>6</number> + </property> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_9" stretch="0"> <item> - <widget class="MOBase::SortableTreeWidget" name="bsaList" native="true"> - <property name="contextMenuPolicy"> - <enum>Qt::CustomContextMenu</enum> - </property> + <widget class="QLabel" name="managedArchiveLabel"> <property name="toolTip"> - <string>List of available BS Archives. Archives not checked here are not managed by MO and ignore installation order.</string> - </property> - <property name="whatsThis"> - <string>BSA files are archives (comparable to .zip files) that contain data assets (meshes, textures, ...) to be used by the game. As such they "compete" with loose files in your data directory over which is loaded. - By default, BSAs that share their base name with an enabled ESP (i.e. plugin.esp and plugin.bsa) are automatically loaded and will have precedence over all loose files, the installation order you set up to the left is then ignored! - - BSAs checked here are loaded in such a way that your installation order is obeyed properly.</string> - </property> - <property name="showDropIndicator" stdset="0"> - <bool>false</bool> - </property> - <property name="dragEnabled" stdset="0"> - <bool>false</bool> - </property> - <property name="dragDropOverwriteMode" stdset="0"> - <bool>false</bool> + <string><html><head/><body><p>BSAs / BA2s are bundles of game assets (textures, scripts, etc.). By default, the engine loads these bundles in a separate step from loose files. <p>Their load order is specified by the priority of the corresponding plugin (right pane, plugins tab).</p><p>If there is a matching plugin, the game will load them no matter what.</p></body></html></string> </property> - <property name="indentation" stdset="0"> - <number>20</number> + <property name="text"> + <string><html><head/><body><p>Currently detected archives. (<a href="#"><span style=" text-decoration: underline; color:#0000ff;">What is an archive?</span></a>)</p></body></html></string> </property> - <property name="itemsExpandable" stdset="0"> + <property name="wordWrap"> <bool>true</bool> </property> - <property name="columnCount" stdset="0"> - <number>1</number> - </property> </widget> </item> </layout> - </widget> - <widget class="QWidget" name="dataTab"> - <attribute name="title"> - <string>Data</string> - </attribute> - <layout class="QVBoxLayout" name="verticalLayout_5"> - <property name="leftMargin"> - <number>6</number> + </item> + <item> + <widget class="MOBase::SortableTreeWidget" name="bsaList" native="true"> + <property name="contextMenuPolicy"> + <enum>Qt::CustomContextMenu</enum> + </property> + <property name="toolTip"> + <string>List of available BS Archives. Archives not checked here are not managed by MO and ignore installation order.</string> + </property> + <property name="whatsThis"> + <string>BSA files are archives (comparable to .zip files) that contain data assets (meshes, textures, ...) to be used by the game. As such they "compete" with loose files in your data directory over which is loaded. + By default, BSAs that share their base name with an enabled ESP (i.e. plugin.esp and plugin.bsa) are automatically loaded and will have precedence over all loose files, the installation order you set up to the left is then ignored! + + BSAs checked here are loaded in such a way that your installation order is obeyed properly.</string> + </property> + <property name="showDropIndicator" stdset="0"> + <bool>false</bool> + </property> + <property name="dragEnabled" stdset="0"> + <bool>false</bool> + </property> + <property name="dragDropOverwriteMode" stdset="0"> + <bool>false</bool> + </property> + <property name="indentation" stdset="0"> + <number>20</number> + </property> + <property name="itemsExpandable" stdset="0"> + <bool>true</bool> + </property> + <property name="columnCount" stdset="0"> + <number>1</number> + </property> + </widget> + </item> + </layout> + </widget> + <widget class="QWidget" name="dataTab"> + <attribute name="title"> + <string>Data</string> + </attribute> + <layout class="QVBoxLayout" name="verticalLayout_5"> + <property name="leftMargin"> + <number>6</number> + </property> + <property name="topMargin"> + <number>6</number> + </property> + <property name="rightMargin"> + <number>6</number> + </property> + <property name="bottomMargin"> + <number>6</number> + </property> + <item> + <widget class="QPushButton" name="btnRefreshData"> + <property name="toolTip"> + <string>refresh data-directory overview</string> </property> - <property name="topMargin"> - <number>6</number> + <property name="whatsThis"> + <string>Refresh the overview. This may take a moment.</string> </property> - <property name="rightMargin"> - <number>6</number> + <property name="text"> + <string>Refresh</string> </property> - <property name="bottomMargin"> - <number>6</number> + <property name="icon"> + <iconset resource="resources.qrc"> + <normaloff>:/MO/gui/resources/view-refresh.png</normaloff>:/MO/gui/resources/view-refresh.png</iconset> </property> + </widget> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_2"> <item> - <widget class="QPushButton" name="btnRefreshData"> - <property name="toolTip"> - <string>refresh data-directory overview</string> + <widget class="QTreeWidget" name="dataTree"> + <property name="contextMenuPolicy"> + <enum>Qt::CustomContextMenu</enum> </property> <property name="whatsThis"> - <string>Refresh the overview. This may take a moment.</string> + <string>This is an overview of your data directory as visible to the game (and tools). </string> </property> - <property name="text"> - <string>Refresh</string> + <property name="uniformRowHeights"> + <bool>true</bool> </property> - <property name="icon"> - <iconset resource="resources.qrc"> - <normaloff>:/MO/gui/resources/view-refresh.png</normaloff>:/MO/gui/resources/view-refresh.png</iconset> + <property name="animated"> + <bool>true</bool> </property> + <attribute name="headerDefaultSectionSize"> + <number>400</number> + </attribute> + <column> + <property name="text"> + <string>File</string> + </property> + </column> + <column> + <property name="text"> + <string>Mod</string> + </property> + </column> </widget> </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_12"> <item> - <layout class="QHBoxLayout" name="horizontalLayout_2"> - <item> - <widget class="QTreeWidget" name="dataTree"> - <property name="contextMenuPolicy"> - <enum>Qt::CustomContextMenu</enum> - </property> - <property name="whatsThis"> - <string>This is an overview of your data directory as visible to the game (and tools). </string> - </property> - <property name="uniformRowHeights"> - <bool>true</bool> - </property> - <property name="animated"> - <bool>true</bool> - </property> - <attribute name="headerDefaultSectionSize"> - <number>400</number> - </attribute> - <column> - <property name="text"> - <string>File</string> - </property> - </column> - <column> - <property name="text"> - <string>Mod</string> - </property> - </column> - </widget> - </item> - </layout> + <widget class="QCheckBox" name="conflictsCheckBox"> + <property name="toolTip"> + <string>Filters the above list so that only conflicts are displayed.</string> + </property> + <property name="whatsThis"> + <string>Filters the above list so that only conflicts are displayed.</string> + </property> + <property name="text"> + <string>Show only conflicts</string> + </property> + </widget> </item> <item> - <layout class="QHBoxLayout" name="horizontalLayout_12"> - <item> - <widget class="QCheckBox" name="conflictsCheckBox"> - <property name="toolTip"> - <string>Filters the above list so that only conflicts are displayed.</string> - </property> - <property name="whatsThis"> - <string>Filters the above list so that only conflicts are displayed.</string> - </property> - <property name="text"> - <string>Show only conflicts</string> - </property> - </widget> - </item> - <item> - <widget class="QCheckBox" name="showArchiveDataCheckBox"> - <property name="toolTip"> - <string>Filters the above list so that files from archives are not shown</string> - </property> - <property name="statusTip"> - <string/> - </property> - <property name="whatsThis"> - <string>Filters the above list so that files from archives are not shown</string> - </property> - <property name="text"> - <string>Show files from Archives</string> - </property> - </widget> - </item> - </layout> + <widget class="QCheckBox" name="showArchiveDataCheckBox"> + <property name="toolTip"> + <string>Filters the above list so that files from archives are not shown</string> + </property> + <property name="statusTip"> + <string/> + </property> + <property name="whatsThis"> + <string>Filters the above list so that files from archives are not shown</string> + </property> + <property name="text"> + <string>Show files from Archives</string> + </property> + </widget> </item> </layout> - </widget> - <widget class="QWidget" name="savesTab"> - <attribute name="title"> - <string>Saves</string> - </attribute> - <layout class="QVBoxLayout" name="verticalLayout_3"> - <property name="leftMargin"> - <number>6</number> + </item> + </layout> + </widget> + <widget class="QWidget" name="savesTab"> + <attribute name="title"> + <string>Saves</string> + </attribute> + <layout class="QVBoxLayout" name="verticalLayout_3"> + <property name="leftMargin"> + <number>6</number> + </property> + <property name="topMargin"> + <number>6</number> + </property> + <property name="rightMargin"> + <number>6</number> + </property> + <property name="bottomMargin"> + <number>6</number> + </property> + <item> + <widget class="QListWidget" name="savegameList"> + <property name="contextMenuPolicy"> + <enum>Qt::CustomContextMenu</enum> + </property> + <property name="toolTip"> + <string notr="true"/> + </property> + <property name="whatsThis"> + <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">This is a list of all save games for this game. Hover over a list entry to get detailed information about the save including a list of esps/esms that were used at the time this save was created but aren't active now.</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">If you click &quot;Fix Mods...&quot; in the context menu, MO will try to activate all mods and esps to fix those missing esps. It will not disable anything!</span></p></body></html></string> + </property> + <property name="selectionMode"> + <enum>QAbstractItemView::ExtendedSelection</enum> + </property> + <property name="selectionBehavior"> + <enum>QAbstractItemView::SelectRows</enum> </property> - <property name="topMargin"> - <number>6</number> + </widget> + </item> + </layout> + </widget> + <widget class="QWidget" name="downloadTab"> + <attribute name="title"> + <string>Downloads</string> + </attribute> + <layout class="QVBoxLayout" name="verticalLayout_7"> + <property name="leftMargin"> + <number>2</number> + </property> + <property name="topMargin"> + <number>2</number> + </property> + <property name="rightMargin"> + <number>2</number> + </property> + <property name="bottomMargin"> + <number>2</number> + </property> + <item> + <widget class="QPushButton" name="btnRefreshDownloads"> + <property name="toolTip"> + <string>Refresh downloads view</string> </property> - <property name="rightMargin"> - <number>6</number> + <property name="text"> + <string>Refresh</string> </property> - <property name="bottomMargin"> - <number>6</number> + <property name="icon"> + <iconset resource="resources.qrc"> + <normaloff>:/MO/gui/resources/view-refresh.png</normaloff>:/MO/gui/resources/view-refresh.png</iconset> </property> + </widget> + </item> + <item> + <layout class="QVBoxLayout" name="downloadLayout"> <item> - <widget class="QListWidget" name="savegameList"> + <widget class="DownloadListWidget" name="downloadView"> + <property name="minimumSize"> + <size> + <width>320</width> + <height>0</height> + </size> + </property> <property name="contextMenuPolicy"> <enum>Qt::CustomContextMenu</enum> </property> + <property name="acceptDrops"> + <bool>true</bool> + </property> <property name="toolTip"> - <string notr="true"/> + <string/> </property> <property name="whatsThis"> - <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">This is a list of all save games for this game. Hover over a list entry to get detailed information about the save including a list of esps/esms that were used at the time this save was created but aren't active now.</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">If you click &quot;Fix Mods...&quot; in the context menu, MO will try to activate all mods and esps to fix those missing esps. It will not disable anything!</span></p></body></html></string> + <string>This is a list of mods you downloaded from Nexus. Double click one to install it. You can also drag an archive into here.</string> + </property> + <property name="verticalScrollBarPolicy"> + <enum>Qt::ScrollBarAlwaysOn</enum> + </property> + <property name="dragEnabled"> + <bool>true</bool> </property> - <property name="selectionMode"> - <enum>QAbstractItemView::ExtendedSelection</enum> + <property name="dragDropMode"> + <enum>QAbstractItemView::DragDrop</enum> + </property> + <property name="defaultDropAction"> + <enum>Qt::MoveAction</enum> + </property> + <property name="alternatingRowColors"> + <bool>true</bool> + </property> + <property name="verticalScrollMode"> + <enum>QAbstractItemView::ScrollPerPixel</enum> + </property> + <property name="indentation"> + <number>0</number> + </property> + <property name="itemsExpandable"> + <bool>false</bool> </property> - <property name="selectionBehavior"> - <enum>QAbstractItemView::SelectRows</enum> + <property name="sortingEnabled"> + <bool>true</bool> </property> </widget> </item> </layout> - </widget> - <widget class="QWidget" name="downloadTab"> - <attribute name="title"> - <string>Downloads</string> - </attribute> - <layout class="QVBoxLayout" name="verticalLayout_7"> - <property name="leftMargin"> - <number>2</number> - </property> - <property name="topMargin"> - <number>2</number> - </property> - <property name="rightMargin"> - <number>2</number> - </property> - <property name="bottomMargin"> - <number>2</number> - </property> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0,2"> <item> - <widget class="QPushButton" name="btnRefreshDownloads"> - <property name="toolTip"> - <string>Refresh downloads view</string> - </property> + <widget class="QCheckBox" name="showHiddenBox"> <property name="text"> - <string>Refresh</string> - </property> - <property name="icon"> - <iconset resource="resources.qrc"> - <normaloff>:/MO/gui/resources/view-refresh.png</normaloff>:/MO/gui/resources/view-refresh.png</iconset> + <string>Show Hidden</string> </property> </widget> </item> <item> - <layout class="QVBoxLayout" name="downloadLayout"> - <item> - <widget class="DownloadListWidget" name="downloadView"> - <property name="minimumSize"> - <size> - <width>320</width> - <height>0</height> - </size> - </property> - <property name="contextMenuPolicy"> - <enum>Qt::CustomContextMenu</enum> - </property> - <property name="acceptDrops"> - <bool>true</bool> - </property> - <property name="toolTip"> - <string/> - </property> - <property name="whatsThis"> - <string>This is a list of mods you downloaded from Nexus. Double click one to install it. You can also drag an archive into here.</string> - </property> - <property name="verticalScrollBarPolicy"> - <enum>Qt::ScrollBarAlwaysOn</enum> - </property> - <property name="dragEnabled"> - <bool>true</bool> - </property> - <property name="dragDropMode"> - <enum>QAbstractItemView::DragDrop</enum> - </property> - <property name="defaultDropAction"> - <enum>Qt::MoveAction</enum> - </property> - <property name="alternatingRowColors"> - <bool>true</bool> - </property> - <property name="verticalScrollMode"> - <enum>QAbstractItemView::ScrollPerPixel</enum> - </property> - <property name="indentation"> - <number>0</number> - </property> - <property name="itemsExpandable"> - <bool>false</bool> - </property> - <property name="sortingEnabled"> - <bool>true</bool> - </property> - </widget> - </item> - </layout> + <spacer name="horizontalSpacer_3"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> </item> <item> - <layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0,2"> - <item> - <widget class="QCheckBox" name="showHiddenBox"> - <property name="text"> - <string>Show Hidden</string> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_3"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="MOBase::LineEditClear" name="downloadFilterEdit"> - <property name="placeholderText"> - <string>Filter</string> - </property> - </widget> - </item> - </layout> + <widget class="MOBase::LineEditClear" name="downloadFilterEdit"> + <property name="placeholderText"> + <string>Filter</string> + </property> + </widget> </item> </layout> - </widget> - </widget> - </item> - </layout> - </widget> - </widget> - </item> - </layout> + </item> + </layout> + </widget> + </widget> + </item> + </layout> + </widget> + </widget> + </item> + </layout> </widget> </item> </layout> @@ -1320,7 +1320,7 @@ p, li { white-space: pre-wrap; } <addaction name="actionUpdate"/> <addaction name="actionHelp"/> </widget> - <widget class="QStatusBar" name="statusBar"/> + <widget class="StatusBar" name="statusBar"/> <widget class="QMenuBar" name="menuBar"> <property name="geometry"> <rect> @@ -1790,6 +1790,11 @@ p, li { white-space: pre-wrap; } <extends>QTreeView</extends> <header>loglist.h</header> </customwidget> + <customwidget> + <class>StatusBar</class> + <extends>QStatusBar</extends> + <header>statusbar.h</header> + </customwidget> </customwidgets> <resources> <include location="resources.qrc"/> diff --git a/src/organizercore.cpp b/src/organizercore.cpp index 2d11dafd..a2b0fd69 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -335,10 +335,6 @@ OrganizerCore::~OrganizerCore() void OrganizerCore::storeSettings() { - if (m_UserInterface != nullptr) { - m_UserInterface->storeSettings(m_Settings); - } - if (m_CurrentProfile != nullptr) { m_Settings.setSelectedProfileName(m_CurrentProfile->name()); } diff --git a/src/settings.cpp b/src/settings.cpp index db6cecdf..06b4446a 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -942,6 +942,12 @@ QString stateSettingName(const Widget* widget) return "geometry/" + widgetName(widget) + "_state"; } +template <class Widget> +QString visibilitySettingName(const Widget* widget) +{ + return "geometry/" + widgetName(widget) + "_visibility"; +} + GeometrySettings::GeometrySettings(QSettings& s) : m_Settings(s), m_Reset(false) @@ -962,18 +968,6 @@ void GeometrySettings::resetIfNeeded() m_Settings.beginGroup("geometry"); m_Settings.remove(""); m_Settings.endGroup(); - - /*settings.remove("window_geometry"); - settings.remove("window_state"); - settings.remove("toolbar_size"); - settings.remove("toolbar_button_style"); - settings.remove("menubar_visible"); - settings.remove("window_split"); - settings.remove("window_monitor"); - settings.remove("filters_visible"); - settings.remove("browser_geometry"); - settings.remove("geometry"); - settings.remove("reset_geometry");*/ } void GeometrySettings::saveGeometry(const QWidget* w) @@ -1036,15 +1030,32 @@ bool GeometrySettings::restoreState(QSplitter* w) const return false; } -bool GeometrySettings::restoreToolbars(QMainWindow* w) const +void GeometrySettings::saveVisibility(const QWidget* w) { - const auto size = getOptional<QSize>(m_Settings, "toolbar_size"); - const auto style = getOptional<int>(m_Settings, "toolbar_button_style"); + m_Settings.setValue(visibilitySettingName(w), w->isVisible()); +} - if (!size && !style) { - return false; +bool GeometrySettings::restoreVisibility(QWidget* w, std::optional<bool> def) const +{ + auto v = getOptional<bool>(m_Settings, visibilitySettingName(w)); + if (!v) { + v = def; + } + + if (v) { + w->setVisible(*v); + return true; } + return false; +} + +void GeometrySettings::restoreToolbars(QMainWindow* w) const +{ + // all toolbars have the same size and button style settings + const auto size = getOptional<QSize>(m_Settings, "toolbar_size"); + const auto style = getOptional<int>(m_Settings, "toolbar_button_style"); + for (auto* tb : w->findChildren<QToolBar*>()) { if (size) { tb->setIconSize(*size); @@ -1053,53 +1064,28 @@ bool GeometrySettings::restoreToolbars(QMainWindow* w) const if (style) { tb->setToolButtonStyle(static_cast<Qt::ToolButtonStyle>(*style)); } - } - return true; + restoreVisibility(tb); + } } void GeometrySettings::saveToolbars(const QMainWindow* w) { - // all toolbars are identical, just save the first one const auto tbs = w->findChildren<QToolBar*>(); - if (tbs.isEmpty()) { - return; - } - - const auto* tb = tbs[0]; - - m_Settings.setValue("toolbar_size", tb->iconSize()); - m_Settings.setValue("toolbar_button_style", static_cast<int>(tb->toolButtonStyle())); -} - -std::optional<bool> GeometrySettings::getMenubarVisible() const -{ - return getOptional<bool>(m_Settings, "menubar_visible"); -} - -void GeometrySettings::setMenubarVisible(bool b) -{ - m_Settings.setValue("menubar_visible", b); -} - -std::optional<bool> GeometrySettings::getStatusbarVisible() const -{ - return getOptional<bool>(m_Settings, "statusbar_visible"); -} -void GeometrySettings::setStatusbarVisible(bool b) -{ - m_Settings.setValue("statusbar_visible", b); -} + // save visibility for all + for (auto* tb : tbs) { + saveVisibility(tb); + } -std::optional<bool> GeometrySettings::getFiltersVisible() const -{ - return getOptional<bool>(m_Settings, "filters_visible"); -} + // all toolbars have the same size and button style settings, just save the + // first one + if (!tbs.isEmpty()) { + const auto* tb = tbs[0]; -void GeometrySettings::setFiltersVisible(bool b) -{ - m_Settings.setValue("filters_visible", b); + m_Settings.setValue("toolbar_size", tb->iconSize()); + m_Settings.setValue("toolbar_button_style", static_cast<int>(tb->toolButtonStyle())); + } } QStringList GeometrySettings::getModInfoTabOrder() const diff --git a/src/settings.h b/src/settings.h index 9ae58803..072b4066 100644 --- a/src/settings.h +++ b/src/settings.h @@ -54,6 +54,7 @@ public: void requestReset(); void resetIfNeeded(); + void saveGeometry(const QWidget* w); bool restoreGeometry(QWidget* w) const; @@ -69,17 +70,13 @@ public: void saveState(const QSplitter* splitter); bool restoreState(QSplitter* splitter) const; - std::optional<bool> getMenubarVisible() const; - void setMenubarVisible(bool b); - bool restoreToolbars(QMainWindow* w) const; - void saveToolbars(const QMainWindow* w); + void saveVisibility(const QWidget* w); + bool restoreVisibility(QWidget* w, std::optional<bool> defaultValue={}) const; - std::optional<bool> getStatusbarVisible() const; - void setStatusbarVisible(bool b); - std::optional<bool> getFiltersVisible() const; - void setFiltersVisible(bool b); + void saveToolbars(const QMainWindow* w); + void restoreToolbars(QMainWindow* w) const; QStringList getModInfoTabOrder() const; void setModInfoTabOrder(const QString& names); diff --git a/src/statusbar.cpp b/src/statusbar.cpp index e9a6e658..d22010a5 100644 --- a/src/statusbar.cpp +++ b/src/statusbar.cpp @@ -3,26 +3,32 @@ #include "settings.h" #include "ui_mainwindow.h" -StatusBar::StatusBar(QStatusBar* bar, Ui::MainWindow* ui) : - m_bar(bar), m_progress(new QProgressBar), - m_notifications(new StatusBarAction(ui->actionNotifications)), - m_update(new StatusBarAction(ui->actionUpdate)), - m_api(new QLabel) +StatusBar::StatusBar(QWidget* parent) : + QStatusBar(parent), ui(nullptr), m_progress(new QProgressBar), + m_notifications(nullptr), m_update(nullptr), m_api(new QLabel) { +} + +void StatusBar::setup(Ui::MainWindow* mainWindowUI) +{ + ui = mainWindowUI; + m_notifications = new StatusBarAction(ui->actionNotifications); + m_update = new StatusBarAction(ui->actionUpdate); + QWidget* spacer1 = new QWidget; spacer1->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); spacer1->setHidden(true); spacer1->setVisible(true); - m_bar->addPermanentWidget(spacer1, 0); - m_bar->addPermanentWidget(m_progress); + addPermanentWidget(spacer1, 0); + addPermanentWidget(m_progress); QWidget* spacer2 = new QWidget; spacer2->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); spacer2->setHidden(true); spacer2->setVisible(true); - m_bar->addPermanentWidget(spacer2,0); - m_bar->addPermanentWidget(m_notifications); - m_bar->addPermanentWidget(m_update); - m_bar->addPermanentWidget(m_api); + addPermanentWidget(spacer2,0); + addPermanentWidget(m_notifications); + addPermanentWidget(m_update); + addPermanentWidget(m_api); m_progress->setTextVisible(true); @@ -42,7 +48,7 @@ StatusBar::StatusBar(QStatusBar* bar, Ui::MainWindow* ui) : "be unable to queue downloads, check updates, parse mod info, or even log " "in. Both pools must be consumed before this happens.")); - m_bar->clearMessage(); + clearMessage(); setProgress(-1); setAPI({}, {}); } @@ -50,10 +56,10 @@ StatusBar::StatusBar(QStatusBar* bar, Ui::MainWindow* ui) : void StatusBar::setProgress(int percent) { if (percent < 0 || percent >= 100) { - m_bar->clearMessage(); + clearMessage(); m_progress->setVisible(false); } else { - m_bar->showMessage(QObject::tr("Loading...")); + showMessage(QObject::tr("Loading...")); m_progress->setVisible(true); m_progress->setValue(percent); } @@ -126,6 +132,37 @@ void StatusBar::checkSettings(const Settings& settings) m_api->setVisible(!settings.hideAPICounter()); } +void StatusBar::showEvent(QShowEvent*) +{ + visibilityChanged(true); +} + +void StatusBar::hideEvent(QHideEvent*) +{ + visibilityChanged(false); +} + +void StatusBar::visibilityChanged(bool visible) +{ + // the central widget typically has no bottom padding because the status bar + // is more than enough, but when it's hidden, the bottom widget (currently + // the log) touches the bottom border of the window, which looks ugly + // + // when hiding the statusbar, the central widget is given the same border + // margin as it has on the top (which is typically 6, as it's the default from + // the qt designer) + + auto m = ui->centralWidget->layout()->contentsMargins(); + + if (visible) { + m.setBottom(0); + } else { + m.setBottom(m.top()); + } + + ui->centralWidget->layout()->setContentsMargins(m); +} + StatusBarAction::StatusBarAction(QAction* action) : m_action(action), m_icon(new QLabel), m_text(new QLabel) diff --git a/src/statusbar.h b/src/statusbar.h index 2baf12ee..442b9acf 100644 --- a/src/statusbar.h +++ b/src/statusbar.h @@ -29,10 +29,12 @@ private: }; -class StatusBar +class StatusBar : public QStatusBar { public: - StatusBar(QStatusBar* bar, Ui::MainWindow* ui); + StatusBar(QWidget* parent=nullptr); + + void setup(Ui::MainWindow* ui); void setProgress(int percent); void setNotifications(bool hasNotifications); @@ -40,12 +42,18 @@ public: void setUpdateAvailable(bool b); void checkSettings(const Settings& settings); +protected: + void showEvent(QShowEvent* e); + void hideEvent(QHideEvent* e); + private: - QStatusBar* m_bar; + Ui::MainWindow* ui; QProgressBar* m_progress; StatusBarAction* m_notifications; StatusBarAction* m_update; QLabel* m_api; + + void visibilityChanged(bool visible); }; #endif // MO_STATUSBAR_H |
