int br_startx = (int)(br.x() + offset);
int br_starty = (int)(br.y());
int br_halfy = (int)(br.y() + br.height() / 2 - offset);
- int br_endy = (int)(br.y() + br.height());
roundRectPathUpper.moveTo(br_endx , br_halfy);
roundRectPathUpper.arcTo(br_endx - roundingX , br_starty , roundingX, roundingY, 0.0, 90.0);
int br_endx = (int)(br.x() + br .width() - offset);
int br_startx = (int)(br.x() + offset);
- int br_starty = (int)(br.y());
int br_halfy = (int)(br.y() + br.height() / 2 - offset);
int br_endy = (int)(br.y() + br.height() - 1);
else {
bool forwardMove = newPos.x() > start.x();
int offset = 0;
- const double width = sceneBoundingRect().width() + 1;
for (int i = 0; i < collindingItems.count(); i++) {
QGraphicsItem *collision = collindingItems.at(i);
if (collision->type() == AVWIDGET) {
QString keyframes;
if (m_keyframes.count() > 1) {
QMap<int, double>::const_iterator i = m_keyframes.constBegin();
- double x1;
- double y1;
while (i != m_keyframes.constEnd()) {
keyframes.append(QString::number(i.key()) + ':' + QString::number(i.value()) + ';');
++i;
QList < CommentedTime >::Iterator it = markers.begin();
GenTime pos;
double framepos;
- const int markerwidth = 4;
QBrush markerBrush;
markerBrush = QBrush(QColor(120, 120, 0, 140));
QPen pen = painter->pen();
QList < GenTime > snaps;
QList < GenTime > markers = baseClip()->snapMarkers();
GenTime pos;
- double framepos;
for (int i = 0; i < markers.size(); i++) {
pos = markers.at(i) - cropStart();
QList < CommentedTime > snaps;
QList < CommentedTime > markers = baseClip()->commentedSnapMarkers();
GenTime pos;
- double framepos;
for (int i = 0; i < markers.size(); i++) {
pos = markers.at(i).time() - cropStart();
m_dragItem = NULL;
return;
} else if (m_operationMode == SPACER) {
- int endClick = (int)(mapToScene(event->pos()).x() + 0.5);
- int mappedClick = (int)(mapToScene(m_clickEvent).x() + 0.5);
int track = (int)(mapToScene(m_clickEvent).y() / m_tracksHeight);
if (m_selectionGroup->sceneBoundingRect().height() > m_tracksHeight) {
// We are moving all tracks
}*/
if (track == -1 || (m_clipType != AUDIO && m_clipType != AV)) {
if (m_baseTrackProducers.count() == 0) return NULL;
- int i;
for (int i = 0; i < m_baseTrackProducers.count(); i++) {
if (m_baseTrackProducers.at(i) != NULL)
return m_baseTrackProducers.at(i);
scene = new GraphicsSceneRectMove(this);
scene->setTool(TITLE_SELECT);
view->setScene(scene);
- double aspect = (double) profile.sample_aspect_num / profile.sample_aspect_den * profile.width / profile.height;
QGraphicsRectItem *m_frameBorder = new QGraphicsRectItem(QRectF(0, 0, profile.width, profile.height));
m_frameBorder->setZValue(-1100);
m_frameBorder->setBrush(QColor(255, 255, 0, 30));
void GraphicsSceneRectMove::wheelEvent(QGraphicsSceneWheelEvent * wheelEvent) {
QList<QGraphicsView*> viewlist = views();
//kDebug() << wheelEvent->delta() << " " << zoom;
- double scale = 1.0;
if (viewlist.size() > 0) {
if (wheelEvent->delta() < 0) emit sceneZoom(true);
else emit sceneZoom(false);
// Parse effect file
if ((filtersList.contains(tag) || producersList.contains(tag)) && ladspaOk) {
- bool isAudioEffect = false;
QString type = documentElement.attribute("type", QString());
if (type == "audio") audioEffectList->append(documentElement);
else if (type == "custom") customEffectList->append(documentElement);
void KdenliveDoc::addClip(QDomElement elem, QString clipId, bool createClipItem) {
const QString producerId = clipId.section('_', 0, 0);
- int subtrack = clipId.section('_', 1, 1).toInt();
DocClipBase *clip = m_clipManager->getClipById(producerId);
if (clip == NULL) {
/*kDebug()<<"// CLIP "<<clipId<<" NOT OFUND in LIST, CREATING";
void MainWindow::slotGetNewLumaStuff() {
//KNS::Entry::List download();
KNS::Entry::List entries = KNS::Engine::download();
- int numberInstalled = 0;
// list of changed entries
kDebug() << "// PARSING KNS";
foreach(KNS::Entry* entry, entries) {
if (movepoint != NULL) {
QList<KPlotPoint*> list = pointsUnderPoint(event->pos() - QPoint(leftPadding(), topPadding())) ;
- int i = 0, j = -1;
+ int i = 0;
foreach(KPlotObject *o, plotObjects()) {
QList<KPlotPoint*> points = o->points();
for (int p = 0;p < points.size();p++) {
ProjectList::ProjectList(QWidget *parent)
: QWidget(parent), m_render(NULL), m_fps(-1), m_commandStack(NULL), m_selectedItem(NULL), m_infoQueue(QMap <QString, QDomElement> ()), m_thumbnailQueue(QList <QString> ()), m_refreshed(false), m_editAction(NULL), m_openAction(NULL), m_deleteAction(NULL), m_reloadAction(NULL) {
- QWidget *vbox = new QWidget;
listView = new ProjectListView(this);;
QVBoxLayout *layout = new QVBoxLayout;
layout->setContentsMargins(0, 0, 0, 0);
QHeaderView* headerView = header();
for (int i = 2; i < headerView->count(); ++i) {
- const int logicalIndex = headerView->logicalIndex(i);
const QString text = model()->headerData(i, Qt::Horizontal).toString();
QAction* action = popup.addAction(text);
action->setCheckable(true);
delete[] tmp;
int frameNumber = xml.attribute("thumbnail", "0").toInt();
if (frameNumber != 0) producer->seek(frameNumber);
- mlt_properties properties = MLT_PRODUCER_PROPERTIES(producer->get_producer());
filePropertyMap["duration"] = QString::number(producer->get_playtime());
//kDebug() << "/////// PRODUCER: " << url.path() << " IS: " << producer.get_playtime();
Mlt::Service service(m_mltProducer->parent().get_service());
Mlt::Tractor tractor(service);
- Mlt::Field *field = tractor.field();
mlt_service_lock(service.get_service());
m_mltConsumer->set("refresh", 0);
m_isBlocked = true;
Mlt::Service service(m_mltProducer->parent().get_service());
Mlt::Tractor tractor(service);
- Mlt::Field *field = tractor.field();
//m_mltConsumer->set("refresh", 0);
mlt_service serv = m_mltProducer->parent().get_service();
void Render::mltResizeTransparency(int oldStart, int newStart, int newEnd, int track, int id) {
Mlt::Service service(m_mltProducer->parent().get_service());
Mlt::Tractor tractor(service);
- Mlt::Field *field = tractor.field();
mlt_service_lock(service.get_service());
m_mltConsumer->set("refresh", 0);
void Render::mltMoveTransparency(int startTime, int endTime, int startTrack, int endTrack, int id) {
Mlt::Service service(m_mltProducer->parent().get_service());
Mlt::Tractor tractor(service);
- Mlt::Field *field = tractor.field();
mlt_service_lock(service.get_service());
m_mltConsumer->set("refresh", 0);
int TitleDocument::loadDocument(const KUrl& url, QGraphicsPolygonItem* startv, QGraphicsPolygonItem* endv) {
QString tmpfile;
QDomDocument doc;
- double aspect_ratio = 4.0 / 3.0;
if (!scene)
return -1;
int TrackView::slotAddProjectTrack(int ix, QDomElement xml, bool locked) {
- int trackTop = KdenliveSettings::trackheight() * ix;
// parse track
int position = 0;
for (QDomNode n = xml.firstChild(); !n.isNull(); n = n.nextSibling()) {