implemented saving UI
Implemented the file dialog, save progress dialog, and separate thread to save in (saving needs to be done in a separate thread so the main/GUI thread doesn't get blocked).
This commit is contained in:
@@ -75,9 +75,17 @@ Project *ProjectPanel::project()
|
||||
|
||||
void ProjectPanel::set_project(Project *p)
|
||||
{
|
||||
if (project()) {
|
||||
disconnect(project(), &Project::NameChanged, this, &ProjectPanel::ProjectNameChanged);
|
||||
}
|
||||
|
||||
explorer_->set_project(p);
|
||||
|
||||
Retranslate();
|
||||
if (project()) {
|
||||
connect(project(), &Project::NameChanged, this, &ProjectPanel::ProjectNameChanged);
|
||||
}
|
||||
|
||||
ProjectNameChanged();
|
||||
}
|
||||
|
||||
QList<Item *> ProjectPanel::SelectedItems()
|
||||
@@ -112,11 +120,7 @@ void ProjectPanel::Retranslate()
|
||||
{
|
||||
SetTitle(tr("Project"));
|
||||
|
||||
if (project() == nullptr) {
|
||||
SetSubtitle(tr("(none)"));
|
||||
} else {
|
||||
SetSubtitle(project()->name());
|
||||
}
|
||||
ProjectNameChanged();
|
||||
}
|
||||
|
||||
void ProjectPanel::ItemDoubleClickSlot(Item *item)
|
||||
@@ -141,3 +145,12 @@ void ProjectPanel::ShowNewMenu()
|
||||
|
||||
new_menu.exec(QCursor::pos());
|
||||
}
|
||||
|
||||
void ProjectPanel::ProjectNameChanged()
|
||||
{
|
||||
if (project() == nullptr) {
|
||||
SetSubtitle(tr("(none)"));
|
||||
} else {
|
||||
SetSubtitle(project()->name());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user