-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged Squashed pull request #296 (tabs and groups for feature form)
- Loading branch information
Showing
23 changed files
with
2,171 additions
and
641 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,4 +44,5 @@ scripts/RelWithDebInfo | |
qgis-test.ctest | ||
i18n/*.qm | ||
.project | ||
.idea | ||
.pydevproject | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
/*************************************************************************** | ||
qgsaddtaborgroup.h | ||
Add a tab or a group for the tab and group display of fields | ||
------------------- | ||
begin : 2012-07-30 | ||
copyright : (C) 2012 by Denis Rouzaud | ||
email : denis dot rouzaud at gmail dot com | ||
***************************************************************************/ | ||
|
||
/*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#include "qgisapp.h" | ||
#include "qgsapplication.h" | ||
#include "qgsvectorlayer.h" | ||
#include "qgsaddtaborgroup.h" | ||
|
||
#include <QComboBox> | ||
|
||
QgsAddTabOrGroup::QgsAddTabOrGroup( | ||
QgsVectorLayer *lyr, | ||
QWidget * parent, | ||
QList<QString> tabList | ||
) | ||
: QDialog( parent ) | ||
, layer( lyr ) | ||
{ | ||
setupUi( this ); | ||
|
||
mTabButton->setChecked( true ); | ||
mTabList->setEnabled( false ); | ||
if ( tabList.size() > 0 ) | ||
{ | ||
for ( QList<QString>::iterator tab = tabList.begin(); tab != tabList.end(); tab++ ) | ||
mTabList->addItem( *tab ); | ||
} | ||
else | ||
{ | ||
mGroupButton->setEnabled( false ); | ||
} | ||
|
||
connect( mTabButton, SIGNAL( toggled( bool ) ), this, SLOT( on_mTabButton_toggled( bool ) ) ); | ||
connect( mGroupButton, SIGNAL( toggled( bool ) ), this, SLOT( on_mGroupButton_toggled( bool ) ) ); | ||
|
||
setWindowTitle( tr( "Add tab or group for %1" ).arg( layer->name() ) ); | ||
} // QgsVectorLayerProperties ctor | ||
|
||
QgsAddTabOrGroup::~QgsAddTabOrGroup() | ||
{ | ||
} | ||
|
||
QString QgsAddTabOrGroup::name() | ||
{ | ||
return mName->text(); | ||
} | ||
|
||
int QgsAddTabOrGroup::tabId() | ||
{ | ||
return mTabList->currentIndex(); | ||
} | ||
|
||
bool QgsAddTabOrGroup::tabButtonIsChecked() | ||
{ | ||
return mTabButton->isChecked(); | ||
} | ||
|
||
void QgsAddTabOrGroup::on_mGroupButton_toggled( bool checked ) | ||
{ | ||
mTabList->setEnabled( checked ); | ||
} | ||
|
||
void QgsAddTabOrGroup::on_mTabButton_toggled( bool checked ) | ||
{ | ||
mTabList->setEnabled( not checked ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/*************************************************************************** | ||
qgsaddtaborgroup.h | ||
Add a tab or a group for the tab and group display of fields | ||
------------------- | ||
begin : 2012-07-30 | ||
copyright : (C) 2012 by Denis Rouzaud | ||
email : denis dot rouzaud at gmail dot com | ||
***************************************************************************/ | ||
|
||
/*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#ifndef QGSADDTABORGROUP | ||
#define QGSADDTABORGROUP | ||
|
||
#include "ui_qgsaddtaborgroupbase.h" | ||
#include "qgisgui.h" | ||
#include "qgsrenderer.h" | ||
|
||
|
||
class QgsAddTabOrGroup : public QDialog, private Ui::QgsAddTabOrGroupBase | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
QgsAddTabOrGroup( QgsVectorLayer *lyr = 0, QWidget *parent = 0, QList<QString> tabList = QList<QString>() ); | ||
~QgsAddTabOrGroup(); | ||
|
||
QString name(); | ||
|
||
int tabId(); | ||
|
||
bool tabButtonIsChecked(); | ||
|
||
public slots: | ||
void on_mGroupButton_toggled( bool checked ); | ||
void on_mTabButton_toggled( bool checked ); | ||
|
||
protected: | ||
QgsVectorLayer *layer; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.