diff options
| author | Al <gabriel.cortesi@outlook.com> | 2018-12-24 17:29:16 +0100 |
|---|---|---|
| committer | Al <gabriel.cortesi@outlook.com> | 2018-12-24 17:29:16 +0100 |
| commit | d28ddcfbb52394a2a7ac793ad376ea8fd7b514fe (patch) | |
| tree | f6e3038adf070a2f223edc0cd88d74f8ce539502 /src | |
| parent | 6211a23c5f2d891b7e2c91d837c5ed98959f4f27 (diff) | |
Added Active Plugins and Active Mods counters
Diffstat (limited to 'src')
| -rw-r--r-- | src/mainwindow.cpp | 12 | ||||
| -rw-r--r-- | src/mainwindow.h | 1 | ||||
| -rw-r--r-- | src/mainwindow.ui | 22 | ||||
| -rw-r--r-- | src/organizercore.cpp | 4 | ||||
| -rw-r--r-- | src/pluginlist.cpp | 1 |
5 files changed, 39 insertions, 1 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index bb136364..74374c2b 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -458,6 +458,12 @@ MainWindow::MainWindow(QSettings &initSettings // set the name of the widget to the name of the action to allow styling
ui->toolBar->widgetForAction(action)->setObjectName(action->objectName());
}
+ ui->activePluginsCounter->display(m_OrganizerCore.pluginList()->enabledCount());
+ ui->activeModsCounter->display((int)m_OrganizerCore.currentProfile()->getActiveMods().size());
+ qDebug("Plugin enabledCount: %d", m_OrganizerCore.pluginList()->enabledCount());
+ qDebug("Mods enabledCount: %d", (int)m_OrganizerCore.currentProfile()->getActiveMods().size());
+
+
}
@@ -2186,6 +2192,11 @@ void MainWindow::directory_refreshed() statusBar()->hide();
}
+void MainWindow::esplist_changed()
+{
+ ui->activePluginsCounter->display(m_OrganizerCore.pluginList()->enabledCount());
+}
+
void MainWindow::modorder_changed()
{
for (unsigned int i = 0; i < m_OrganizerCore.currentProfile()->numMods(); ++i) {
@@ -2443,6 +2454,7 @@ void MainWindow::restoreBackup_clicked() void MainWindow::modlistChanged(const QModelIndex&, int)
{
m_OrganizerCore.currentProfile()->writeModlist();
+ ui->activeModsCounter->display((int)m_OrganizerCore.currentProfile()->getActiveMods().size());
}
void MainWindow::modlistSelectionChanged(const QModelIndex ¤t, const QModelIndex&)
diff --git a/src/mainwindow.h b/src/mainwindow.h index f66ea5e7..61113b8c 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -162,6 +162,7 @@ public slots: void displayColumnSelection(const QPoint &pos);
void modorder_changed();
+ void esplist_changed();
void refresher_progress(int percent);
void directory_refreshed();
diff --git a/src/mainwindow.ui b/src/mainwindow.ui index 7e94000d..067cd4d0 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -179,7 +179,7 @@ <number>2</number>
</property>
<item>
- <layout class="QHBoxLayout" name="horizontalLayout_6" stretch="0,1,0,0,0,0,0">
+ <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">
@@ -225,6 +225,16 @@ p, li { white-space: pre-wrap; } </spacer>
</item>
<item>
+ <widget class="QLabel" name="activeModslabel">
+ <property name="text">
+ <string>Active:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLCDNumber" name="activeModsCounter"/>
+ </item>
+ <item>
<widget class="QPushButton" name="listOptionsBtn">
<property name="maximumSize">
<size>
@@ -854,6 +864,16 @@ p, li { white-space: pre-wrap; } </spacer>
</item>
<item>
+ <widget class="QLabel" name="activePluginsLabel">
+ <property name="text">
+ <string>Active:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLCDNumber" name="activePluginsCounter"/>
+ </item>
+ <item>
<widget class="QPushButton" name="restoreButton">
<property name="toolTip">
<string>Restore Backup...</string>
diff --git a/src/organizercore.cpp b/src/organizercore.cpp index d52ef40b..1f4e3434 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -560,6 +560,10 @@ void OrganizerCore::setUserInterface(IUserInterface *userInterface, SLOT(fileMoved(QString, QString, QString)));
connect(&m_ModList, SIGNAL(modorder_changed()), widget,
SLOT(modorder_changed()));
+ connect(&m_PluginList, SIGNAL(writePluginsList()), widget,
+ SLOT(esplist_changed()));
+ connect(&m_PluginList, SIGNAL(esplist_changed()), widget,
+ SLOT(esplist_changed()));
connect(&m_DownloadManager, SIGNAL(showMessage(QString)), widget,
SLOT(showMessage(QString)));
}
diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp index b0f59e1e..fcb05979 100644 --- a/src/pluginlist.cpp +++ b/src/pluginlist.cpp @@ -846,6 +846,7 @@ void PluginList::generatePluginIndexes() m_ESPs[i].m_Index = QString("%1").arg(l - numESLs - numSkipped, 2, 16, QChar('0')).toUpper();
}
}
+ emit esplist_changed();
}
|
