mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
nobrush button
git-svn-id: http://svn.osgeo.org/qgis/trunk@773 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
603323a69f
commit
af881bf7f4
@ -19,6 +19,7 @@ QgsPatternDialog::QgsPatternDialog(QWidget* parent, const char* name, bool modal
|
||||
dense5->setPixmap(QgsSymbologyUtils::char2PatternPixmap("Dense5Pattern"));
|
||||
dense6->setPixmap(QgsSymbologyUtils::char2PatternPixmap("Dense6Pattern"));
|
||||
dense7->setPixmap(QgsSymbologyUtils::char2PatternPixmap("Dense7Pattern"));
|
||||
nopen->setPixmap(QgsSymbologyUtils::char2PatternPixmap("NoBrush"));
|
||||
|
||||
QObject::connect(okbutton,SIGNAL(clicked()),this,SLOT(queryPattern()));
|
||||
QObject::connect(cancelbutton,SIGNAL(clicked()),this,SLOT(reject()));
|
||||
@ -88,5 +89,9 @@ void QgsPatternDialog::queryPattern()
|
||||
{
|
||||
m_pattern=Qt::Dense3Pattern;
|
||||
}
|
||||
else if(nopen->isOn())
|
||||
{
|
||||
m_pattern=Qt::NoBrush;
|
||||
}
|
||||
accept();
|
||||
}
|
||||
|
@ -671,7 +671,7 @@ static const char* dense3Data[] = {
|
||||
".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#",
|
||||
"###.###.###.###.###.###.###.###.###.###.###.###.###.###.##"};
|
||||
|
||||
static const char *nopen[]={
|
||||
static const char *nobrush[]={
|
||||
"58 30 2 1",
|
||||
"# c None",
|
||||
". c #3155c5",
|
||||
@ -1009,9 +1009,9 @@ QPixmap QgsSymbologyUtils::qString2PatternPixmap(QString string)
|
||||
{
|
||||
return QPixmap(diagCrossData);
|
||||
}
|
||||
else if(string=="CustomPattern")
|
||||
else if(string=="NoBrush")
|
||||
{
|
||||
|
||||
return QPixmap(nobrush);
|
||||
}
|
||||
else//return a null string
|
||||
{
|
||||
@ -1219,6 +1219,10 @@ QPixmap QgsSymbologyUtils::char2PatternPixmap(const char* c)
|
||||
{
|
||||
return QPixmap(diagCrossData);
|
||||
}
|
||||
else if(strcmp(c,"NoBrush")==0)
|
||||
{
|
||||
return QPixmap(nobrush);
|
||||
}
|
||||
else
|
||||
{
|
||||
qWarning("Warning, no matching pattern found in QgsSymbologyUtils::char2PatternPixmap");
|
||||
@ -1405,7 +1409,7 @@ QPixmap QgsSymbologyUtils::brushStyle2Pixmap(Qt::BrushStyle brushstyle)
|
||||
return QPixmap(diagCrossData);
|
||||
break;
|
||||
case (Qt::NoBrush):
|
||||
return QPixmap();
|
||||
return QPixmap(nobrush);
|
||||
default:
|
||||
qWarning("Warning, no matching pattern found in QgsSymbologyUtils::brushStyle2Pixmap");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user