src/linetypes/comment.cpp

changeset 1269
ec691d9472b3
parent 1123
15e46ea3151f
child 1326
69a90bd2dba2
equal deleted inserted replaced
1268:7cbdaefda950 1269:ec691d9472b3
15 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */ 17 */
18 18
19 #include "comment.h" 19 #include "comment.h"
20 #include "../editHistory.h"
20 21
21 LDComment::LDComment(Model* model) : 22 LDComment::LDComment(QString text) :
22 LDObject {model} {}
23
24 LDComment::LDComment(QString text, Model* model) :
25 LDObject {model},
26 m_text {text} {} 23 m_text {text} {}
27 24
28 LDObjectType LDComment::type() const 25 LDObjectType LDComment::type() const
29 { 26 {
30 return LDObjectType::Comment; 27 return LDObjectType::Comment;
62 59
63 QString LDComment::asText() const 60 QString LDComment::asText() const
64 { 61 {
65 return format ("0 %1", text()); 62 return format ("0 %1", text());
66 } 63 }
64
65 void LDComment::serialize(Serializer& serializer)
66 {
67 LDObject::serialize(serializer);
68 serializer << m_text;
69 }

mercurial