Skip to content
Permalink
Browse files
- Fix a missing slot warning
- Tidy up #ifdef QGISDEBUGs
- Replace some qt3 compabitilty code with the 'qt4 way'
- Use a default label buffer size of 1 instead of 0 to reduce user confusion


git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5573 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Jul 9, 2006
1 parent b26ce47 commit ee075a0c2e73fc21a62f1728bb89516a8673d5cd
Showing with 18 additions and 16 deletions.
  1. +1 −1 src/core/qgslabelattributes.cpp
  2. +17 −15 src/gui/qgslabeldialog.cpp
@@ -71,7 +71,7 @@ QgsLabelAttributes::QgsLabelAttributes( bool def )
setAlignment ( Qt::AlignCenter );
setColor ( QColor(0,0,0) );

setBufferSize ( 0, PointUnits );
setBufferSize ( 1, PointUnits );
setBufferColor ( QColor(255,255,255) );
setBufferStyle ( Qt::NoBrush );

@@ -62,8 +62,6 @@ QgsLabelDialog::QgsLabelDialog ( QgsLabel *label, QWidget *parent )
this, SLOT(changeBufferColor()) );
connect( pbnDefaultFontColor, SIGNAL(clicked()),
this, SLOT(changeFontColor()) );
connect( chkUseBuffer, SIGNAL(toggled(bool)),
this, SLOT(chkUseBuffer_toggled(bool)) );
}


@@ -249,7 +247,7 @@ void QgsLabelDialog::init ( )
}
else //defaults for when no offset is defined
{
spinBufferSize->setValue(0);
spinBufferSize->setValue(1);
}
//set the state of the buffer enabled checkbox
chkUseBuffer->setChecked(myLabelAttributes->bufferEnabled());
@@ -264,9 +262,9 @@ void QgsLabelDialog::init ( )

void QgsLabelDialog::changeFont ( void )
{
#ifdef QGISDEBUG
#ifdef QGISDEBUG
std::cerr << "QgsLabelDialog::changeFont()" << std::endl;
#endif
#endif
bool resultFlag;
mFont = QFontDialog::getFont(&resultFlag, mFont, this );
if ( resultFlag )
@@ -282,20 +280,24 @@ void QgsLabelDialog::changeFont ( void )

void QgsLabelDialog::changeFontColor(void)
{
#ifdef QGISDEBUG
#ifdef QGISDEBUG
std::cerr << "QgsLabelDialog::changeFontColor()" << std::endl;
#endif
#endif
mFontColor = QColorDialog::getColor ( mFontColor );
lblSample->setPaletteForegroundColor(mFontColor);
QPalette palette = lblSample->palette();
palette.setColor(lblSample->foregroundRole(), mBufferColor);
lblSample->setPalette(palette);
}

void QgsLabelDialog::changeBufferColor(void)
{
#ifdef QGISDEBUG
#ifdef QGISDEBUG
std::cerr << "QgsLabelDialog::changeBufferColor()" << std::endl;
#endif
#endif
mBufferColor = QColorDialog::getColor ( mBufferColor );
lblSample->setPaletteBackgroundColor(mBufferColor);
QPalette palette = lblSample->palette();
palette.setColor(lblSample->backgroundRole(), mBufferColor);
lblSample->setPalette(palette);
}


@@ -313,16 +315,16 @@ int QgsLabelDialog::itemNoForField(QString theFieldName, QStringList theFieldLis

QgsLabelDialog::~QgsLabelDialog()
{
#ifdef QGISDEBUG
#ifdef QGISDEBUG
std::cerr << "QgsLabelDialog::~QgsLabelDialog()" << std::endl;
#endif
#endif
}

void QgsLabelDialog::apply()
{
#ifdef QGISDEBUG
#ifdef QGISDEBUG
std::cerr << "QgsLabelDialog::apply()" << std::endl;
#endif
#endif

//set the label props that are NOT bound to a field in the attributes tbl
//All of these are set in the layerAttributes member of the layer

0 comments on commit ee075a0

Please sign in to comment.