#include <QDir>
-SlideshowClip::SlideshowClip(Timecode tc, QWidget * parent) :
+SlideshowClip::SlideshowClip(const Timecode &tc, QWidget * parent) :
QDialog(parent),
m_count(0),
m_timecode(tc),
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();
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. */
#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)
{
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();
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));
return m_description;
}
-void SubProjectItem::setDescription(QString desc)
+void SubProjectItem::setDescription(const QString &desc)
{
m_description = desc;
setText(1, m_description);
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;
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 */
#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),
}
}
-void TimecodeDisplay::setValue(GenTime value)
+void TimecodeDisplay::setValue(const GenTime &value)
{
setValue((int) value.frames(m_timecode.fps()));
}
/** @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 */
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;
* 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 */