summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2009-08-10 20:00:26 -0400
committerJason A. Donenfeld <Jason@zx2c4.com>2009-08-10 20:00:26 -0400
commitcecea58356435bc499e021013a60ef8abebb5e78 (patch)
tree8672d7ea65d34fb3813589e7860e8c088b06e26f
parentReset offset time (diff)
downloadSubtitler-cecea58356435bc499e021013a60ef8abebb5e78.tar.xz
Subtitler-cecea58356435bc499e021013a60ef8abebb5e78.zip
Formatting and OSX changes
-rw-r--r--main.cpp6
-rw-r--r--moviefileselectorpage.h2
-rw-r--r--subtitleparser.cpp8
-rw-r--r--subtitleparser.h26
-rw-r--r--subtitlepreviewpage.cpp1
-rw-r--r--subtitlewizard.h2
6 files changed, 22 insertions, 23 deletions
diff --git a/main.cpp b/main.cpp
index 56f4937..38162de 100644
--- a/main.cpp
+++ b/main.cpp
@@ -9,7 +9,7 @@ int main(int argc, char *argv[])
a.setOrganizationName(QLatin1String("AnyClip"));
a.setOrganizationDomain(QLatin1String("anyclip.com"));
qRegisterMetaType<SubtitleParser*>("SubtitleParser*");
- SubtitleWizard w;
- w.show();
- return a.exec();
+ SubtitleWizard w;
+ w.show();
+ return a.exec();
}
diff --git a/moviefileselectorpage.h b/moviefileselectorpage.h
index 98f944a..2788cb4 100644
--- a/moviefileselectorpage.h
+++ b/moviefileselectorpage.h
@@ -9,7 +9,6 @@ class MovieFileHolder : public QListWidget
{
Q_OBJECT
Q_PROPERTY(QStringList movieFile READ movieFile NOTIFY currentItemChanged)
-
public:
MovieFileHolder(QWidget *parent = 0);
QStringList movieFile();
@@ -25,7 +24,6 @@ private:
MovieFileHolder *m_movieList;
void initializePage();
bool isComplete() const;
-
};
#endif // MOVIEFILESELECTORPAGE_H
diff --git a/subtitleparser.cpp b/subtitleparser.cpp
index 0942eda..cca19b9 100644
--- a/subtitleparser.cpp
+++ b/subtitleparser.cpp
@@ -76,10 +76,10 @@ quint64 SubtitleParser::parseTime(QString time)
if (secs.length() != 2)
return 0;
return
- split[0].toULongLong() * 60 * 60 * 1000 +
- split[1].toULongLong() * 60 * 1000 +
- secs[0].toULongLong() * 1000 +
- secs[1].toULongLong();
+ split[0].toULongLong() * 60 * 60 * 1000 +
+ split[1].toULongLong() * 60 * 1000 +
+ secs[0].toULongLong() * 1000 +
+ secs[1].toULongLong();
}
QString SubtitleParser::fileName() const
{
diff --git a/subtitleparser.h b/subtitleparser.h
index b864264..babfcc6 100644
--- a/subtitleparser.h
+++ b/subtitleparser.h
@@ -8,19 +8,19 @@
class Subtitle
{
- public:
- Subtitle(QString text, quint64 start, quint64 stop);
- bool isContainedIn(quint64 time) const;
- void offsetTime(qint64 time);
- QString text() const;
- bool isAfter(quint64 time) const;
- const QString toString() const;
- private:
- quint64 m_start;
- quint64 m_stop;
- qint64 m_offset;
- QString m_text;
- const QString formatTime(quint64 time) const;
+public:
+ Subtitle(QString text, quint64 start, quint64 stop);
+ bool isContainedIn(quint64 time) const;
+ void offsetTime(qint64 time);
+ QString text() const;
+ bool isAfter(quint64 time) const;
+ const QString toString() const;
+private:
+ quint64 m_start;
+ quint64 m_stop;
+ qint64 m_offset;
+ QString m_text;
+ const QString formatTime(quint64 time) const;
};
class SubtitleParser
{
diff --git a/subtitlepreviewpage.cpp b/subtitlepreviewpage.cpp
index 7bc0617..a284a13 100644
--- a/subtitlepreviewpage.cpp
+++ b/subtitlepreviewpage.cpp
@@ -67,6 +67,7 @@ bool SubtitlePreviewPage::validatePage()
}
void SubtitlePreviewPage::showSub(qint64 time)
{
+ if (!m_subtitleParser) return;
m_subTitle->setText(QString("<big><center>%1</center></big>").arg(m_subtitleParser->subtitleAtTime(time)));
}
void SubtitlePreviewPage::offsetSub(double timeOffset)
diff --git a/subtitlewizard.h b/subtitlewizard.h
index ddf50ab..fefd8e4 100644
--- a/subtitlewizard.h
+++ b/subtitlewizard.h
@@ -7,7 +7,7 @@
class SubtitleBrowserPage;
class SubtitleWizard : public QWizard
{
- Q_OBJECT
+ Q_OBJECT
public:
SubtitleWizard(QWidget *parent = 0);