start moving core frameworks to external libraries
This commit is contained in:
@@ -27,7 +27,6 @@
|
||||
|
||||
#include "core.h"
|
||||
#include "common/range.h"
|
||||
#include "common/timecodefunctions.h"
|
||||
#include "dialog/sequence/sequence.h"
|
||||
#include "dialog/speedduration/speeddurationdialog.h"
|
||||
#include "node/block/transition/transition.h"
|
||||
@@ -660,7 +659,7 @@ bool TimelineWidget::CopySelected(bool cut)
|
||||
}
|
||||
|
||||
foreach (Block* block, selected_blocks_) {
|
||||
properties[block][QStringLiteral("in")] = (block->in() - earliest_in).toString();
|
||||
properties[block][QStringLiteral("in")] = QString::fromStdString((block->in() - earliest_in).toString());
|
||||
properties[block][QStringLiteral("track")] = block->track()->ToReference().ToString();
|
||||
}
|
||||
|
||||
@@ -1978,7 +1977,7 @@ bool TimelineWidget::PasteInternal(bool insert)
|
||||
|
||||
for (auto it=res.GetLoadData().properties.cbegin(); it!=res.GetLoadData().properties.cend(); it++) {
|
||||
rational length = static_cast<Block*>(it.key())->length();
|
||||
rational in = rational::fromString(it.value()[QStringLiteral("in")]);
|
||||
rational in = rational::fromString(it.value()[QStringLiteral("in")].toStdString());
|
||||
|
||||
paste_end = qMax(paste_end, paste_start + in + length);
|
||||
}
|
||||
@@ -1990,7 +1989,7 @@ bool TimelineWidget::PasteInternal(bool insert)
|
||||
|
||||
for (auto it=res.GetLoadData().properties.cbegin(); it!=res.GetLoadData().properties.cend(); it++) {
|
||||
Block *block = static_cast<Block*>(it.key());
|
||||
rational in = rational::fromString(it.value()[QStringLiteral("in")]);
|
||||
rational in = rational::fromString(it.value()[QStringLiteral("in")].toStdString());
|
||||
Track::Reference track = Track::Reference::FromString(it.value()[QStringLiteral("track")]);
|
||||
|
||||
command->add_child(new TrackPlaceBlockCommand(sequence()->track_list(track.type()),
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
|
||||
#include <QHash>
|
||||
|
||||
#include "common/timerange.h"
|
||||
#include "node/output/track/track.h"
|
||||
|
||||
namespace olive {
|
||||
|
||||
@@ -150,9 +150,9 @@ void ImportTool::DragMove(TimelineViewMouseEvent *event)
|
||||
|
||||
// Generate tooltip (showing earliest in point of imported clip)
|
||||
rational tooltip_timebase = parent()->GetTimebaseForTrackType(event->GetTrack().type());
|
||||
QString tooltip_text = Timecode::time_to_timecode(earliest_ghost,
|
||||
tooltip_timebase,
|
||||
Core::instance()->GetTimecodeDisplay());
|
||||
QString tooltip_text = QString::fromStdString(Timecode::time_to_timecode(earliest_ghost,
|
||||
tooltip_timebase,
|
||||
Core::instance()->GetTimecodeDisplay()));
|
||||
|
||||
// Force tooltip to update (otherwise the tooltip won't move as written in the documentation, and could get in the way
|
||||
// of the cursor)
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#include "common/clamp.h"
|
||||
#include "common/qtutils.h"
|
||||
#include "common/range.h"
|
||||
#include "common/timecodefunctions.h"
|
||||
#include "config/config.h"
|
||||
#include "core.h"
|
||||
#include "node/block/gap/gap.h"
|
||||
@@ -596,10 +595,10 @@ void PointerTool::ProcessDrag(const TimelineCoordinate &mouse_pos)
|
||||
rational tooltip_timebase = parent()->GetTimebaseForTrackType(drag_start_.GetTrack().type());
|
||||
QToolTip::hideText();
|
||||
QToolTip::showText(QCursor::pos(),
|
||||
Timecode::time_to_timecode(time_movement,
|
||||
tooltip_timebase,
|
||||
Core::instance()->GetTimecodeDisplay(),
|
||||
true),
|
||||
QString::fromStdString(Timecode::time_to_timecode(time_movement,
|
||||
tooltip_timebase,
|
||||
Core::instance()->GetTimecodeDisplay(),
|
||||
true)),
|
||||
parent());
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
|
||||
#include <QToolTip>
|
||||
|
||||
#include "common/timecodefunctions.h"
|
||||
#include "config/config.h"
|
||||
#include "slip.h"
|
||||
#include "widget/timelinewidget/undo/timelineundogeneral.h"
|
||||
@@ -58,10 +57,10 @@ void SlipTool::ProcessDrag(const TimelineCoordinate &mouse_pos)
|
||||
rational tooltip_timebase = parent()->GetTimebaseForTrackType(drag_start_.GetTrack().type());
|
||||
QToolTip::hideText();
|
||||
QToolTip::showText(QCursor::pos(),
|
||||
Timecode::time_to_timecode(time_movement,
|
||||
tooltip_timebase,
|
||||
Core::instance()->GetTimecodeDisplay(),
|
||||
true),
|
||||
QString::fromStdString(Timecode::time_to_timecode(time_movement,
|
||||
tooltip_timebase,
|
||||
Core::instance()->GetTimecodeDisplay(),
|
||||
true)),
|
||||
parent());
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
|
||||
#include <QDragLeaveEvent>
|
||||
|
||||
#include "common/rational.h"
|
||||
#include "widget/nodeview/nodeviewundo.h"
|
||||
#include "widget/timelinewidget/view/timelineviewghostitem.h"
|
||||
#include "widget/timelinewidget/view/timelineviewmouseevent.h"
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
|
||||
#include "config/config.h"
|
||||
#include "common/qtutils.h"
|
||||
#include "common/timecodefunctions.h"
|
||||
#include "node/project/footage/footage.h"
|
||||
#include "panel/panelmanager.h"
|
||||
#include "panel/timeline/timeline.h"
|
||||
@@ -106,9 +105,9 @@ void TimelineView::mouseMoveEvent(QMouseEvent *event)
|
||||
Block* b = GetItemAtScenePos(timeline_event.GetFrame(), timeline_event.GetTrack().index());
|
||||
if (b) {
|
||||
setToolTip(tr("In: %1\nOut: %2\nDuration: %3").arg(
|
||||
Timecode::time_to_timecode(b->in(), timebase(), Core::instance()->GetTimecodeDisplay()),
|
||||
Timecode::time_to_timecode(b->out(), timebase(), Core::instance()->GetTimecodeDisplay()),
|
||||
Timecode::time_to_timecode(b->length(), timebase(), Core::instance()->GetTimecodeDisplay())
|
||||
QString::fromStdString(Timecode::time_to_timecode(b->in(), timebase(), Core::instance()->GetTimecodeDisplay())),
|
||||
QString::fromStdString(Timecode::time_to_timecode(b->out(), timebase(), Core::instance()->GetTimecodeDisplay())),
|
||||
QString::fromStdString(Timecode::time_to_timecode(b->length(), timebase(), Core::instance()->GetTimecodeDisplay()))
|
||||
));
|
||||
} else {
|
||||
setToolTip(QString());
|
||||
@@ -416,7 +415,7 @@ void TimelineView::DrawBlock(QPainter *painter, bool foreground, Block *block, q
|
||||
block_right - block_left,
|
||||
block_height);
|
||||
|
||||
QColor shadow_color = block->is_enabled() ? block->color().toQColor().darker() : QColor(Qt::darkGray).darker();
|
||||
QColor shadow_color = block->is_enabled() ? QtUtils::toQColor(block->color()).darker() : QColor(Qt::darkGray).darker();
|
||||
|
||||
const qreal MINIMUM_RECT_WIDTH = 2;
|
||||
const qreal MINIMUM_DETAIL_WIDTH = 8;
|
||||
|
||||
Reference in New Issue
Block a user