src/app/qgslabeldialog.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                          qgslabeldialog.h  -  render vector labels
00003                              -------------------
00004     begin                : August 2004
00005     copyright            : (C) 2004 by Radim Blazek
00006     email                : blazek@itc.it
00007  ***************************************************************************/
00008 /***************************************************************************
00009  *                                                                         *
00010  *   This program is free software; you can redistribute it and/or modify  *
00011  *   it under the terms of the GNU General Public License as published by  *
00012  *   the Free Software Foundation; either version 2 of the License, or     *
00013  *   (at your option) any later version.                                   *
00014  *                                                                         *
00015  ***************************************************************************/
00016 /* $Id: qgslabeldialog.h 9138 2008-08-23 21:37:31Z jef $ */
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     /* Attributes in order used in the table */
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     /* emitted when anitem in label source list is chosen */
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

Generated on Tue Oct 28 16:51:26 2008 for Quantum GIS API Documentation by  doxygen 1.5.1