minor improvements
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>2</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
#include "speeddialog.h"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QGridLayout>
|
||||
#include <QLabel>
|
||||
#include <QCheckBox>
|
||||
#include <QPushButton>
|
||||
#include <QDialogButtonBox>
|
||||
|
||||
#include "ui/labelslider.h"
|
||||
|
||||
SpeedDialog::SpeedDialog(QWidget *parent) : QDialog(parent) {
|
||||
QGridLayout* layout = new QGridLayout();
|
||||
layout->setSpacing(6);
|
||||
layout->setMargin(9);
|
||||
|
||||
setLayout(layout);
|
||||
|
||||
layout->addWidget(new QLabel("Speed:"), 0, 0);
|
||||
percent = new LabelSlider();
|
||||
percent->set_display_type(LABELSLIDER_PERCENT);
|
||||
layout->addWidget(percent, 0, 1);
|
||||
|
||||
layout->addWidget(new QLabel("Frame Rate:"), 1, 0);
|
||||
frame_rate = new LabelSlider();
|
||||
layout->addWidget(frame_rate, 1, 1);
|
||||
|
||||
layout->addWidget(new QLabel("Duration:"), 2, 0);
|
||||
duration = new LabelSlider();
|
||||
duration->set_display_type(LABELSLIDER_FRAMENUMBER);
|
||||
layout->addWidget(duration, 2, 1);
|
||||
|
||||
QHBoxLayout* reverseLayout = new QHBoxLayout();
|
||||
reverse = new QCheckBox("Reverse");
|
||||
reverseLayout->addWidget(reverse);
|
||||
layout->addLayout(reverseLayout, 3, 0, 2, 1);
|
||||
|
||||
QDialogButtonBox* buttonBox = new QDialogButtonBox(this, QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
|
||||
layout->addWidget(buttonBox, 4, 0, 2, 1);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
#ifndef SPEEDDIALOG_H
|
||||
#define SPEEDDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
struct Clip;
|
||||
class LabelSlider;
|
||||
class QCheckBox;
|
||||
|
||||
class SpeedDialog : public QDialog
|
||||
{
|
||||
public:
|
||||
SpeedDialog(QWidget* parent = 0);
|
||||
QVector<Clip*> clips;
|
||||
private:
|
||||
LabelSlider* percent;
|
||||
LabelSlider* duration;
|
||||
LabelSlider* frame_rate;
|
||||
|
||||
QCheckBox* reverse;
|
||||
};
|
||||
|
||||
#endif // SPEEDDIALOG_H
|
||||
@@ -0,0 +1,107 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>SpeedDialog</class>
|
||||
<widget class="QDialog" name="SpeedDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>240</y>
|
||||
<width>341</width>
|
||||
<height>32</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
<width>47</width>
|
||||
<height>13</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Speed:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>50</y>
|
||||
<width>47</width>
|
||||
<height>13</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Frame Rate:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>80</y>
|
||||
<width>47</width>
|
||||
<height>13</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Duration:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>SpeedDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>SpeedDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
Reference in New Issue
Block a user