diff options
author | 2009-09-25 23:43:25 -0400 | |
---|---|---|
committer | 2009-09-25 23:43:25 -0400 | |
commit | 90f6f0a84a84542eabcc460bd5d2cd5c66b05943 (patch) | |
tree | 905b6a23ccc01d53abaa4a4fce9fb7323cb6426d | |
parent | Display for video object. (diff) | |
download | AnyRip-90f6f0a84a84542eabcc460bd5d2cd5c66b05943.tar.xz AnyRip-90f6f0a84a84542eabcc460bd5d2cd5c66b05943.zip |
Layout magic
-rw-r--r-- | main.cpp | 8 | ||||
-rw-r--r-- | videogui.cpp | 23 |
2 files changed, 23 insertions, 8 deletions
@@ -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) { |