mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
browser: register editor widgets (fixes #11529)
This commit is contained in:
parent
51e01d6d1c
commit
a68958fbe3
@ -59,6 +59,8 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../core/raster
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../gui
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../gui/attributetable
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../gui/editorwidgets
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../gui/editorwidgets/core
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../ui
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${GEOS_INCLUDE_DIR}
|
||||
|
@ -28,6 +28,24 @@
|
||||
#include "qgsconfig.h"
|
||||
#include <qmainwindow.h>
|
||||
|
||||
#include "qgseditorwidgetregistry.h"
|
||||
#include "qgsclassificationwidgetwrapperfactory.h"
|
||||
#include "qgsrangewidgetfactory.h"
|
||||
#include "qgsuniquevaluewidgetfactory.h"
|
||||
#include "qgsfilenamewidgetfactory.h"
|
||||
#include "qgsvaluemapwidgetfactory.h"
|
||||
#include "qgsenumerationwidgetfactory.h"
|
||||
#include "qgshiddenwidgetfactory.h"
|
||||
#include "qgscheckboxwidgetfactory.h"
|
||||
#include "qgstexteditwidgetfactory.h"
|
||||
#include "qgsvaluerelationwidgetfactory.h"
|
||||
#include "qgsuuidwidgetfactory.h"
|
||||
#include "qgsphotowidgetfactory.h"
|
||||
#include "qgswebviewwidgetfactory.h"
|
||||
#include "qgscolorwidgetfactory.h"
|
||||
#include "qgsrelationreferencefactory.h"
|
||||
#include "qgsdatetimeeditfactory.h"
|
||||
|
||||
int main( int argc, char ** argv )
|
||||
{
|
||||
QSettings settings;
|
||||
@ -58,5 +76,23 @@ int main( int argc, char ** argv )
|
||||
|
||||
a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) );
|
||||
|
||||
QgsEditorWidgetRegistry* editorWidgetRegistry = QgsEditorWidgetRegistry::instance();
|
||||
editorWidgetRegistry->registerWidget( "Classification", new QgsClassificationWidgetWrapperFactory( QObject::tr( "Classification" ) ) );
|
||||
editorWidgetRegistry->registerWidget( "Range", new QgsRangeWidgetFactory( QObject::tr( "Range" ) ) );
|
||||
editorWidgetRegistry->registerWidget( "UniqueValues", new QgsUniqueValueWidgetFactory( QObject::tr( "Unique Values" ) ) );
|
||||
editorWidgetRegistry->registerWidget( "FileName", new QgsFileNameWidgetFactory( QObject::tr( "File Name" ) ) );
|
||||
editorWidgetRegistry->registerWidget( "ValueMap", new QgsValueMapWidgetFactory( QObject::tr( "Value Map" ) ) );
|
||||
editorWidgetRegistry->registerWidget( "Enumeration", new QgsEnumerationWidgetFactory( QObject::tr( "Enumeration" ) ) );
|
||||
editorWidgetRegistry->registerWidget( "Hidden", new QgsHiddenWidgetFactory( QObject::tr( "Hidden" ) ) );
|
||||
editorWidgetRegistry->registerWidget( "CheckBox", new QgsCheckboxWidgetFactory( QObject::tr( "Check Box" ) ) );
|
||||
editorWidgetRegistry->registerWidget( "TextEdit", new QgsTextEditWidgetFactory( QObject::tr( "Text Edit" ) ) );
|
||||
editorWidgetRegistry->registerWidget( "ValueRelation", new QgsValueRelationWidgetFactory( QObject::tr( "Value Relation" ) ) );
|
||||
editorWidgetRegistry->registerWidget( "UuidGenerator", new QgsUuidWidgetFactory( QObject::tr( "Uuid Generator" ) ) );
|
||||
editorWidgetRegistry->registerWidget( "Photo", new QgsPhotoWidgetFactory( QObject::tr( "Photo" ) ) );
|
||||
editorWidgetRegistry->registerWidget( "WebView", new QgsWebViewWidgetFactory( QObject::tr( "Web View" ) ) );
|
||||
editorWidgetRegistry->registerWidget( "Color", new QgsColorWidgetFactory( QObject::tr( "Color" ) ) );
|
||||
editorWidgetRegistry->registerWidget( "RelationReference", new QgsRelationReferenceFactory( QObject::tr( "Relation Reference" ), 0, 0 ) );
|
||||
editorWidgetRegistry->registerWidget( "DateTime", new QgsDateTimeEditFactory( QObject::tr( "Date/Time" ) ) );
|
||||
|
||||
return a.exec();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user