1
/***************************************************************************
3
Dialog for selecting vector line styles
6
copyright : (C) 2004 by Gary E.Sherman
7
email : sherman at mrcc.com
8
***************************************************************************/
10
/***************************************************************************
12
* This program is free software; you can redistribute it and/or modify *
13
* it under the terms of the GNU General Public License as published by *
14
* the Free Software Foundation; either version 2 of the License, or *
15
* (at your option) any later version. *
17
***************************************************************************/
18
/* $Id: qgslinestyledialog.cpp,v 1.6 2004/03/06 12:11:04 mhugent Exp $ */
19
#include "qgslinestyledialog.h"
20
#include "qpushbutton.h"
22
#include "qgssymbologyutils.h"
24
QgsLineStyleDialog::QgsLineStyleDialog(QWidget * parent, const char *name, bool modal, WFlags fl):QgsLineStyleDialogBase(parent, name, modal,
27
//load the icons stored in QgsSymbologyUtils.cpp (to avoid redundancy)
28
solid->setPixmap(QgsSymbologyUtils::char2LinePixmap("SolidLine"));
29
dash->setPixmap(QgsSymbologyUtils::char2LinePixmap("DashLine"));
30
dot->setPixmap(QgsSymbologyUtils::char2LinePixmap("DotLine"));
31
dashdot->setPixmap(QgsSymbologyUtils::char2LinePixmap("DashDotLine"));
32
dashdotdot->setPixmap(QgsSymbologyUtils::char2LinePixmap("DashDotDotLine"));
33
nopen->setPixmap(QgsSymbologyUtils::char2LinePixmap("NoPen"));
35
QObject::connect(okbutton, SIGNAL(clicked()), this, SLOT(queryStyle()));
36
QObject::connect(cancelbutton, SIGNAL(clicked()), this, SLOT(reject()));
37
solid->toggle(); //solid style is the default
40
Qt::PenStyle QgsLineStyleDialog::style()
45
void QgsLineStyleDialog::queryStyle()
49
m_style = Qt::SolidLine;
51
else if (dash->isOn())
53
m_style = Qt::DashLine;
57
m_style = Qt::DotLine;
59
else if (dashdot->isOn())
61
m_style = Qt::DashDotLine;
63
else if (dashdotdot->isOn())
65
m_style = Qt::DashDotDotLine;
67
else if (nopen->isOn())