00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef QGSLABELDIALOG_H
00019 #define QGSLABELDIALOG_H
00020
00021 #include "ui_qgslabeldialogbase.h"
00022
00023 class QgsLabel;
00024
00025
00027 class QgsLabelDialog: public QWidget, private Ui::QgsLabelDialogBase
00028 {
00029 Q_OBJECT
00030
00031 public:
00032 QgsLabelDialog( QgsLabel *label, QWidget * parent = 0 );
00033 ~QgsLabelDialog();
00034 int itemNoForField( QString theFieldName, QStringList theFieldList );
00035
00036
00037 enum Attribute
00038 {
00039 Text = 0,
00040 Family,
00041 Size,
00042 Bold,
00043 Italic,
00044 Underline,
00045 Color,
00046 XCoordinate,
00047 YCoordinate,
00048 XOffset,
00049 YOffset,
00050 Angle,
00051 Alignment,
00052 BufferSize,
00053 BufferColor,
00054 BufferBrush,
00055 BorderWidth,
00056 BorderColor,
00057 BorderStyle,
00058 AttributeCount
00059 };
00060
00061 public slots:
00063 void apply( void );
00064
00066 void changeFont( );
00067
00069 void changeBufferColor( );
00070 void changeFontColor( );
00071
00073 void init( void );
00074
00075 void on_cboLabelField_activated( int ) {emit labelSourceSet(); }
00076
00077 signals:
00078
00079 void labelSourceSet();
00080
00081 protected:
00082
00084 int fieldIndexFromName( QString name );
00085
00086 private:
00087 QgsLabel *mLabel;
00088 QColor mFontColor;
00089 QColor mBufferColor;
00090 QFont mFont;
00091 };
00092
00093 #endif