Skip to content

Commit

Permalink
sip: remove enum constants
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jun 2, 2014
1 parent f041072 commit 45c0be1
Show file tree
Hide file tree
Showing 41 changed files with 164 additions and 164 deletions.
2 changes: 1 addition & 1 deletion python/analysis/raster/qgsrastercalcnode.sip
Expand Up @@ -7,7 +7,7 @@ class QgsRasterCalcNode
//! defines possible types of node
enum Type
{
tOperator = 1,
tOperator,
tNumber,
tRasterRef
};
Expand Down
2 changes: 1 addition & 1 deletion python/core/composer/qgsaddremoveitemcommand.sip
Expand Up @@ -9,7 +9,7 @@ class QgsAddRemoveItemCommand: QObject, QUndoCommand

enum State
{
Added = 0,
Added,
Removed
};

Expand Down
2 changes: 1 addition & 1 deletion python/core/composer/qgsaddremovemultiframecommand.sip
Expand Up @@ -8,7 +8,7 @@ class QgsAddRemoveMultiFrameCommand : QUndoCommand

enum State
{
Added = 0,
Added,
Removed
};

Expand Down
4 changes: 2 additions & 2 deletions python/core/composer/qgsatlascomposition.sip
Expand Up @@ -88,7 +88,7 @@ public:
* @note This method has no effect when exporting to PDF if singleFile() is true
*/
bool setFilenamePattern( const QString& pattern );

/**Returns an error string from parsing the filename expression.
* @returns filename pattern parser error
* @see setFilenamePattern
Expand Down Expand Up @@ -135,7 +135,7 @@ public:

QString featureFilter() const;
void setFeatureFilter( const QString& expression );

/**Returns an error string from parsing the feature filter expression.
* @returns filename pattern parser error
* @see setFilenamePattern
Expand Down
2 changes: 1 addition & 1 deletion python/core/composer/qgscomposeritemcommand.sip
Expand Up @@ -42,7 +42,7 @@ class QgsComposerMergeCommand : QgsComposerItemCommand
public:
enum Context
{
Unknown = 0,
Unknown,
//composer label
ComposerLabelSetText,
ComposerLabelSetId,
Expand Down
8 changes: 4 additions & 4 deletions python/core/composer/qgscomposerlegendstyle.sip
Expand Up @@ -16,10 +16,10 @@ class QgsComposerLegendStyle
};
enum Side // margin side
{
Top = 0,
Bottom = 1,
Left = 2,
Right = 3
Top,
Bottom,
Left,
Right,
};
QgsComposerLegendStyle();
~QgsComposerLegendStyle();
Expand Down
14 changes: 7 additions & 7 deletions python/core/composer/qgscomposermap.sip
Expand Up @@ -22,43 +22,43 @@ class QgsComposerMap : QgsComposerItem
/** \brief Preview style */
enum PreviewMode
{
Cache = 0, // Use raster cache
Cache, // Use raster cache
Render, // Render the map
Rectangle // Display only rectangle
};

enum GridStyle
{
Solid = 0, //solid lines
Solid, //solid lines
Cross //only draw line crossings
};

enum GridAnnotationPosition
{
InsideMapFrame = 0,
InsideMapFrame,
OutsideMapFrame,
Disabled
};

enum GridAnnotationDirection
{
Horizontal = 0,
Horizontal,
Vertical,
HorizontalAndVertical,
BoundaryDirection
};

enum GridAnnotationFormat
{
Decimal = 0,
Decimal,
DegreeMinute,
DegreeMinuteSecond
};

enum GridFrameStyle
{
NoGridFrame = 0,
Zebra //black / white pattern
NoGridFrame,
Zebra // black/white pattern
};

/**Enum for different frame borders*/
Expand Down
2 changes: 1 addition & 1 deletion python/core/composer/qgscomposermultiframe.sip
Expand Up @@ -10,7 +10,7 @@ class QgsComposerMultiFrame: QObject

enum ResizeMode
{
UseExistingFrames = 0,
UseExistingFrames,
ExtendToNextPage, //uses the next page(s) until the content has been printed
RepeatOnEveryPage, //repeats the same frame on every page
RepeatUntilFinished //duplicates last frame to next page to fit the total size
Expand Down
4 changes: 2 additions & 2 deletions python/core/composer/qgscomposerscalebar.sip
Expand Up @@ -13,15 +13,15 @@ class QgsComposerScaleBar: QgsComposerItem
/**Added in version 1.8*/
enum Alignment
{
Left = 0,
Left,
Middle,
Right
};

/**Added in version 1.9*/
enum ScaleBarUnits
{
MapUnits = 0,
MapUnits,
Meters,
Feet,
NauticalMiles
Expand Down
2 changes: 1 addition & 1 deletion python/core/composer/qgscomposition.sip
Expand Up @@ -15,7 +15,7 @@ class QgsComposition : QGraphicsScene
/** \brief Plot type */
enum PlotStyle
{
Preview = 0, // Use cache etc
Preview, // Use cache etc
Print, // Render well
Postscript // Fonts need different scaling!
};
Expand Down
2 changes: 1 addition & 1 deletion python/core/composer/qgslegendmodel.sip
Expand Up @@ -11,7 +11,7 @@ class QgsLegendModel : QStandardItemModel

enum ItemType
{
GroupItem = 0,
GroupItem,
LayerItem,
ClassificationItem
};
Expand Down
4 changes: 2 additions & 2 deletions python/core/diagram/qgstextdiagram.sip
Expand Up @@ -7,14 +7,14 @@ class QgsTextDiagram: QgsDiagram
public:
enum Shape
{
Circle = 0,
Circle,
Rectangle,
Triangle
};

enum Orientation
{
Horizontal = 0,
Horizontal,
Vertical
};

Expand Down
2 changes: 1 addition & 1 deletion python/core/dxf/qgsdxfexport.sip
Expand Up @@ -23,7 +23,7 @@ class QgsDxfExport
public:
enum SymbologyExport
{
NoSymbology = 0, //export only data
NoSymbology, //export only data
FeatureSymbology, //Keeps the number of features and export symbology per feature (using the first symbol level)
SymbolLayerSymbology //Exports one feature per symbol layer (considering symbol levels)
};
Expand Down
52 changes: 26 additions & 26 deletions python/core/qgis.sip
Expand Up @@ -43,15 +43,15 @@ class QGis
// Feature types
enum WkbType
{
WKBUnknown = 0,
WKBPoint = 1,
WKBUnknown,
WKBPoint,
WKBLineString,
WKBPolygon,
WKBMultiPoint,
WKBMultiLineString,
WKBMultiPolygon,
WKBNoGeometry = 100, //attributes only
WKBPoint25D = 0x80000001,
WKBNoGeometry, //attributes only
WKBPoint25D,
WKBLineString25D,
WKBPolygon25D,
WKBMultiPoint25D,
Expand Down Expand Up @@ -85,22 +85,22 @@ class QGis
*/
enum DataType
{
/*! Unknown or unspecified type */ UnknownDataType = 0,
/*! Eight bit unsigned integer (quint8) */ Byte = 1,
/*! Sixteen bit unsigned integer (quint16) */ UInt16 = 2,
/*! Sixteen bit signed integer (qint16) */ Int16 = 3,
/*! Thirty two bit unsigned integer (quint32) */ UInt32 = 4,
/*! Thirty two bit signed integer (qint32) */ Int32 = 5,
/*! Thirty two bit floating point (float) */ Float32 = 6,
/*! Sixty four bit floating point (double) */ Float64 = 7,
/*! Complex Int16 */ CInt16 = 8,
/*! Complex Int32 */ CInt32 = 9,
/*! Complex Float32 */ CFloat32 = 10,
/*! Complex Float64 */ CFloat64 = 11,
/*! Unknown or unspecified type */ UnknownDataType,
/*! Eight bit unsigned integer (quint8) */ Byte,
/*! Sixteen bit unsigned integer (quint16) */ UInt16,
/*! Sixteen bit signed integer (qint16) */ Int16,
/*! Thirty two bit unsigned integer (quint32) */ UInt32,
/*! Thirty two bit signed integer (qint32) */ Int32,
/*! Thirty two bit floating point (float) */ Float32,
/*! Sixty four bit floating point (double) */ Float64,
/*! Complex Int16 */ CInt16,
/*! Complex Int32 */ CInt32,
/*! Complex Float32 */ CFloat32,
/*! Complex Float64 */ CFloat64,
/*! Color, alpha, red, green, blue, 4 bytes the same as
QImage::Format_ARGB32 */ ARGB32 = 12,
QImage::Format_ARGB32 */ ARGB32,
/*! Color, alpha, red, green, blue, 4 bytes the same as
QImage::Format_ARGB32_Premultiplied */ ARGB32_Premultiplied = 13
QImage::Format_ARGB32_Premultiplied */ ARGB32_Premultiplied,
};


Expand All @@ -110,16 +110,16 @@ class QGis
*/
enum UnitType
{
Meters = 0,
Feet = 1,
Degrees = 2, //for 1.0 api backwards compatibility
UnknownUnit = 3,
Meters,
Feet,
Degrees, //for 1.0 api backwards compatibility
UnknownUnit,

// for [1.4;1.8] api compatibility
DecimalDegrees = 2, // was 2
DegreesMinutesSeconds = 2, // was 4
DegreesDecimalMinutes = 2, // was 5
NauticalMiles = 7
DecimalDegrees, // was 2
DegreesMinutesSeconds, // was 4
DegreesDecimalMinutes, // was 5
NauticalMiles
};

//! Provides the canonical name of the type value
Expand Down
4 changes: 2 additions & 2 deletions python/core/qgsapplication.sip
Expand Up @@ -230,8 +230,8 @@ static void qtgui_UpdatePyArgv(PyObject *argvlist, int argc, char **argv)
/** constants for endian-ness */
enum endian_t
{
XDR = 0, // network, or big-endian, byte order
NDR = 1 // little-endian byte order
XDR, // network, or big-endian, byte order
NDR, // little-endian byte order
};

//! Returns whether this machine uses big or little endian
Expand Down
4 changes: 2 additions & 2 deletions python/core/qgsdataitem.sip
Expand Up @@ -59,8 +59,8 @@ class QgsDataItem : QObject

enum Capability
{
NoCapabilities = 0,
SetCrs = 1 //Can set CRS on layer or group of layers
NoCapabilities,
SetCrs //Can set CRS on layer or group of layers
};

// This will _write_ selected crs in data source
Expand Down
8 changes: 4 additions & 4 deletions python/core/qgsdiagramrendererv2.sip
Expand Up @@ -17,10 +17,10 @@ struct QgsDiagramLayerSettings

enum LinePlacementFlags
{
OnLine = 1,
AboveLine = 2,
BelowLine = 4,
MapOrientation = 8
OnLine,
AboveLine,
BelowLine,
MapOrientation,
};

QgsDiagramLayerSettings();
Expand Down
8 changes: 4 additions & 4 deletions python/core/qgsfeaturerequest.sip
Expand Up @@ -8,10 +8,10 @@ class QgsFeatureRequest
public:
enum Flag
{
NoFlags = 0,
NoGeometry = 1, //!< Geometry is not required. It may still be returned if e.g. required for a filter condition.
SubsetOfAttributes = 2, //!< Fetch only a subset of attributes (setSubsetOfAttributes sets this flag)
ExactIntersect = 4 //!< Use exact geometry intersection (slower) instead of bounding boxes
NoFlags,
NoGeometry, //!< Geometry is not required. It may still be returned if e.g. required for a filter condition.
SubsetOfAttributes, //!< Fetch only a subset of attributes (setSubsetOfAttributes sets this flag)
ExactIntersect //!< Use exact geometry intersection (slower) instead of bounding boxes
};
typedef QFlags<QgsFeatureRequest::Flag> Flags;

Expand Down
2 changes: 1 addition & 1 deletion python/core/qgslabel.sip
Expand Up @@ -14,7 +14,7 @@ class QgsLabel
/* Fields */
enum LabelField
{
Text = 0,
Text,
Family,
Size,
SizeType,
Expand Down
2 changes: 1 addition & 1 deletion python/core/qgslabelattributes.sip
Expand Up @@ -16,7 +16,7 @@ public:
/* Units type */
enum Units
{
MapUnits = 0,
MapUnits,
PointUnits
};

Expand Down
16 changes: 8 additions & 8 deletions python/core/qgsmapsettings.sip
Expand Up @@ -38,7 +38,7 @@ class QgsMapSettings

void setSelectionColor( const QColor& color );
QColor selectionColor() const;

/**Sets whether vector selections should be shown in the rendered map
* @param showSelection set to true if selections should be shown
* @see showSelection
Expand All @@ -53,16 +53,16 @@ class QgsMapSettings
* @see selectionColor
* @note Added in QGIS v2.4
*/
bool showSelection() const;
bool showSelection() const;

enum Flag
{
Antialiasing = 0x01,
DrawEditingInfo = 0x02,
ForceVectorOutput = 0x04,
UseAdvancedEffects = 0x08,
DrawLabeling = 0x10,
UseRenderingOptimization = 0x20
Antialiasing,
DrawEditingInfo,
ForceVectorOutput,
UseAdvancedEffects,
DrawLabeling,
UseRenderingOptimization,
// TODO: ignore scale-based visibility (overview)
};
typedef QFlags<QgsMapSettings::Flag> Flags;
Expand Down
6 changes: 3 additions & 3 deletions python/core/qgsmessagelog.sip
Expand Up @@ -9,9 +9,9 @@ class QgsMessageLog : QObject

enum MessageLevel
{
INFO = 0,
WARNING = 1,
CRITICAL = 2
INFO,
WARNING,
CRITICAL,
};

//! add a message to the instance (and create it if necessary)
Expand Down
2 changes: 1 addition & 1 deletion python/core/qgsofflineediting.sip
Expand Up @@ -11,7 +11,7 @@ class QgsOfflineEditing : QObject
public:
enum ProgressMode
{
CopyFeatures = 0,
CopyFeatures,
ProcessFeatures,
AddFields,
AddFeatures,
Expand Down

0 comments on commit 45c0be1

Please sign in to comment.