mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Moved into src
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@4607 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
b605517fbd
commit
02d2b603a9
@ -1,9 +0,0 @@
|
||||
.deps
|
||||
.libs
|
||||
Makefile
|
||||
Makefile.in
|
||||
*.la
|
||||
*.lo
|
||||
*.moc.cpp
|
||||
*.moc.lo
|
||||
|
@ -1,68 +0,0 @@
|
||||
# Copyright (C) 2005 Tim Sutton <tim at linfiniti.com>
|
||||
#
|
||||
# This file is free software; as a special exception the author gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
#
|
||||
# $Id$
|
||||
|
||||
|
||||
plugindir = ${pkglibdir}/designer
|
||||
|
||||
|
||||
%.moc.cpp: %.h
|
||||
$(MOC) -o $@ $<
|
||||
|
||||
# name of the designer plugin
|
||||
plugin_LTLIBRARIES = qgisdesignerwidgets.la
|
||||
|
||||
plugin_MOC = qgsprojectionselectorplugin.moc.cpp
|
||||
|
||||
headers = qgsdesignerwidgets.h \
|
||||
qgsprojectionselectorplugin.h
|
||||
|
||||
qgisdesignerwidgets_la_SOURCES = qgsprojectionselectorplugin.cpp\
|
||||
$(plugin_MOC) \
|
||||
$(headers)
|
||||
BUILT_SOURCES = $(plugin_MOC)
|
||||
|
||||
#projectionselector_la_LIBADD = ../src/libqgis.la $(QT_LDADD)
|
||||
qgisdesignerwidgets_la_LIBADD = $(QT_LDADD) ../src/widgets/projectionselector/libqgsprojectionselector.la
|
||||
qgisdesignerwidgets_la_LDFLAGS = -avoid-version -module
|
||||
qgisdesignerwidgets_la_CXXFLAGS = $(CXXFLAGS) $(EXTRA_CXXFLAGS) $(QT_CXXFLAGS) $(DEBUG_QGIS) -I../src/
|
||||
|
||||
|
||||
|
||||
|
||||
##
|
||||
## The changes below made by didge can only be activated in qgis 0.8
|
||||
## for now we should only try to build the projection selector widget
|
||||
##
|
||||
|
||||
|
||||
|
||||
#plugindir = ${pkglibdir}/designer
|
||||
#
|
||||
#%.moc.cpp: %.h
|
||||
# $(MOC) -o $@ $<
|
||||
|
||||
# # name of the designer plugin
|
||||
#plugin_LTLIBRARIES = qgisdesignerwidgets.la
|
||||
|
||||
#qgisdesignerwidgets_la_SOURCES = qgsdesignerwidgets.cpp \
|
||||
# qgsdesignerwidgets.h
|
||||
|
||||
#projectionselector_la_MOC = qgsprojectionselectorplugin.moc.cpp
|
||||
|
||||
#projectionselector_la_SOURCES = qgsprojectionselectorplugin.cpp \
|
||||
# qgsprojectionselectorplugin.h \
|
||||
# $(projectionselector_la_MOC)
|
||||
|
||||
# #projectionselector_la_LIBADD = ../src/libqgis.la $(QT_LDADD)
|
||||
#qgisdesignerwidgets_la_LIBADD = $(QT_LDADD) ../widgets/projectionselector/libqgsprojectionselector.la
|
||||
#qgisdesignerwidgets_la_LDFLAGS = -avoid-version -module
|
||||
#qgisdesignerwidgets_la_CXXFLAGS = $(CXXFLAGS) $(EXTRA_CXXFLAGS) $(QT_CXXFLAGS) $(DEBUG_QGIS) -I../src/
|
@ -1,190 +0,0 @@
|
||||
#include "qgsdesignerwidgets.h"
|
||||
#include <qstringlist.h>
|
||||
#include <qimage.h>
|
||||
#include <q3dragobject.h>
|
||||
#include "qgslegend.h"
|
||||
#include "qgsmapcanvas.h"
|
||||
#include "qgslinestylewidget.h"
|
||||
#include "qgsfillstylewidget.h"
|
||||
#include "qgspointstylewidget.h"
|
||||
#include "qgsvectorsymbologywidget.h"
|
||||
//Added by qt3to4:
|
||||
#include <QPixmap>
|
||||
#include <Q3ValueList>
|
||||
static const char *legend_pixmap[] = {
|
||||
"22 22 8 1",
|
||||
" c Gray100",
|
||||
". c Gray97",
|
||||
"X c #4f504f",
|
||||
"o c #00007f",
|
||||
"O c Gray0",
|
||||
"+ c none",
|
||||
"@ c Gray0",
|
||||
"# c Gray0",
|
||||
"++++++++++++++++++++++",
|
||||
"++++++++++++++++++++++",
|
||||
"++++++++++++++++++++++",
|
||||
"++++++++++++++++++++++",
|
||||
"+OOOOOOOOOOOOOOOOOOOO+",
|
||||
"OOXXXXXXXXXXXXXXXXXXOO",
|
||||
"OXX. O",
|
||||
"OX. ooooooooo O",
|
||||
"OX. o o .O",
|
||||
"OX o o O",
|
||||
"OX o o O",
|
||||
"O o o O",
|
||||
"OX o o o O",
|
||||
"OX o o o O",
|
||||
"OX o o O",
|
||||
"OX ooooooooo o O",
|
||||
"OO..................OO",
|
||||
"+OOOOOOOOOOOOOOOOOOOO+",
|
||||
"++++++++++++++++++++++",
|
||||
"++++++++++++++++++++++",
|
||||
"++++++++++++++++++++++",
|
||||
"++++++++++++++++++++++"
|
||||
};
|
||||
|
||||
//shamelessly snarfed from qwt stuff - a very nice simple neat way to
|
||||
//accommodate building multiple widgets...Tim
|
||||
namespace
|
||||
{
|
||||
struct Entry
|
||||
{
|
||||
Entry() {}
|
||||
Entry( QString theClassname, QString theHeader, QString thePixmap,
|
||||
QString theTooltip, QString theWhatsThisString):
|
||||
classname(theClassname),
|
||||
header(theHeader),
|
||||
pixmap(thePixmap),
|
||||
tooltip(theTooltip),
|
||||
whatshis(theWhatsThisString)
|
||||
{}
|
||||
|
||||
QString classname;
|
||||
QString header;
|
||||
QString pixmap;
|
||||
QString tooltip;
|
||||
QString whatshis;
|
||||
};
|
||||
|
||||
Q3ValueList<Entry> mEntriesVector;
|
||||
|
||||
const Entry *entry(const QString& theString)
|
||||
{
|
||||
for ( uint i = 0; i < mEntriesVector.count(); i++ )
|
||||
{
|
||||
if (theString == mEntriesVector[i].classname)
|
||||
return &mEntriesVector[i];
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
QgsDesignerWidgets::QgsDesignerWidgets()
|
||||
{
|
||||
mEntriesVector.append(Entry("QgsLegend", "qgslegend.h",
|
||||
"", "A legend widget that shows layers associated with a mapcanvas.", "A legend widget that shows layers associated with a mapcanvas"));
|
||||
mEntriesVector.append(Entry("QgsMapCanvas", "qgsmapcanvas.h",
|
||||
"", "A map canvas widget", "A map canvas is an interactive map that can be panned and zoomed."));
|
||||
mEntriesVector.append(Entry("QgsLineStyleWidget", "qgslinestylewidget.h",
|
||||
"", "A widget that lets you select a line style.", "A widget that lets you select a line style"));
|
||||
mEntriesVector.append(Entry("QgsFillStyleWidget", "qgsfillstylewidget.h",
|
||||
"", "A widget that lets you select a fill style.", "A widget that lets you select a fill style"));
|
||||
mEntriesVector.append(Entry("QgsPointStyleWidget", "qgspointstylewidget.h",
|
||||
"", "A widget that lets you select a point style.", "A widget that lets you select a point style"));
|
||||
mEntriesVector.append(Entry("QgsVectorSymbologyWidget", "QgsVectorSymbologyWidget",
|
||||
"", "A widget that lets you select vector symbology.", "A widget that lets you select vector symbology"));
|
||||
}
|
||||
|
||||
|
||||
QWidget* QgsDesignerWidgets::create(const QString &key,
|
||||
QWidget* parent, const char* name)
|
||||
{
|
||||
if ( key == "QgsLegend" )
|
||||
return new QgsLegend( parent, name );
|
||||
else if ( key == "QgsMapCanvas" )
|
||||
return new QgsMapCanvas ( parent, name );
|
||||
else if ( key == "QgsLineStyleWidget" )
|
||||
return new QgsLineStyleWidget ( parent, name );
|
||||
else if ( key == "QgsFillStyleWidget" )
|
||||
return new QgsFillStyleWidget ( parent, name );
|
||||
else if ( key == "QgsPointStyleWidget" )
|
||||
return new QgsPointStyleWidget ( parent, name );
|
||||
else if ( key == "QgsVectorSymbologyWidget" )
|
||||
return new QgsVectorSymbologyWidget( parent, name );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
QStringList QgsDesignerWidgets::keys() const
|
||||
{
|
||||
QStringList list;
|
||||
|
||||
for (unsigned i = 0; i < mEntriesVector.count(); i++)
|
||||
list += mEntriesVector[i].classname;
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
QString QgsDesignerWidgets::group( const QString& feature ) const
|
||||
{
|
||||
if (entry(feature) != NULL )
|
||||
return QString("QGIS");
|
||||
return QString::null;
|
||||
}
|
||||
|
||||
QIcon QgsDesignerWidgets::iconSet( const QString& thePixmap) const
|
||||
{
|
||||
QString pixmapKey("qwtwidget.png");
|
||||
if (entry(thePixmap) != NULL )
|
||||
pixmapKey = entry(thePixmap)->pixmap;
|
||||
|
||||
const QMimeSource *ms =
|
||||
Q3MimeSourceFactory::defaultFactory()->data(pixmapKey);
|
||||
|
||||
QPixmap pixmap;
|
||||
Q3ImageDrag::decode(ms, pixmap);
|
||||
|
||||
return QIcon(pixmap);
|
||||
}
|
||||
|
||||
QString QgsDesignerWidgets::includeFile( const QString& feature ) const
|
||||
{
|
||||
if (entry(feature) != NULL)
|
||||
return entry(feature)->header;
|
||||
return QString::null;
|
||||
}
|
||||
|
||||
QString QgsDesignerWidgets::toolTip( const QString& feature ) const
|
||||
{
|
||||
if (entry(feature) != NULL )
|
||||
return entry(feature)->tooltip;
|
||||
return QString::null;
|
||||
}
|
||||
|
||||
QString QgsDesignerWidgets::whatsThis( const QString& feature ) const
|
||||
{
|
||||
if (entry(feature) != NULL)
|
||||
return entry(feature)->whatshis;
|
||||
return QString::null;
|
||||
}
|
||||
|
||||
bool QgsDesignerWidgets::isContainer( const QString& ) const
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
The Q_EXPORT_PLUGIN macro.
|
||||
Q_EXPORT_PLUGIN( CustomWidgetPlugin )
|
||||
This macro identifies the module as a plugin -- all the other code simply
|
||||
implements the relevant interface, i.e. wraps the classes you wish to make available.
|
||||
This macro must appear once in your plugin. It should be copied with the class name
|
||||
changed to the name of your plugin's class. (See the Qt Plugin documentation for more
|
||||
information on the plugin entry point.)
|
||||
Each widget you wrap in a widget plugin implementation becomes a class that the
|
||||
plugin implementation offers. There is no limit to the number of classes that you
|
||||
may include in an plugin implementation.
|
||||
*/
|
||||
Q_EXPORT_PLUGIN( QgsDesignerWidgets )
|
@ -1,17 +0,0 @@
|
||||
#include <qwidgetplugin.h>
|
||||
|
||||
class QgsDesignerWidgets : public QWidgetPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QgsDesignerWidgets();
|
||||
|
||||
QStringList keys() const;
|
||||
QWidget* create( const QString &classname, QWidget* parent = 0, const char* name = 0 );
|
||||
QString group( const QString& ) const;
|
||||
QIcon iconSet( const QString& ) const;
|
||||
QString includeFile( const QString& ) const;
|
||||
QString toolTip( const QString& ) const;
|
||||
QString whatsThis( const QString& ) const;
|
||||
bool isContainer( const QString& ) const;
|
||||
};
|
@ -1,97 +0,0 @@
|
||||
#include "qgsprojectionselectorplugin.h"
|
||||
//Added by qt3to4:
|
||||
#include <QPixmap>
|
||||
#include "../widgets/projectionselector/qgsprojectionselector.h"
|
||||
|
||||
static const char *projectionselector_pixmap[] = {
|
||||
"22 22 8 1",
|
||||
" c Gray100",
|
||||
". c Gray97",
|
||||
"X c #4f504f",
|
||||
"o c #00007f",
|
||||
"O c Gray0",
|
||||
"+ c none",
|
||||
"@ c Gray0",
|
||||
"# c Gray0",
|
||||
"++++++++++++++++++++++",
|
||||
"++++++++++++++++++++++",
|
||||
"++++++++++++++++++++++",
|
||||
"++++++++++++++++++++++",
|
||||
"+OOOOOOOOOOOOOOOOOOOO+",
|
||||
"OOXXXXXXXXXXXXXXXXXXOO",
|
||||
"OXX. O",
|
||||
"OX. ooooooooo O",
|
||||
"OX. o o .O",
|
||||
"OX o o O",
|
||||
"OX o o O",
|
||||
"O o o O",
|
||||
"OX o o o O",
|
||||
"OX o o o O",
|
||||
"OX o o O",
|
||||
"OX ooooooooo o O",
|
||||
"OO..................OO",
|
||||
"+OOOOOOOOOOOOOOOOOOOO+",
|
||||
"++++++++++++++++++++++",
|
||||
"++++++++++++++++++++++",
|
||||
"++++++++++++++++++++++",
|
||||
"++++++++++++++++++++++"
|
||||
};
|
||||
|
||||
QgsProjectionSelectorPlugin::QgsProjectionSelectorPlugin()
|
||||
{
|
||||
}
|
||||
|
||||
QStringList QgsProjectionSelectorPlugin::keys() const
|
||||
{
|
||||
QStringList list;
|
||||
list << "QgsProjectionSelector";
|
||||
return list;
|
||||
}
|
||||
|
||||
QWidget* QgsProjectionSelectorPlugin::create( const QString &key, QWidget* parent, const char* name )
|
||||
{
|
||||
if ( key == "QgsProjectionSelector" )
|
||||
return new QgsProjectionSelector( parent, name );
|
||||
return 0;
|
||||
}
|
||||
|
||||
QString QgsProjectionSelectorPlugin::group( const QString& feature ) const
|
||||
{
|
||||
if ( feature == "QgsProjectionSelector" )
|
||||
return "QGIS";
|
||||
return QString::null;
|
||||
}
|
||||
|
||||
QIcon QgsProjectionSelectorPlugin::iconSet( const QString& ) const
|
||||
{
|
||||
return QIcon( QPixmap( projectionselector_pixmap ) );
|
||||
}
|
||||
|
||||
QString QgsProjectionSelectorPlugin::includeFile( const QString& feature ) const
|
||||
{
|
||||
if ( feature == "QgsProjectionSelector" )
|
||||
return "qgsprojectionselector.h";
|
||||
return QString::null;
|
||||
}
|
||||
|
||||
QString QgsProjectionSelectorPlugin::toolTip( const QString& feature ) const
|
||||
{
|
||||
if ( feature == "QgsProjectionSelector" )
|
||||
return "QGIS Projection Selector Widget";
|
||||
return QString::null;
|
||||
}
|
||||
|
||||
QString QgsProjectionSelectorPlugin::whatsThis( const QString& feature ) const
|
||||
{
|
||||
if ( feature == "QgsProjectionSelector" )
|
||||
return "A widget to choose a projection name from a list";
|
||||
return QString::null;
|
||||
}
|
||||
|
||||
bool QgsProjectionSelectorPlugin::isContainer( const QString& ) const
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
Q_EXPORT_PLUGIN( QgsProjectionSelectorPlugin )
|
@ -1,17 +0,0 @@
|
||||
#include <qwidgetplugin.h>
|
||||
|
||||
class QgsProjectionSelectorPlugin : public QWidgetPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QgsProjectionSelectorPlugin();
|
||||
|
||||
QStringList keys() const;
|
||||
QWidget* create( const QString &classname, QWidget* parent = 0, const char* name = 0 );
|
||||
QString group( const QString& ) const;
|
||||
QIcon iconSet( const QString& ) const;
|
||||
QString includeFile( const QString& ) const;
|
||||
QString toolTip( const QString& ) const;
|
||||
QString whatsThis( const QString& ) const;
|
||||
bool isContainer( const QString& ) const;
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user