summaryrefslogtreecommitdiffstats
path: root/utils/regtools/qeditor/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/regtools/qeditor/mainwindow.cpp')
-rw-r--r--utils/regtools/qeditor/mainwindow.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/utils/regtools/qeditor/mainwindow.cpp b/utils/regtools/qeditor/mainwindow.cpp
index 07adc71368..9cea728d6e 100644
--- a/utils/regtools/qeditor/mainwindow.cpp
+++ b/utils/regtools/qeditor/mainwindow.cpp
@@ -43,8 +43,15 @@ void DocumentTab::OnModified(bool modified)
m_tab->SetTabModified(this, modified);
}
+void DocumentTab::SetTabWidget(MyTabWidget *tab)
+{
+ m_tab = tab;
+ SetTabName(m_tabname);
+}
+
void DocumentTab::SetTabName(const QString& name)
{
+ m_tabname = name;
if(m_tab)
m_tab->SetTabName(this, name);
}
@@ -201,20 +208,20 @@ void MainWindow::OnLoadDesc()
}
}
-void MainWindow::AddTab(DocumentTab *doc, const QString& title)
+void MainWindow::AddTab(DocumentTab *doc)
{
- m_tab->setCurrentIndex(m_tab->addTab(doc->GetWidget(), title));
+ m_tab->setCurrentIndex(m_tab->addTab(doc->GetWidget(), ""));
doc->SetTabWidget(m_tab);
}
void MainWindow::OnNewRegTab()
{
- AddTab(new RegTab(m_backend, this), "Register Tab");
+ AddTab(new RegTab(m_backend, this));
}
void MainWindow::OnNewRegEdit()
{
- AddTab(new RegEdit(m_backend, this), "Register Editor");
+ AddTab(new RegEdit(m_backend, this));
}
bool MainWindow::Quit()