UrlItem.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_ITEM_H
20 #define RQT_MULTIPLOT_URL_ITEM_H
21 
22 #include <QMap>
23 #include <QModelIndex>
24 
26 
27 namespace rqt_multiplot {
28  class UrlItem {
29  public:
30  enum Type {
34  };
35 
36  UrlItem(UrlScheme* scheme = 0, Type type = Scheme, const QModelIndex&
37  index = QModelIndex(), UrlItem* parent = 0);
38  ~UrlItem();
39 
40  UrlItem* getParent() const;
41  size_t getNumChildren() const;
42  UrlItem* getChild(size_t row) const;
43  int getRow() const;
44 
45  void setScheme(UrlScheme* scheme);
46  UrlScheme* getScheme() const;
47  void setType(Type type);
48  Type getType() const;
49  void setIndex(const QModelIndex& index);
50  const QModelIndex& getIndex() const;
51  QModelIndex getIndex(Type type) const;
52 
53  UrlItem* addChild(size_t row, Type type, const QModelIndex& index);
54 
55  private:
57  QMap<size_t, UrlItem*> children_;
58 
61  QModelIndex index_;
62  };
63 };
64 
65 #endif
void setIndex(const QModelIndex &index)
Definition: UrlItem.cpp:90
UrlItem * getParent() const
Definition: UrlItem.cpp:45
QModelIndex index_
Definition: UrlItem.h:61
UrlScheme * getScheme() const
Definition: UrlItem.cpp:78
UrlScheme * scheme_
Definition: UrlItem.h:59
int getRow() const
Definition: UrlItem.cpp:62
UrlItem * parent_
Definition: UrlItem.h:56
const QModelIndex & getIndex() const
Definition: UrlItem.cpp:94
UrlItem * addChild(size_t row, Type type, const QModelIndex &index)
Definition: UrlItem.cpp:115
QMap< size_t, UrlItem * > children_
Definition: UrlItem.h:57
UrlItem * getChild(size_t row) const
Definition: UrlItem.cpp:53
void setType(Type type)
Definition: UrlItem.cpp:82
size_t getNumChildren() const
Definition: UrlItem.cpp:49
void setScheme(UrlScheme *scheme)
Definition: UrlItem.cpp:74
Type getType() const
Definition: UrlItem.cpp:86
UrlItem(UrlScheme *scheme=0, Type type=Scheme, const QModelIndex &index=QModelIndex(), UrlItem *parent=0)
Definition: UrlItem.cpp:27


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