summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main.cpp8
-rw-r--r--videogui.cpp23
2 files changed, 23 insertions, 8 deletions
diff --git a/main.cpp b/main.cpp
index ef28e50..d0f036b 100644
--- a/main.cpp
+++ b/main.cpp
@@ -1,14 +1,16 @@
#include "dvddrive.h"
+#include "videogui.h"
+#include "video.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
-
- DVDDrive drive;
- drive.eject();
a.setApplicationName(QLatin1String("AnyRip"));
a.setOrganizationName(QLatin1String("AnyClip"));
a.setOrganizationDomain(QLatin1String("anyclip.com"));
+ DVDDrive drive;
+ Video v(drive.dvdName());
+ v.gui()->show();
return a.exec();
}
diff --git a/videogui.cpp b/videogui.cpp
index f837132..6b952d3 100644
--- a/videogui.cpp
+++ b/videogui.cpp
@@ -1,21 +1,34 @@
#include "videogui.h"
#include <QCheckBox>
+#include <QHBoxLayout>
+#include <QLabel>
VideoGui::VideoGui(Video *video) :
m_video(video)
{
m_imageCheck = new QCheckBox(tr("Copied DVD ISO"), this);
- m_imageCheck->setEnabled(false);
+ m_imageCheck->setCheckable(false);
m_encodeCheck = new QCheckBox(tr("Encoded MP4"), this);
- m_encodeCheck->setEnabled(false);
+ m_encodeCheck->setCheckable(false);
m_uploadCheck = new QCheckBox(tr("Uploaded MP4"), this);
- m_uploadCheck->setEnabled(false);
- m_titleLoadCheck = new QCheckBox(tr("Title-loaded"), this);
- m_titleLoadCheck->setEnabled(false);
+ m_uploadCheck->setCheckable(false);
+ m_titleLoadCheck = new QCheckBox(tr("Title-Loaded"), this);
+ m_titleLoadCheck->setCheckable(false);
m_subtitleCheck = new QCheckBox(tr("Found Subtitle"), this);
+ m_subtitleCheck->setCheckable(false);
m_posterCheck = new QCheckBox(tr("Found Poster"), this);
+ m_posterCheck->setCheckable(false);
//TODO: actions for checking subtitle and poster check to actually do it
connect(video, SIGNAL(jobCompleted(Video::Jobs,bool)), this, SLOT(jobCompleted(Video::Jobs,bool)));
+ QHBoxLayout *layout = new QHBoxLayout;
+ layout->addWidget(new QLabel(QString("<b>%1: </b>").arg(video->title())));
+ layout->addWidget(m_imageCheck);
+ layout->addWidget(m_encodeCheck);
+ layout->addWidget(m_uploadCheck);
+ layout->addWidget(m_titleLoadCheck);
+ layout->addWidget(m_subtitleCheck);
+ layout->addWidget(m_posterCheck);
+ setLayout(layout);
}
void VideoGui::jobCompleted(Video::Jobs jobType, bool success)
{