UrlScheme.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright (C) 2015 by Ralf Kaestner *
3  * ralf.kaestner@gmail.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the Lesser GNU General Public License as published by*
7  * the Free Software Foundation; either version 3 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * Lesser GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the Lesser GNU General Public License *
16  * along with this program. If not, see <http://www.gnu.org/licenses/>. *
17  ******************************************************************************/
18 
19 #ifndef RQT_MULTIPLOT_URL_SCHEME_H
20 #define RQT_MULTIPLOT_URL_SCHEME_H
21 
22 #include <QObject>
23 #include <QModelIndex>
24 #include <QString>
25 #include <QVariant>
26 
27 namespace rqt_multiplot {
28  class UrlScheme :
29  public QObject {
30  Q_OBJECT
31  public:
32  UrlScheme(const QString& prefix, QObject* parent = 0);
33  virtual ~UrlScheme();
34 
35  const QString& getPrefix() const;
36 
37  virtual size_t getNumHosts() const = 0;
38  virtual QModelIndex getHostIndex(size_t row) const = 0;
39  virtual QVariant getHostData(const QModelIndex& index, int role)
40  const = 0;
41 
42  virtual size_t getNumPaths(const QModelIndex& hostIndex, const
43  QModelIndex& parent = QModelIndex()) const = 0;
44  virtual QModelIndex getPathIndex(const QModelIndex& hostIndex,
45  size_t row, const QModelIndex& parent = QModelIndex()) const = 0;
46  virtual QVariant getPathData(const QModelIndex& index, int role)
47  const = 0;
48 
49  virtual QString getHost(const QModelIndex& hostIndex) const = 0;
50  virtual QString getPath(const QModelIndex& hostIndex, const
51  QModelIndex& pathIndex) const = 0;
52 
53  virtual QString getFilePath(const QModelIndex& hostIndex,
54  const QModelIndex& pathIndex) const = 0;
55  virtual QString getFilePath(const QString& host, const QString&
56  path) const = 0;
57 
58  signals:
59  void resetStarted();
60  void resetFinished();
61  void pathLoaded(const QString& host, const QString& path);
62 
63  private:
64  QString prefix_;
65  };
66 };
67 
68 #endif
void pathLoaded(const QString &host, const QString &path)
virtual size_t getNumHosts() const =0
virtual QVariant getPathData(const QModelIndex &index, int role) const =0
const QString & getPrefix() const
Definition: UrlScheme.cpp:38
virtual QModelIndex getHostIndex(size_t row) const =0
virtual QString getPath(const QModelIndex &hostIndex, const QModelIndex &pathIndex) const =0
virtual size_t getNumPaths(const QModelIndex &hostIndex, const QModelIndex &parent=QModelIndex()) const =0
virtual QVariant getHostData(const QModelIndex &index, int role) const =0
UrlScheme(const QString &prefix, QObject *parent=0)
Definition: UrlScheme.cpp:27
virtual QModelIndex getPathIndex(const QModelIndex &hostIndex, size_t row, const QModelIndex &parent=QModelIndex()) const =0
virtual QString getFilePath(const QModelIndex &hostIndex, const QModelIndex &pathIndex) const =0
virtual QString getHost(const QModelIndex &hostIndex) const =0


rqt_multiplot
Author(s): Ralf Kaestner
autogenerated on Wed Jul 10 2019 03:49:44