mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Gui cleanups. Arrow preview displays in center of label widget now. Added sidebar image to replace template default. Renamed spinRotation to spinSize and diconnected from rotation signals / slots. Added show checkbox (not functional yet).
git-svn-id: http://svn.osgeo.org/qgis/trunk@1378 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
e426f52671
commit
8e654e9e2b
@ -16,6 +16,7 @@
|
||||
#include <qlabel.h>
|
||||
#include <iostream>
|
||||
#include <qspinbox.h>
|
||||
#include <qslider.h>
|
||||
//standard includes
|
||||
|
||||
PluginGui::PluginGui() : PluginGuiBase()
|
||||
@ -42,7 +43,7 @@ void PluginGui::pbnOK_clicked()
|
||||
// emit drawVectorLayer(QString("pathname"),QString("layername"),QString("provider name (either ogr or postgres"));
|
||||
//
|
||||
//close the dialog
|
||||
emit rotationChanged(spinRotation->value());
|
||||
emit rotationChanged(sliderRotation->value());
|
||||
done(1);
|
||||
}
|
||||
void PluginGui::pbnCancel_clicked()
|
||||
@ -52,15 +53,14 @@ void PluginGui::pbnCancel_clicked()
|
||||
|
||||
void PluginGui::setRotation(int theInt)
|
||||
{
|
||||
spinRotation->setValue(theInt);
|
||||
rotatePixmap(theInt);
|
||||
}
|
||||
|
||||
|
||||
//overides function byt the same name created in .ui
|
||||
void PluginGui::spinRotation_valueChanged( int theInt)
|
||||
void PluginGui::spinSize_valueChanged( int theInt)
|
||||
{
|
||||
rotatePixmap(theInt);
|
||||
|
||||
}
|
||||
|
||||
//overides function byt the same name created in .ui
|
||||
@ -113,8 +113,11 @@ void PluginGui::rotatePixmap(int theRotationInt)
|
||||
//unrotate the canvase again
|
||||
myQPainter.restore();
|
||||
myQPainter.end();
|
||||
|
||||
bitBlt ( pixmapLabel, 0, 0, &myPainterPixmap, 0, 0, -1 , -1, Qt::CopyROP, false);
|
||||
|
||||
//determine the center of the canvas given that we will bitblt form the origin of the narrow
|
||||
int myCenterXInt = static_cast<int>((pixmapLabel->width()-myQPixmap.width())/2);
|
||||
int myCenterYInt = static_cast<int>((pixmapLabel->height()-myQPixmap.height())/2);
|
||||
bitBlt ( pixmapLabel, myCenterXInt,myCenterYInt, &myPainterPixmap, 0, 0, -1 , -1, Qt::CopyROP, false);
|
||||
|
||||
|
||||
//pixmapLabel1->setPixmap(myPainterPixmap);
|
||||
|
@ -37,7 +37,7 @@ public slots:
|
||||
void setRotation(int);
|
||||
private slots:
|
||||
//overides function byt the same name created in .ui
|
||||
void spinRotation_valueChanged( int theInt);
|
||||
void spinSize_valueChanged( int theInt);
|
||||
//overides function byt the same name created in .ui
|
||||
void sliderRotation_valueChanged( int theInt);
|
||||
};
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,3 +1,4 @@
|
||||
|
||||
/****************************************************************************
|
||||
** ui.h extension file, included from the uic-generated form implementation.
|
||||
**
|
||||
@ -21,10 +22,7 @@ void PluginGuiBase::pbnCancel_clicked()
|
||||
}
|
||||
|
||||
|
||||
void PluginGuiBase::spinRotation_valueChanged( int )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -38,3 +36,21 @@ void PluginGuiBase::sliderRotation_sliderMoved( int )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void PluginGuiBase::spinSize_valueChanged( int )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void PluginGuiBase::cboxShow_toggled( bool )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void PluginGuiBase::cboPlacement_textChanged( const QString & )
|
||||
{
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user