work towards project explorer navigation bar

This commit is contained in:
itsmattkc
2019-07-02 16:46:09 -07:00
parent 85b5bbd5d6
commit 0f7192fc33
16 changed files with 274 additions and 32 deletions
+4 -10
View File
@@ -77,16 +77,6 @@ void Footage::set_timestamp(const QDateTime &t)
timestamp_ = t;
}
const rational &Footage::duration()
{
return duration_;
}
void Footage::set_duration(const rational &duration)
{
duration_ = duration;
}
void Footage::add_stream(Stream *s)
{
// Add a copy of this stream to the list
@@ -142,6 +132,7 @@ void Footage::UpdateIcon()
{
switch (status_) {
case kUnprobed:
case kUnindexed:
// FIXME Set a waiting icon
set_icon(QIcon());
break;
@@ -178,6 +169,9 @@ void Footage::UpdateTooltip()
case kUnprobed:
set_tooltip(QCoreApplication::translate("Footage", "Waiting for probe"));
break;
case kUnindexed:
set_tooltip(QCoreApplication::translate("Footage", "Waiting for index"));
break;
case kReady:
{
QString tip = QCoreApplication::translate("Footage", "Filename: %1").arg(filename());
+1 -8
View File
@@ -34,6 +34,7 @@ class Footage : public Item
public:
enum Status {
kUnprobed,
kUnindexed,
kReady,
kInvalid
};
@@ -138,10 +139,6 @@ public:
*/
void set_timestamp(const QDateTime& t);
const rational& duration();
void set_duration(const rational& duration);
/**
* @brief Add a stream metadata object to this footage
*
@@ -232,10 +229,6 @@ private:
*/
Status status_;
/**
* @brief Media duration
*/
rational duration_;
};
#endif // FOOTAGE_H
+10
View File
@@ -70,3 +70,13 @@ void Stream::set_index(const int &index)
{
index_ = index;
}
const int64_t &Stream::duration()
{
return duration_;
}
void Stream::set_duration(const int64_t &duration)
{
duration_ = duration;
}
+5
View File
@@ -68,11 +68,16 @@ public:
const int& index();
void set_index(const int& index);
const int64_t& duration();
void set_duration(const int64_t& duration);
private:
Footage* footage_;
rational timebase_;
int64_t duration_;
int index_;
Type type_;