m_ui->paths->setText(QDir::toNativeSeparators(paths.join(";")));
}
+int AniDBConfigDialog::opSkip() const
+{
+ return m_ui->opSkip->value();
+}
+
+void AniDBConfigDialog::setOpSkip(int seconds)
+{
+ m_ui->opSkip->setValue(seconds);
+}
+
AniDBConfigDialog::~AniDBConfigDialog()
{
delete m_ui;
QStringList paths() const;
void setPaths(const QStringList &paths);
+ int opSkip() const;
+ void setOpSkip(int seconds);
+
protected:
virtual void changeEvent(QEvent *e);
<rect>
<x>0</x>
<y>0</y>
- <width>400</width>
- <height>300</height>
+ <width>280</width>
+ <height>348</height>
</rect>
</property>
<property name="windowTitle">
- <string>AniDB Config</string>
+ <string>AniPlayer Settings</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<property name="title">
<string>AniDB Connection Settings</string>
</property>
- <layout class="QFormLayout" name="formLayout">
+ <layout class="QFormLayout" name="formLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="lHost">
<property name="text">
</property>
</widget>
</item>
- <item row="5" column="0">
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_2">
+ <property name="title">
+ <string>Automark</string>
+ </property>
+ <layout class="QFormLayout" name="formLayout">
+ <item row="0" column="0">
<widget class="QLabel" name="lAutomark">
<property name="text">
<string>Automark on:</string>
</property>
</widget>
</item>
- <item row="5" column="1">
+ <item row="0" column="1">
<widget class="QSpinBox" name="automark">
<property name="specialValueText">
<string>Disabled</string>
<property name="suffix">
<string>%</string>
</property>
+ <property name="minimum">
+ <number>0</number>
+ </property>
<property name="maximum">
<number>100</number>
</property>
+ <property name="value">
+ <number>0</number>
+ </property>
</widget>
</item>
- <item row="6" column="1">
- <widget class="QLineEdit" name="paths"/>
- </item>
- <item row="6" column="0">
+ <item row="1" column="0">
<widget class="QLabel" name="lPaths">
<property name="text">
<string>Paths:</string>
</property>
</widget>
</item>
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="paths"/>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_3">
+ <property name="title">
+ <string>OP/ED skip</string>
+ </property>
+ <layout class="QFormLayout" name="formLayout_3">
+ <item row="0" column="0">
+ <widget class="QLabel" name="lOpSkip">
+ <property name="text">
+ <string>Skip:</string>
+ </property>
+ <property name="buddy">
+ <cstring>opSkip</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QSpinBox" name="opSkip">
+ <property name="suffix">
+ <string>s</string>
+ </property>
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ <property name="maximum">
+ <number>1000</number>
+ </property>
+ <property name="singleStep">
+ <number>5</number>
+ </property>
+ <property name="value">
+ <number>85</number>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
</item>
</layout>
</widget>
+ <tabstops>
+ <tabstop>host</tabstop>
+ <tabstop>hostPort</tabstop>
+ <tabstop>localPort</tabstop>
+ <tabstop>user</tabstop>
+ <tabstop>pass</tabstop>
+ <tabstop>groupBox_2</tabstop>
+ <tabstop>automark</tabstop>
+ <tabstop>paths</tabstop>
+ <tabstop>opSkip</tabstop>
+ <tabstop>buttonBox</tabstop>
+ </tabstops>
<resources/>
<connections>
<connection>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
- <x>257</x>
- <y>290</y>
+ <x>266</x>
+ <y>338</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
- <x>325</x>
- <y>290</y>
+ <x>270</x>
+ <y>338</y>
</hint>
<hint type="destinationlabel">
- <x>286</x>
+ <x>279</x>
<y>274</y>
</hint>
</hints>
addAction("volUp", "Volume Up", QKeySequence("+"));
addAction("volDown", "Volume Down", QKeySequence("-"));
- addAction("skip85sec", "Skip 1:25", QKeySequence("/"));
+ addAction("opSkip", "OP/ED Skip", QKeySequence("/"));
addAction("back1sec", "Back 1 second", QKeySequence("m"));
videoPlayer->videoWidget()->addActions(actions());
connect(m_actions["volUp"], SIGNAL(triggered()), videoPlayer, SLOT(volumeUp()));
connect(m_actions["volDown"], SIGNAL(triggered()), videoPlayer, SLOT(volumeDown()));
- connect(m_actions["skip85sec"], SIGNAL(triggered()), videoPlayer, SLOT(skip()));
+ connect(m_actions["opSkip"], SIGNAL(triggered()), this, SLOT(opSkip()));
connect(m_actions["back1sec"], SIGNAL(triggered()), this, SLOT(skipback()));
connect(videoPlayer->videoWidget(), SIGNAL(menuToggleRequested()), this, SLOT(toggleMenu()));
videoPlayer->skip(-1000);
}
+void VideoWindow::opSkip()
+{
+ videoPlayer->skip(m_opSkip * 1000);
+}
+
void VideoWindow::resizeToVideo()
{
#ifdef GRAPHICS_VIEW_VIDEO
void VideoWindow::markingStatus(AniDBUdpClient::File::Action action, AniDBUdpClient::File::ActionState actionState, int percent)
{
AniDBUdpClient::File *file = (AniDBUdpClient::File *) sender();
+
switch (action)
{
case AniDBUdpClient::File::Hashing:
menu->showMessage(tr("Hashing File... %1%").arg(percent));
break;
case AniDBUdpClient::File::Success:
- menu->showMessage(tr("Hashing File complete!").arg(percent));
+ menu->showMessage(tr("Hashing File complete!"));
break;
default: ;
}
case AniDBUdpClient::File::Failure:
menu->showMessage(tr("Failed to mark file %1 as watched").arg(file->file().fileName()));
break;
- default: ;
+ default: ;
}
break;
default: ;
dialog.setPass(AniDBUdpClient::Client::instance()->pass());
dialog.setAutomark(m_automark);
dialog.setPaths(m_automarkPaths);
+ dialog.setOpSkip(m_opSkip);
if (!dialog.exec())
{
AniDBUdpClient::Client::instance()->setPass(dialog.pass());
m_automark = dialog.automark();
m_automarkPaths = dialog.paths();
+ m_opSkip = dialog.opSkip();
updateAutomarkable();
}
settings.setValue("currentFile", videoPlayer->currentFile());
settings.setValue("volume", videoPlayer->audioOutput()->volume());
settings.setValue("muted", videoPlayer->audioOutput()->isMuted());
+ settings.setValue("opSkip", m_opSkip);
settings.endGroup();
settings.beginGroup("videoWindow");
settings.setValue("geometry", saveGeometry());
open(settings.value("currentFile", "").toString());
videoPlayer->audioOutput()->setVolume(settings.value("volume", qreal(1.0)).toDouble());
videoPlayer->audioOutput()->setMuted(settings.value("muted", false).toBool());
+ m_opSkip = settings.value("opSkip", 85).toInt();
settings.endGroup();
settings.beginGroup("videoWindow");
restoreGeometry(settings.value("geometry", saveGeometry()).toByteArray());
void play(const QString &file, bool closeOnStop = false);
void skipback();
+ void opSkip();
void resizeToVideo();
void setPinMenu(bool pinned);
bool m_closeOnStop;
+ int m_opSkip;
+
#ifndef NO_ANIDBUDPCLIENT
int m_automark;
QStringList m_automarkPaths;