aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/tracing/timelinenotesmodel_p.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2018-05-03 09:50:11 +0200
committerUlf Hermann <ulf.hermann@qt.io>2018-05-04 14:08:47 +0000
commit734611131dc20283b118353130bdd5e16ce0aeaf (patch)
tree91adf7b62f98765a46bc5c544a1808cde1b1bf82 /src/libs/tracing/timelinenotesmodel_p.h
parentb9b2f2c1875030b8259d22cba69161304ada7011 (diff)
Move Timeline and FlameGraph into a common "Tracing" library
This allows us to share code between the two, in particular the QML code for the Details window, and the theme code. This way we can potentially deduplicate some code. Change-Id: I3a0d26b18488bd2a46b5b077b5b5d79ac2dfc5ce Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/libs/tracing/timelinenotesmodel_p.h')
-rw-r--r--src/libs/tracing/timelinenotesmodel_p.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/libs/tracing/timelinenotesmodel_p.h b/src/libs/tracing/timelinenotesmodel_p.h
new file mode 100644
index 0000000000..dd64fec2a9
--- /dev/null
+++ b/src/libs/tracing/timelinenotesmodel_p.h
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt Creator.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+****************************************************************************/
+
+#pragma once
+
+#include "timelinenotesmodel.h"
+
+namespace Timeline {
+
+class TimelineNotesModel::TimelineNotesModelPrivate {
+public:
+ TimelineNotesModelPrivate(TimelineNotesModel *q);
+
+ struct Note {
+ // Saved properties
+ QString text;
+
+ // Cache, created on loading
+ int timelineModel;
+ int timelineIndex;
+ };
+
+ QList<Note> data;
+ QHash<int, const TimelineModel *> timelineModels;
+ bool modified;
+
+private:
+ TimelineNotesModel *q_ptr;
+ Q_DECLARE_PUBLIC(TimelineNotesModel)
+};
+
+} // namespace Timeline