UrlScheme.h
Go to the documentation of this file.
00001 /******************************************************************************
00002  * Copyright (C) 2015 by Ralf Kaestner                                        *
00003  * ralf.kaestner@gmail.com                                                    *
00004  *                                                                            *
00005  * This program is free software; you can redistribute it and/or modify       *
00006  * it under the terms of the Lesser GNU General Public License as published by*
00007  * the Free Software Foundation; either version 3 of the License, or          *
00008  * (at your option) any later version.                                        *
00009  *                                                                            *
00010  * This program is distributed in the hope that it will be useful,            *
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the               *
00013  * Lesser GNU General Public License for more details.                        *
00014  *                                                                            *
00015  * You should have received a copy of the Lesser GNU General Public License   *
00016  * along with this program. If not, see <http://www.gnu.org/licenses/>.       *
00017  ******************************************************************************/
00018 
00019 #ifndef RQT_MULTIPLOT_URL_SCHEME_H
00020 #define RQT_MULTIPLOT_URL_SCHEME_H
00021 
00022 #include <QObject>
00023 #include <QModelIndex>
00024 #include <QString>
00025 #include <QVariant>
00026 
00027 namespace rqt_multiplot {
00028   class UrlScheme :
00029     public QObject {
00030   Q_OBJECT
00031   public:
00032     UrlScheme(const QString& prefix, QObject* parent = 0);
00033     virtual ~UrlScheme();
00034 
00035     const QString& getPrefix() const;
00036     
00037     virtual size_t getNumHosts() const = 0;
00038     virtual QModelIndex getHostIndex(size_t row) const = 0;
00039     virtual QVariant getHostData(const QModelIndex& index, int role)
00040       const = 0;
00041       
00042     virtual size_t getNumPaths(const QModelIndex& hostIndex, const
00043       QModelIndex& parent = QModelIndex()) const = 0;
00044     virtual QModelIndex getPathIndex(const QModelIndex& hostIndex,
00045       size_t row, const QModelIndex& parent = QModelIndex()) const = 0;
00046     virtual QVariant getPathData(const QModelIndex& index, int role)
00047       const = 0;
00048       
00049     virtual QString getHost(const QModelIndex& hostIndex) const = 0;
00050     virtual QString getPath(const QModelIndex& hostIndex, const
00051       QModelIndex& pathIndex) const = 0;
00052       
00053     virtual QString getFilePath(const QModelIndex& hostIndex,
00054       const QModelIndex& pathIndex) const = 0;
00055     virtual QString getFilePath(const QString& host, const QString&
00056       path) const = 0;
00057     
00058   signals:
00059     void resetStarted();
00060     void resetFinished();
00061     void pathLoaded(const QString& host, const QString& path);
00062 
00063   private:
00064     QString prefix_;
00065   };
00066 };
00067 
00068 #endif


rqt_multiplot
Author(s): Ralf Kaestner
autogenerated on Thu Jun 6 2019 21:49:11