aboutsummaryrefslogtreecommitdiffstats
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorConfuSomu2024-01-20 21:57:39 -0500
committerConfuSomu2024-01-20 21:57:39 -0500
commit5aac009e969cc3bd15c484ba3437348cb7a4d186 (patch)
tree96cff55a273b9de31d639b00f7139110946ce1b6 /src/mainwindow.cpp
parent328c9b166e9d623cd1b80c7ae064baf6172da58f (diff)
downloadActorViewer-5aac009e969cc3bd15c484ba3437348cb7a4d186.tar
ActorViewer-5aac009e969cc3bd15c484ba3437348cb7a4d186.tar.gz
ActorViewer-5aac009e969cc3bd15c484ba3437348cb7a4d186.zip
Implemement Actor information tab
This class still has improvements to be made, but it works and I am satisfied with it!
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index c2a9820..1432116 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -5,6 +5,7 @@
#include "src/settingsdialog.h"
#include "src/aboutdialog.h"
#include "src/widgets/tab_activity_list.h"
+#include "src/widgets/tab_actor_info.h"
#include <QFileDialog>
#include <QInputDialog>
@@ -53,6 +54,10 @@ void MainWindow::create_initial_tabs() {
activity_list_tab->relist_statuses(true);
});
+ // TODO: maybe have one Actor info tab that is constantly updated with the new opened archive?
+ // actor_info_tab = new TabActorInfo(data_archive);
+ // ui->tabWidget->addTab(actor_info_tab, tr("Actor Info"));
+
// TODO: Add the "+" tab for opening new tabs
}
@@ -151,6 +156,9 @@ void MainWindow::finish_open_file(const Archive::InitError& parse_error) {
if (parse_error == Archive::NoError) {
emit new_archive_opened();
}
+ actor_info_tab = new TabActorInfo(data_archive);
+ ui->tabWidget->addTab(actor_info_tab, tr("Actor Info"));
+ connect(this, &MainWindow::new_archive_opened, actor_info_tab, &TabActorInfo::deleteLater);
// The cursor is restored in TabActivityList::relist_statuses()
}