Skip to content
Extraits de code Groupes Projets
Valider 48d59e9b rédigé par Elliu's avatar Elliu
Parcourir les fichiers

Add copy constructors

parent b1d2495c
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!4Add basic lyrics/timing classes
#include "Char.hpp"
Char::Char(const Char& old) :
char_(old.char_),
dur(old.dur),
style(old.style)
{
}
......@@ -11,6 +11,7 @@ private:
Style *style;
public:
// Copy constructor
Char(const Char&);
Char(const QChar);
~Char() noexcept = default;
......
#include "Line.hpp"
Line::Line(){
}
Line::Line(const Line& old) :
// TODO: determine new index
// probably line.index+1, but this affects all following lines
style(old.style),
layer(old.layer),
start(old.start),
end(old.end),
actor(old.actor),
marginL(old.marginL),
marginR(old.marginR),
marginV(old.marginV),
syls(old.syls)
{
}
......@@ -19,6 +19,7 @@ private:
QVector<Syl> syls;
public:
Line();
Line(const Line&);
Line(QString);
~Line() noexcept = default;
......
#include "Style.hpp"
Style::Style(const Style& old) :
styleName(old.styleName),
fontName(old.fontName),
fontSize(old.fontSize),
primaryColor(old.primaryColor),
secondaryColor(old.secondaryColor),
outlineColor(old.outlineColor),
backColor(old.backColor),
bold(old.bold),
italic(old.italic),
underline(old.underline),
strikeOut(old.strikeOut),
scaleX(old.scaleX),
scaleY(old.scaleY),
spacing(old.spacing),
angle(old.angle),
borderStyle(old.borderStyle),
alignment(old.alignment),
marginL(old.marginL),
marginR(old.marginR),
marginV(old.marginV),
encoding(old.encoding)
{
}
......@@ -29,6 +29,8 @@ private:
int encoding;
public:
// Should grab and copy a user-changeable default style
Style();
Style(const Style&);
Style(const QString&);
~Style() noexcept = default;
......
#include "Syl.hpp"
Syl::Syl(const Syl& old) :
chars(old.chars),
dur(old.dur),
style(old.style)
{
}
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter