Krazy fixes: cleanup all headers

svn path=/branches/KDE4/; revision=3096
parent 6b6e6ac5
......@@ -18,18 +18,17 @@
***************************************************************************/
#include <QtGui>
#include <QDialog>
#include <QDomDocument>
#include <QInputDialog>
#include "sampleplugin.h"
#include "ui_countdown_ui.h"
#include <KUrlRequester>
#include <KIntSpinBox>
#include <KDebug>
#include <KMessageBox>
#include "sampleplugin.h"
#include "ui_countdown_ui.h"
#include <QDialog>
#include <QDomDocument>
#include <QInputDialog>
QStringList SamplePlugin::generators() const {
return QStringList() << i18n("Countdown") << i18n("Noise");
......
......@@ -17,10 +17,12 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include "renderjob.h"
#include <QtDBus>
#include <QFile>
#include <QThread>
#include "renderjob.h"
// Can't believe I need to do this to sleep.
class SleepThread : QThread {
......
......@@ -18,17 +18,15 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include <QGraphicsScene>
#include <QGraphicsView>
#include <QScrollBar>
#include <QToolTip>
#include "abstractclipitem.h"
#include "customtrackscene.h"
#include "kdenlivesettings.h"
#include <KDebug>
#include <KLocale>
#include "abstractclipitem.h"
#include "customtrackscene.h"
#include "kdenlivesettings.h"
#include <QPainter>
#include <QToolTip>
AbstractClipItem::AbstractClipItem(const ItemInfo info, const QRectF& rect, double fps): QGraphicsRectItem(rect), m_track(0), m_fps(fps), m_editedKeyframe(-1), m_selectedKeyframe(0), m_keyframeFactor(1) {
setFlags(/*QGraphicsItem::ItemClipsToShape | */QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable);
......@@ -367,7 +365,7 @@ bool AbstractClipItem::hasKeyFrames() const {
return !m_keyframes.isEmpty();
}
QRect AbstractClipItem::visibleRect() {
/*QRect AbstractClipItem::visibleRect() {
QRect rectInView;
if (scene()->views().size() > 0) {
rectInView = scene()->views()[0]->viewport()->rect();
......@@ -376,7 +374,7 @@ QRect AbstractClipItem::visibleRect() {
//kDebug() << scene()->views()[0]->viewport()->rect() << " " << scene()->views()[0]->horizontalScrollBar()->value();
}
return rectInView;
}
}*/
CustomTrackScene* AbstractClipItem::projectScene() {
if (scene()) return static_cast <CustomTrackScene*>(scene());
......
......@@ -74,7 +74,7 @@ protected:
double m_fps;
QPainterPath upperRectPart(QRectF);
QPainterPath lowerRectPart(QRectF);
QRect visibleRect();
//QRect visibleRect();
void drawKeyFrames(QPainter *painter, QRectF exposedRect);
int mouseOverKeyFrames(QPointF pos);
};
......
......@@ -18,20 +18,17 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include <QGraphicsScene>
#include <QGraphicsView>
#include <QScrollBar>
#include <QStyleOptionGraphicsItem>
#include <QToolTip>
#include <KDebug>
#include <KLocale>
#include "abstractgroupitem.h"
#include "abstractclipitem.h"
#include "kdenlivesettings.h"
#include "customtrackscene.h"
#include <KDebug>
#include <QPainter>
#include <QStyleOptionGraphicsItem>
AbstractGroupItem::AbstractGroupItem(double fps): QGraphicsItemGroup(), m_fps(fps) {
setZValue(2);
setFlags(QGraphicsItem::ItemClipsToShape | QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable);
......
......@@ -17,11 +17,12 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include <KLocale>
#include "addclipcommand.h"
#include "kdenlivedoc.h"
#include <KLocale>
AddClipCommand::AddClipCommand(KdenliveDoc *doc, const QDomElement &xml, const QString &id, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_doc(doc), m_xml(xml), m_id(id), m_doIt(doIt) {
if (doIt) setText(i18n("Add clip"));
else setText(i18n("Delete clip"));
......
......@@ -17,11 +17,12 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include <KLocale>
#include "addeffectcommand.h"
#include "customtrackview.h"
#include <KLocale>
AddEffectCommand::AddEffectCommand(CustomTrackView *view, const int track, GenTime pos, QDomElement effect, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_track(track), m_pos(pos), m_effect(effect), m_doIt(doIt) {
QString effectName;
QDomNode namenode = effect.elementsByTagName("name").item(0);
......
......@@ -17,11 +17,12 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include <KLocale>
#include "addfoldercommand.h"
#include "projectlist.h"
#include <KLocale>
AddFolderCommand::AddFolderCommand(ProjectList *view, const QString folderName, const QString &clipId, bool doIt, QUndoCommand *parent) : QUndoCommand(parent), m_view(view), m_name(folderName), m_id(clipId), m_doIt(doIt) {
if (doIt) setText(i18n("Add folder"));
else setText(i18n("Delete folder"));
......
......@@ -14,11 +14,13 @@
* (at your option) any later version. *
* *
***************************************************************************/
#include <KLocale>
#include "addmarkercommand.h"
#include "customtrackview.h"
#include <KLocale>
AddMarkerCommand::AddMarkerCommand(CustomTrackView *view, const QString &oldcomment, const QString &comment, const QString &id, const GenTime &pos, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_oldcomment(oldcomment), m_comment(comment), m_id(id), m_pos(pos), m_doIt(doIt) {
if (m_comment.isEmpty()) setText(i18n("Delete marker"));
else if (m_oldcomment.isEmpty()) setText(i18n("Add marker"));
......
......@@ -17,11 +17,12 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include <KLocale>
#include "addtimelineclipcommand.h"
#include "customtrackview.h"
#include <KLocale>
AddTimelineClipCommand::AddTimelineClipCommand(CustomTrackView *view, QDomElement xml, const QString &clipId, ItemInfo info, EffectsList effects, bool doIt, bool doRemove, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_xml(xml), m_clipId(clipId), m_clipInfo(info), m_effects(effects), m_doIt(doIt), m_remove(doRemove) {
if (!m_remove) setText(i18n("Add timeline clip"));
else setText(i18n("Delete timeline clip"));
......
......@@ -17,11 +17,12 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include <KLocale>
#include "addtrackcommand.h"
#include "customtrackview.h"
#include <KLocale>
AddTrackCommand::AddTrackCommand(CustomTrackView *view, int ix, TrackInfo info, bool addTrack, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_ix(ix), m_info(info), m_addTrack(addTrack), m_doIt(doIt) {
if (addTrack) setText(i18n("Add track"));
else setText(i18n("Delete track"));
......
......@@ -14,11 +14,13 @@
* (at your option) any later version. *
* *
***************************************************************************/
#include <KLocale>
#include "addtransitioncommand.h"
#include "customtrackview.h"
#include <KLocale>
AddTransitionCommand::AddTransitionCommand(CustomTrackView *view, ItemInfo info, int transitiontrack, QDomElement params, bool remove, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_info(info), m_track(transitiontrack), m_params(params), m_remove(remove), m_doIt(doIt) {
if (m_remove) setText(i18n("Delete transition from clip"));
else setText(i18n("Add transition to clip"));
......
......@@ -15,8 +15,8 @@
* *
***************************************************************************/
#ifndef TIMELINETRANSITIONCOMMAND_H
#define TIMELINETRANSITIONCOMMAND_H
#ifndef ADDTRANSITIONCOMMAND_H
#define ADDTRANSITIONCOMMAND_H
#include <QUndoCommand>
#include <QGraphicsView>
......
......@@ -17,11 +17,12 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include <KLocale>
#include "changespeedcommand.h"
#include "customtrackview.h"
#include <KLocale>
ChangeSpeedCommand::ChangeSpeedCommand(CustomTrackView *view, ItemInfo info, double old_speed, double new_speed, const QString &clipId, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_clipInfo(info), m_old_speed(old_speed), m_new_speed(new_speed), m_clipId(clipId), m_doIt(doIt) {
setText(i18n("Adjust clip length"));
}
......
......@@ -17,11 +17,12 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include <KLocale>
#include "changetrackcommand.h"
#include "customtrackview.h"
#include <KLocale>
ChangeTrackCommand::ChangeTrackCommand(CustomTrackView *view, int ix, TrackInfo oldInfo, TrackInfo newInfo, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_ix(ix), m_oldinfo(oldInfo), m_newinfo(newInfo), m_doIt(doIt) {
setText(i18n("Change track type"));
}
......
......@@ -18,11 +18,12 @@
***************************************************************************/
#include <KDebug>
#include "clipitem.h"
#include "clipdurationdialog.h"
#include "clipitem.h"
#include "kdenlivesettings.h"
#include <KDebug>
#include <QWheelEvent>
ClipDurationDialog::ClipDurationDialog(AbstractClipItem *clip, Timecode tc, QWidget * parent): QDialog(parent), m_tc(tc), m_clip(clip) {
......
......@@ -21,7 +21,6 @@
#ifndef CLIPDURATIONDIALOG_H
#define CLIPDURATIONDIALOG_H
#include <QDialog>
#include "abstractclipitem.h"
#include "timecode.h"
......
......@@ -18,18 +18,6 @@
***************************************************************************/
#include <QPainter>
#include <QTimer>
#include <QStyleOptionGraphicsItem>
#include <QGraphicsScene>
#include <QGraphicsView>
#include <QScrollBar>
#include <QMimeData>
#include <QApplication>
#include <KDebug>
#include "clipitem.h"
#include "customtrackview.h"
#include "customtrackscene.h"
......@@ -39,6 +27,14 @@
#include "kdenlivesettings.h"
#include "kthumb.h"
#include <KDebug>
#include <QPainter>
#include <QTimer>
#include <QStyleOptionGraphicsItem>
#include <QGraphicsScene>
#include <QMimeData>
ClipItem::ClipItem(DocClipBase *clip, ItemInfo info, double fps, double speed, bool generateThumbs)
: AbstractClipItem(info, QRectF(), fps), m_clip(clip), m_resizeMode(NONE), m_grabPoint(0), m_maxTrack(0), m_hasThumbs(false), startThumbTimer(NULL), endThumbTimer(NULL), audioThumbWasDrawn(false), m_opacity(1.0), m_timeLine(0), m_startThumbRequested(false), m_endThumbRequested(false), m_startFade(0), m_endFade(0), m_hover(false), m_selectedEffect(-1), m_speed(speed), framePixelWidth(0), m_startPix(QPixmap()), m_endPix(QPixmap()) {
......@@ -653,7 +649,7 @@ void ClipItem::paint(QPainter *painter,
framepos = br.x() + pos.frames(m_fps);
const QRectF r1(framepos + 0.04, 10, itemWidth - framepos - 2, itemHeight - 10);
const QRectF r2 = painter->matrix().mapRect(r1);
const QRectF txtBounding = painter->boundingRect(r2, Qt::AlignLeft | Qt::AlignTop, " " + (*it).comment() + " ");
const QRectF txtBounding = painter->boundingRect(r2, Qt::AlignLeft | Qt::AlignTop, ' ' + (*it).comment() + ' ');
QPainterPath path;
path.addRoundedRect(txtBounding, 3, 3);
......@@ -719,7 +715,7 @@ void ClipItem::paint(QPainter *painter,
}
// Draw clip name
QRectF txtBounding = painter->boundingRect(mapped, Qt::AlignHCenter | Qt::AlignVCenter, " " + m_clipName + " ");
QRectF txtBounding = painter->boundingRect(mapped, Qt::AlignHCenter | Qt::AlignVCenter, ' ' + m_clipName + ' ');
painter->fillRect(txtBounding, QBrush(QColor(0, 0, 0, 150)));
//painter->setPen(QColor(0, 0, 0, 180));
//painter->drawText(txtBounding, Qt::AlignCenter, m_clipName);
......@@ -1352,7 +1348,7 @@ double ClipItem::speed() const {
void ClipItem::setSpeed(const double speed) {
m_speed = speed;
if (m_speed == 1.0) m_clipName = baseClip()->name();
else m_clipName = baseClip()->name() + " - " + QString::number(speed * 100, 'f', 0) + "%";
else m_clipName = baseClip()->name() + " - " + QString::number(speed * 100, 'f', 0) + '%';
//update();
}
......
......@@ -16,18 +16,20 @@
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include <KDebug>
#include <KFileDialog>
#include <kio/netaccess.h>
#include "clipmanager.h"
#include "addclipcommand.h"
#include "kdenlivesettings.h"
#include "clipmanager.h"
#include "docclipbase.h"
#include "kdenlivedoc.h"
#include <mlt++/Mlt.h>
#include <KDebug>
#include <KFileDialog>
#include <kio/netaccess.h>
ClipManager::ClipManager(KdenliveDoc *doc): m_doc(doc), m_audioThumbsEnabled(false), m_audioThumbsQueue(QList <QString> ()), m_generatingAudioId(QString()) {
m_clipIdCounter = 1;
m_folderIdCounter = 1;
......
......@@ -17,16 +17,17 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include <QDir>
#include "clipproperties.h"
#include "kdenlivesettings.h"
#include "kthumb.h"
#include "markerdialog.h"
#include <KStandardDirs>
#include <KDebug>
#include <KFileItem>
#include "kdenlivesettings.h"
#include "clipproperties.h"
#include "kthumb.h"
#include "markerdialog.h"
#include <QDir>
static const int VIDEOTAB = 0;
static const int AUDIOTAB = 1;
......
......@@ -18,10 +18,9 @@
***************************************************************************/
#ifndef CLIPPROPSDIALOG_H
#define CLIPPROPSDIALOG_H
#ifndef CLIPPROPERTIES_H
#define CLIPPROPERTIES_H
#include <QDialog>
#include "definitions.h"
#include "timecode.h"
......
......@@ -15,12 +15,12 @@
* *
***************************************************************************/
#include "complexparameter.h"
#include <KDebug>
#include <KLocale>
#include "complexparameter.h"
#include "effectslist.h"
#include "clipitem.h"
#include <QHeaderView>
#include <QMenu>
......
......@@ -17,16 +17,15 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include <QMouseEvent>
#include <QStylePainter>
#include "customruler.h"
#include <KDebug>
#include <KIcon>
#include <KCursor>
#include <KGlobalSettings>
#include "customruler.h"
#include <QMouseEvent>
#include <QStylePainter>
static const int FIX_WIDTH = 24; /* widget width in pixel */
static const int LINE_END = (FIX_WIDTH - 3);
......
/***************************************************************************
* Copyright (C) 2007 by Jean-Baptiste Mardelle (jb@kdenlive.org) *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#ifndef CUSTOMRULER_H
#define CUSTOMRULER_H
......
......@@ -17,10 +17,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include <KStandardDirs>
#include "kdenlivedoc.h"
#include "customtrackscene.h"
#include "kdenlivedoc.h"
#include <KStandardDirs>
CustomTrackScene::CustomTrackScene(KdenliveDoc *doc, QObject *parent)
: QGraphicsScene(parent), m_document(doc), m_scale(1.0) {
......
......@@ -17,19 +17,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include <QMouseEvent>
#include <QStylePainter>
#include <QGraphicsItem>
#include <QDomDocument>
#include <QScrollBar>
#include <QApplication>
#include <QInputDialog>
#include <KDebug>
#include <KLocale>
#include <KUrl>
#include <KIcon>
#include <KCursor>
#include "customtrackview.h"
#include "customtrackscene.h"
......@@ -52,8 +39,6 @@
#include "razorclipcommand.h"
#include "kdenlivesettings.h"
#include "transition.h"
#include "clipitem.h"
#include "customtrackview.h"
#include "clipmanager.h"
#include "renderer.h"
#include "markerdialog.h"
......@@ -70,6 +55,21 @@
#include "initeffects.h"
#include "locktrackcommand.h"
#include <KDebug>
#include <KLocale>
#include <KUrl>
#include <KIcon>
#include <KCursor>
#include <QMouseEvent>
#include <QStylePainter>
#include <QGraphicsItem>
#include <QDomDocument>
#include <QScrollBar>
#include <QApplication>
#include <QInputDialog>
//TODO:
// disable animation if user asked it in KDE's global settings
// http://lists.kde.org/?l=kde-commits&m=120398724717624&w=2
......
......@@ -3,7 +3,8 @@
-------------------
begin : Fri Apr 12 2002
copyright : (C) 2002 by Jason Wood
email : jasonwood@blueyonder.co.uk
copyright : (C) 2009 by Jean-Baptiste Mardelle
***************************************************************************/
/***************************************************************************
......@@ -15,15 +16,16 @@
* *
***************************************************************************/
#include <QCryptographicHash>
#include <KDebug>
#include "kdenlivesettings.h"
#include "docclipbase.h"
#include "kdenlivesettings.h"
#include "kthumb.h"
#include "clipmanager.h"
#include <KDebug>
#include <QCryptographicHash>
DocClipBase::DocClipBase(ClipManager *clipManager, QDomElement xml, const QString &id):
m_id(id), m_description(QString()), m_refcount(0), m_audioThumbCreated(false), m_duration(GenTime()), m_thumbProd(NULL), m_audioTimer(NULL), m_properties(QMap <QString, QString> ()), audioFrameChache(QMap<int, QMap<int, QByteArray> > ()), m_baseTrackProducers(QList <Mlt::Producer *>()), m_snapMarkers(QList < CommentedTime > ()) {
int type = xml.attribute("type").toInt();
......
......@@ -50,7 +50,7 @@ class Producer;
class DocClipBase: public QObject {
Q_OBJECT public:
/** this enum determines the types of "feed" available within this clip. types must be non-exclusive
* - e.g. if you can have audio and video seperately, it should be possible to combin the two, as is
* - e.g. if you can have audio and video separately, it should be possible to combin the two, as is
* done here. If a new clip type is added then it should be possible to combine it with both audio
* and video. */
......
......@@ -17,13 +17,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include <QLabel>
#include <QFile>
#include <QXmlStreamWriter>
#include <QApplication>
#include <QTimer>
#include <QGraphicsView>
#include <QDomDocument>
#include "dvdwizard.h"
#include "kdenlivesettings.h"
#include "profilesdialog.h"
#include <KStandardDirs>
#include <KLocale>
......@@ -32,9 +29,11 @@
#include <KIO/NetAccess>
#include <KMessageBox>
#include "kdenlivesettings.h"
#include "profilesdialog.h"
#include "dvdwizard.h"
#include <QFile>
#include <QApplication>
#include <QTimer>
#include <QDomDocument>
DvdWizard::DvdWizard(const QString &url, const QString &profile, QWidget *parent): QWizard(parent), m_profile(profile) {
//setPixmap(QWizard::WatermarkPixmap, QPixmap(KStandardDirs::locate("appdata", "banner.png")));
......
......@@ -17,10 +17,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include "dvdwizardmenu.h"
#include <KDebug>
#include "dvdwizardmenu.h"
DvdWizardMenu::DvdWizardMenu(const QString &profile, QWidget *parent): QWizardPage(parent) {
m_view.setupUi(this);
......
......@@ -17,11 +17,12 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include "dvdwizardvob.h"
#include <KUrlRequester>
#include <KDebug>
#include <KStandardDirs>
#include "dvdwizardvob.h"
DvdWizardVob::DvdWizardVob(QWidget *parent): QWizardPage(parent) {
m_view.setupUi(this);
......
......@@ -17,11 +17,11 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include <KLocale>
#include "editclipcommand.h"
#include "projectlist.h"
#include <KLocale>
EditClipCommand::EditClipCommand(ProjectList *list, const QString &id, QMap <QString, QString> oldparams, QMap <QString, QString> newparams, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_list(list), m_id(id), m_oldparams(oldparams), m_newparams(newparams), m_doIt(doIt) {
setText(i18n("Edit clip"));
}
......
......@@ -17,11 +17,12 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include <KLocale>
#include "editeffectcommand.h"
#include "customtrackview.h"
#include <KLocale>
EditEffectCommand::EditEffectCommand(CustomTrackView *view, const int track, GenTime pos, QDomElement oldeffect, QDomElement effect, int stackPos, bool doIt)
: m_view(view), m_track(track), m_pos(pos), m_oldeffect(oldeffect), m_stackPos(stackPos), m_doIt(doIt) {