mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-03 00:05:24 -04:00
Gui clean up for graduated symbol multiline widtget so that horizontal scrolling is not required.
git-svn-id: http://svn.osgeo.org/qgis/trunk@750 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
f00b96bbd6
commit
52e0458534
@ -83,41 +83,68 @@ QgsGraSyExtensionWidget::QgsGraSyExtensionWidget(QWidget* parent, int classfield
|
||||
//create the required number of rows
|
||||
for(int i=1;i<=m_numberofclasses;i++)
|
||||
{
|
||||
|
||||
QLineEdit* ltextfield=new QLineEdit(this);
|
||||
ltextfield->setMaximumWidth(60);
|
||||
m_gridlayout->addWidget(ltextfield,i,0);
|
||||
m_widgetvector[8*(i-1)]=ltextfield;
|
||||
ltextfield->setAlignment(Qt::AlignLeft);
|
||||
|
||||
QLineEdit* utextfield=new QLineEdit(this);
|
||||
utextfield->setMaximumWidth(60);
|
||||
m_gridlayout->addWidget(utextfield,i,1);
|
||||
m_widgetvector[8*(i-1)+1]=utextfield;
|
||||
ltextfield->setAlignment(Qt::AlignLeft);
|
||||
|
||||
QLineEdit* labeltextfield=new QLineEdit(this);
|
||||
labeltextfield->setMaximumWidth(90);
|
||||
m_gridlayout->addWidget(labeltextfield,i,2);
|
||||
m_widgetvector[8*(i-1)+2]=labeltextfield;
|
||||
ltextfield->setAlignment(Qt::AlignLeft);
|
||||
|
||||
QPushButton* outlinecolorbutton=new QPushButton(this);
|
||||
outlinecolorbutton->setMaximumWidth(20);
|
||||
outlinecolorbutton->setPaletteBackgroundColor(QColor(0,0,0));
|
||||
m_gridlayout->addWidget(outlinecolorbutton,i,3);
|
||||
m_widgetvector[8*(i-1)+3]=outlinecolorbutton;
|
||||
QObject::connect(outlinecolorbutton,SIGNAL(clicked()),this,SLOT(selectColor()));
|
||||
|
||||
QPushButton* outlinestylebutton=new QPushButton(this);
|
||||
outlinestylebutton->setMaximumWidth(20);
|
||||
outlinestylebutton->setMaximumHeight(20);
|
||||
outlinestylebutton->setName("SolidLine");
|
||||
outlinestylebutton->setPixmap(QgsSymbologyUtils::char2LinePixmap("SolidLine"));
|
||||
m_gridlayout->addWidget(outlinestylebutton,i,4);
|
||||
m_widgetvector[8*(i-1)+4]=outlinestylebutton;
|
||||
QObject::connect(outlinestylebutton,SIGNAL(clicked()),this,SLOT(selectOutlineStyle()));
|
||||
|
||||
QSpinBox* outlinewidthspinbox=new QSpinBox(this);
|
||||
outlinewidthspinbox->setMaximumWidth(60);
|
||||
outlinewidthspinbox->setValue(1);
|
||||
m_gridlayout->addWidget(outlinewidthspinbox,i,5);
|
||||
m_widgetvector[8*(i-1)+5]=outlinewidthspinbox;
|
||||
|
||||
|
||||
|
||||
QPushButton* fillcolorbutton=new QPushButton(this);
|
||||
fillcolorbutton->setMaximumWidth(20);
|
||||
fillcolorbutton->setMaximumHeight(20);
|
||||
m_gridlayout->addWidget(fillcolorbutton,i,6);
|
||||
m_widgetvector[8*(i-1)+6]=fillcolorbutton;
|
||||
QObject::connect(fillcolorbutton,SIGNAL(clicked()),this,SLOT(selectColor()));
|
||||
|
||||
QPushButton* fillpatternbutton=new QPushButton(this);
|
||||
fillpatternbutton->setMaximumWidth(20);
|
||||
fillpatternbutton->setMaximumHeight(20);
|
||||
fillpatternbutton->setName("SolidPattern");
|
||||
fillpatternbutton->setPixmap(QgsSymbologyUtils::char2PatternPixmap("SolidPattern"));
|
||||
m_gridlayout->addWidget(fillpatternbutton,i,7);
|
||||
m_widgetvector[8*(i-1)+7]=fillpatternbutton;
|
||||
QObject::connect(fillpatternbutton,SIGNAL(clicked()),this,SLOT(selectFillPattern()));
|
||||
|
||||
|
||||
|
||||
|
||||
//apply a nice color range from blue to red as default
|
||||
if(i==1)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user