+#include "clip_list.h"
+
#include "mainwindow.h"
+#include "timebase.h"
+#include "ui_mainwindow.h"
#include <math.h>
#include <string>
#include <vector>
-#include "clip_list.h"
-#include "timebase.h"
-#include "ui_mainwindow.h"
-
using namespace std;
string pts_to_string(int64_t pts)
return buf;
}
-int ClipList::rowCount(const QModelIndex &parent) const {
- if (parent.isValid()) return 0;
+int ClipList::rowCount(const QModelIndex &parent) const
+{
+ if (parent.isValid())
+ return 0;
return clips.size();
}
-int PlayList::rowCount(const QModelIndex &parent) const {
- if (parent.isValid()) return 0;
+int PlayList::rowCount(const QModelIndex &parent) const
+{
+ if (parent.isValid())
+ return 0;
return clips.size();
}
-int ClipList::columnCount(const QModelIndex &parent) const {
- if (parent.isValid()) return 0;
+int ClipList::columnCount(const QModelIndex &parent) const
+{
+ if (parent.isValid())
+ return 0;
return int(Column::NUM_COLUMNS);
}
-int PlayList::columnCount(const QModelIndex &parent) const {
- if (parent.isValid()) return 0;
+int PlayList::columnCount(const QModelIndex &parent) const
+{
+ if (parent.isValid())
+ return 0;
return int(Column::NUM_COLUMNS);
}
-QVariant ClipList::data(const QModelIndex &parent, int role) const {
+QVariant ClipList::data(const QModelIndex &parent, int role) const
+{
if (!parent.isValid())
return QVariant();
const int row = parent.row(), column = parent.column();
}
}
-QVariant PlayList::data(const QModelIndex &parent, int role) const {
+QVariant PlayList::data(const QModelIndex &parent, int role) const
+{
if (!parent.isValid())
return QVariant();
const int row = parent.row(), column = parent.column();
}
}
-QVariant ClipList::headerData(int section, Qt::Orientation orientation, int role) const {
+QVariant ClipList::headerData(int section, Qt::Orientation orientation, int role) const
+{
if (role != Qt::DisplayRole)
return QVariant();
if (orientation != Qt::Horizontal)
}
}
-QVariant PlayList::headerData(int section, Qt::Orientation orientation, int role) const {
+QVariant PlayList::headerData(int section, Qt::Orientation orientation, int role) const
+{
if (role != Qt::DisplayRole)
return QVariant();
if (orientation != Qt::Horizontal)
beginMoveRows(QModelIndex(), first, last, QModelIndex(), first - 1);
rotate(clips.begin() + first - 1, clips.begin() + first, clips.begin() + last + 1);
} else {
- beginMoveRows(QModelIndex(), first, last, QModelIndex(), first + (last-first+1) + 1);
+ beginMoveRows(QModelIndex(), first, last, QModelIndex(), first + (last - first + 1) + 1);
first = clips.size() - first - 1;
last = clips.size() - last - 1;
rotate(clips.rbegin() + last - 1, clips.rbegin() + last, clips.rbegin() + first + 1);