massive rewrite of project data system

This commit is contained in:
itsmattkc
2018-12-13 14:29:09 +11:00
parent 6c3197aac6
commit ac1cb9d14f
44 changed files with 2562 additions and 2158 deletions
+19 -4
View File
@@ -6,25 +6,40 @@
#include <QProgressBar>
#include <QPushButton>
LoadDialog::LoadDialog(QWidget *parent) : QDialog(parent) {
#include "panels/panels.h"
#include "panels/project.h"
#include "io/loadthread.h"
#include "playback/playback.h"
#include "ui/sourcetable.h"
LoadDialog::LoadDialog(QWidget *parent, bool autorecovery) : QDialog(parent) {
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
QVBoxLayout* layout = new QVBoxLayout();
setLayout(layout);
layout->addWidget(new QLabel("Loading ''..."));
layout->addWidget(new QLabel("Loading '" + project_url.mid(project_url.lastIndexOf('/')+1) + "'..."));
bar = new QProgressBar();
bar->setValue(50);
layout->addWidget(bar);
QPushButton* cancel_button = new QPushButton("Cancel");
cancel_button = new QPushButton("Cancel");
connect(cancel_button, SIGNAL(clicked(bool)), this, SLOT(reject()));
QHBoxLayout* hboxLayout = new QHBoxLayout();
hboxLayout = new QHBoxLayout();
hboxLayout->addStretch();
hboxLayout->addWidget(cancel_button);
hboxLayout->addStretch();
layout->addLayout(hboxLayout);
LoadThread* lt = new LoadThread(this, autorecovery);
QObject::connect(lt, SIGNAL(success()), this, SLOT(thread_done()));
lt->start();
}
void LoadDialog::thread_done() {
// project_model.update_data();
close();
}