WARNING: USE THIS SOFTWARE AT YOUR OWN RISK! THIS IS EXPERIMENTAL SOFTWARE NOT INTENDED FOR PRODUCTION USE! Zuble is currently an early stage prototype. As such Zuble is minimally tested and inherently unstable. It is provided for experimental, development, and demonstration purposes only. Zuble QML Types   |  Zuble C++ Classes   |  Zuble Overview
Zuble  0.1
Zuble Framework C++/QML extension API
ZLogBookmark.cpp
Go to the documentation of this file.
1 /*
2  * Zuble - A run-time system for QML/Javascript applications
3  * Copyright (C) 2015 Bob Dinitto
4  *
5  * Filename: ZLogBookmark.cpp
6  * Created on: 11/22/2015
7  * Author: Bob Dinitto
8  *
9  * Zuble is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22  *
23  */
24 
25 #include "ZLogBookmark.h"
26 
27 namespace Zbl
28 {
29 
31  ZLogMap(reader)
32 {
33  zDebug() << "ZLogBookmark::ZLogBookmark";
34 }
35 
36 ZLogBookmark::ZLogBookmark(ZLogReader* reader, const QString& name) :
37  ZLogMap(reader), m_bookmarkName(name)
38 {
39  zDebug() << "ZLogBookmark::ZLogBookmark - " << name;
40 }
41 
43 {
44  return m_bookmarkName;
45 }
46 
47 void ZLogBookmark::setMarkName(const QString& name)
48 {
50 }
51 
52 QString ZLogBookmark::getNote() const
53 {
54  return m_bookmarkName;
55 }
56 
57 void ZLogBookmark::setNote(const QString& note)
58 {
59  m_note = note;
60 }
61 
63 {
64  return Bookmark;
65 }
66 
67 
68 #if 0
69 int ZLogBookmark::appendModelRoles(ZTableModel* model, int nextRole)
70 {
71  nextRole = ZLogMap::appendModelRoles(model, nextRole);
72 
73  // WARNING: the following statements are order dependent!
74 
75  model->addRole(nextRole++, "name");
76  model->addRole(nextRole++, "note");
77  return nextRole;
78 }
79 
80 void ZLogBookmark::appendModelData(
81  const MarkNode& logMark,
82  ZDataRow data)
83 {
84  ZLogMap::appendModelData(logMark, data);
85 
86  // WARNING: the following statements are order dependent!
87 
88  data.append(m_bookmarkName);
89  data.append(m_note);
90 }
91 #endif
92 
93 
94 
95 } // Zbl
96 
QString m_bookmarkName
Display name for this bookmark.
Definition: ZLogBookmark.h:119
virtual int logMapType()
Returns log map type. Override of ZLogMap::logMapType().
A QML type that manages reading JSON formatted Zuble log files. QML programs create using Zbl...
Definition: ZLogReader.h:62
QString getMarkName() const
Maintains a list of log record links pertaining to a specific log file.
Definition: ZLogMap.h:28
void setNote(const QString &note)
Definition: ZAndGate.cpp:6
QString m_note
Annotation for this bookmark.
Definition: ZLogBookmark.h:125
void setMarkName(const QString &name)
This two dimensional table model is used to store and manipulate data.
Definition: ZTableModel.h:96
QString getNote() const
#define zDebug()
Definition: zglobal.h:113
ZLogBookmark(ZLogReader *reader)
Q_INVOKABLE bool addRole(int roleNumber)
Adds the specified role to the data model. This method may block the current thread.
QList< QVariant > ZDataRow
Represents a single row (or column for column headers) of data cell values for a single role...
Definition: ZTableModel.h:57