massive rewrite of project data system
This commit is contained in:
+19
-4
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user