QGIS API Documentation  3.14.0-Pi (9f7028fd23)
qgsaddtaborgroup.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsaddtaborgroup.h
3  Add a tab or a group for the tab and group display of fields
4  -------------------
5  begin : 2012-07-30
6  copyright : (C) 2012 by Denis Rouzaud
7  email : denis dot rouzaud at gmail dot com
8 ***************************************************************************/
9 
10 /***************************************************************************
11  * *
12  * This program is free software; you can redistribute it and/or modify *
13  * it under the terms of the GNU General Public License as published by *
14  * the Free Software Foundation; either version 2 of the License, or *
15  * (at your option) any later version. *
16  * *
17  ***************************************************************************/
18 
19 #ifndef QGSADDTABORGROUP
20 #define QGSADDTABORGROUP
21 
22 // We don't want to expose this in the public API
23 #define SIP_NO_FILE
24 
25 #include "ui_qgsaddtaborgroupbase.h"
26 #include "qgsguiutils.h"
27 #include "qgis_gui.h"
28 #include "qgshelp.h"
29 
30 class QTreeWidgetItem;
31 class QgsVectorLayer;
32 
40 class GUI_EXPORT QgsAddTabOrGroup : public QDialog, private Ui::QgsAddTabOrGroupBase
41 {
42  Q_OBJECT
43 
44  public:
45  typedef QPair<QString, QTreeWidgetItem *> TabPair;
46 
47  public:
49  QgsAddTabOrGroup( QgsVectorLayer *lyr, const QList<TabPair> &tabList, QTreeWidgetItem *currentTab = nullptr, QWidget *parent = nullptr );
50 
52  QString name();
53 
55  QTreeWidgetItem *tab();
56 
58  int columnCount() const;
59 
61  bool tabButtonIsChecked();
62 
64  void accept() override;
65 
66  private slots:
67  void mGroupButton_toggled( bool checked );
68  void mTabButton_toggled( bool checked );
69  void showHelp();
70 
71  protected:
72  QgsVectorLayer *mLayer = nullptr;
73  QList< TabPair > mTabs;
74 };
75 
76 #endif
QgsAddTabOrGroup::TabPair
QPair< QString, QTreeWidgetItem * > TabPair
Definition: qgsaddtaborgroup.h:45
QgsAddTabOrGroup::mTabs
QList< TabPair > mTabs
Definition: qgsaddtaborgroup.h:73
QgsVectorLayer
Definition: qgsvectorlayer.h:385
qgsguiutils.h
qgshelp.h
QgsAddTabOrGroup
Definition: qgsaddtaborgroup.h:40