Commit 55b10ef4 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use explicit, const/ref, remove unimplemented function

parent 66477ff3
......@@ -28,7 +28,7 @@
#include <QDir>
SlideshowClip::SlideshowClip(Timecode tc, QWidget * parent) :
SlideshowClip::SlideshowClip(const Timecode &tc, QWidget * parent) :
QDialog(parent),
m_count(0),
m_timecode(tc),
......
......@@ -34,7 +34,7 @@ class SlideshowClip : public QDialog
Q_OBJECT
public:
explicit SlideshowClip(Timecode tc, QWidget * parent = 0);
explicit SlideshowClip(const Timecode& tc, QWidget * parent = 0);
virtual ~ SlideshowClip();
/** return selected path for slideshow in MLT format */
QString selectedPath();
......@@ -49,8 +49,6 @@ public:
int softness() const;
QString animation() const;
/** @brief Check if there are several files with filename pattern, like: image_001.jpg, image_002.jpg,... */
static int sequenceCount(KUrl file);
/** @brief Get the image frame number from a file path, for example image_047.jpg will return 47. */
static int getFrameNumberFromPath(KUrl path);
/** @brief return the url pattern for selected slideshow. */
......
......@@ -26,7 +26,7 @@
#include <KDebug>
SpacerDialog::SpacerDialog(const GenTime duration, Timecode tc, int track, const QList<TrackInfo> &tracks, QWidget * parent) :
SpacerDialog::SpacerDialog(const GenTime &duration, Timecode tc, int track, const QList<TrackInfo> &tracks, QWidget * parent) :
QDialog(parent),
m_in(tc)
{
......
......@@ -38,7 +38,7 @@ class SpacerDialog : public QDialog, public Ui::SpacerDialog_UI
Q_OBJECT
public:
SpacerDialog(const GenTime duration, Timecode tc, int track, const QList <TrackInfo>& tracks, QWidget * parent = 0);
SpacerDialog(const GenTime &duration, Timecode tc, int track, const QList <TrackInfo>& tracks, QWidget * parent = 0);
GenTime selectedDuration();
int selectedTrack();
......
......@@ -32,7 +32,7 @@
const int DurationRole = Qt::UserRole + 1;
const int itemHeight = 30;
SubProjectItem::SubProjectItem(double display_ratio, QTreeWidgetItem * parent, int in, int out, QString description) :
SubProjectItem::SubProjectItem(double display_ratio, QTreeWidgetItem * parent, int in, int out, const QString &description) :
QTreeWidgetItem(parent, PROJECTSUBCLIPTYPE), m_in(in), m_out(out), m_description(description)
{
setSizeHint(0, QSize((int) (itemHeight * display_ratio) + 2, itemHeight + 2));
......@@ -97,7 +97,7 @@ QString SubProjectItem::description() const
return m_description;
}
void SubProjectItem::setDescription(QString desc)
void SubProjectItem::setDescription(const QString &desc)
{
m_description = desc;
setText(1, m_description);
......
......@@ -38,7 +38,7 @@ class DocClipBase;
class SubProjectItem : public QTreeWidgetItem
{
public:
SubProjectItem(double display_ratio, QTreeWidgetItem * parent, int in, int out, QString description = QString());
SubProjectItem(double display_ratio, QTreeWidgetItem * parent, int in, int out, const QString& description = QString());
virtual ~SubProjectItem();
QDomElement toXml() const;
int numReferences() const;
......@@ -46,7 +46,7 @@ public:
QPoint zone() const;
void setZone(const QPoint &p);
QString description() const;
void setDescription(QString desc);
void setDescription(const QString& desc);
static int itemDefaultHeight();
/** Make sure folders appear on top of the tree widget */
......
......@@ -31,7 +31,7 @@
#include <KColorScheme>
#include <KRestrictedLine>
TimecodeDisplay::TimecodeDisplay(Timecode t, QWidget *parent)
TimecodeDisplay::TimecodeDisplay(const Timecode& t, QWidget *parent)
: QAbstractSpinBox(parent),
m_timecode(t),
m_frametimecode(false),
......@@ -184,7 +184,7 @@ void TimecodeDisplay::setValue(int value)
}
}
void TimecodeDisplay::setValue(GenTime value)
void TimecodeDisplay::setValue(const GenTime &value)
{
setValue((int) value.frames(m_timecode.fps()));
}
......
......@@ -41,7 +41,7 @@ public:
/** @brief Constructor for the widget, sets value to 0.
* @param t Timecode object used to setup correct input (frames or HH:MM:SS:FF)
* @param parent parent Widget */
explicit TimecodeDisplay(Timecode t, QWidget *parent = 0);
explicit TimecodeDisplay(const Timecode& t, QWidget *parent = 0);
/** @brief Returns the minimum value, which can be entered.
* default is 0 */
......@@ -79,7 +79,7 @@ public:
private:
/** timecode for widget */
Timecode m_timecode;
/** Should we display the timecode in frames or in format hh:mm:ss:ff */
/** Should we display the timecode in frames or in format hh:mm:ss:ff */
bool m_frametimecode;
int m_minimum;
int m_maximum;
......@@ -91,7 +91,7 @@ public slots:
* The value actually set is forced to be within the legal range: minimum <= value <= maximum */
void setValue(int value);
void setValue(const QString &value);
void setValue(GenTime value);
void setValue(const GenTime &value);
/** @brief Sets value's format according to Kdenlive's settings.
* @param t (optional, if already existing) Timecode object to use */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment