44 connect( parent, SIGNAL( plotChanged() ),
45 this, SLOT( updateCurvesList() ) );
52 QGridLayout *optionsLayout =
new QGridLayout;
57 QLabel *curvesLabel =
new QLabel(
"Curves: ");
60 this, SLOT( updateComboIndex(
int) ) );
61 optionsLayout->addWidget(curvesLabel, row, 0);
66 QLabel *nameLabel =
new QLabel(
"Curve Name: ");
68 optionsLayout->addWidget(nameLabel, row, 0);
72 QLabel *colorLabel =
new QLabel(
"Color: ");
77 optionsLayout->addWidget(colorLabel, row, 0);
81 QLabel *styleLabel =
new QLabel(
"Style:");
83 m_styleCombo->addItem(
"No Line",
static_cast<int>(Qt::NoPen));
84 m_styleCombo->addItem(
"Solid Line",
static_cast<int>(Qt::SolidLine));
85 m_styleCombo->addItem(
"Dash Line",
static_cast<int>(Qt::DashLine));
86 m_styleCombo->addItem(
"Dot Line",
static_cast<int>(Qt::DotLine));
87 m_styleCombo->addItem(
"Dash Dot Line",
static_cast<int>(Qt::DashDotLine));
88 m_styleCombo->addItem(
"Dash Dot Dot Line",
static_cast<int>(Qt::DashDotDotLine));
89 optionsLayout->addWidget(styleLabel, row, 0);
93 QLabel *sizeLabel =
new QLabel(
"Size:");
99 optionsLayout->addWidget(sizeLabel, row, 0);
103 QLabel *symbolLabel =
new QLabel(
"Symbol:");
112 m_symbolCombo->addItem(
"Down Facing Triangle", QwtSymbol::UTriangle);
113 m_symbolCombo->addItem(
"Up Facing Triangle", QwtSymbol::DTriangle);
114 m_symbolCombo->addItem(
"Left Facing Triangle", QwtSymbol::RTriangle);
115 m_symbolCombo->addItem(
"Right Facing Triangle", QwtSymbol::LTriangle);
118 m_symbolCombo->addItem(
"Diagonal Cross (X)", QwtSymbol::XCross);
119 m_symbolCombo->addItem(
"Eight-Pointed Star", QwtSymbol::Star1);
124 m_symbolCombo->addItem(
"Six-Pointed Star", QwtSymbol::Star2);
126 optionsLayout->addWidget(symbolLabel, row, 0);
130 QHBoxLayout *applyButtonsLayout =
new QHBoxLayout;
131 applyButtonsLayout->addStretch();
133 QPushButton *okay =
new QPushButton(
"&Ok");
134 okay->setIcon( QIcon::fromTheme(
"dialog-ok") );
135 connect( okay, SIGNAL( clicked() ),
137 connect( okay, SIGNAL( clicked() ),
138 this, SLOT( close() ) );
139 applyButtonsLayout->addWidget(okay);
141 QPushButton *apply =
new QPushButton(
"&Apply");
142 apply->setIcon( QIcon::fromTheme(
"dialog-ok-apply") );
143 connect( apply, SIGNAL( clicked() ),
145 applyButtonsLayout->addWidget(apply);
147 QPushButton *cancel =
new QPushButton(
"&Cancel");
148 cancel->setIcon( QIcon::fromTheme(
"dialog-cancel") );
149 connect( cancel, SIGNAL( clicked() ),
150 this, SLOT( close() ) );
151 applyButtonsLayout->addWidget(cancel);
154 optionsHolder->setLayout(optionsLayout);
157 applyButtonsHolder->setLayout(applyButtonsLayout);
159 QVBoxLayout *mainLayout =
new QVBoxLayout;
160 mainLayout->addWidget(optionsHolder);
161 mainLayout->addWidget(applyButtonsHolder);
163 setLayout(mainLayout);
193 curvePen.setColor( colorPalette.color(QPalette::Button) );
196 curvePen.setWidth(penWidth);
198 Qt::PenStyle penStyle = (Qt::PenStyle)
m_styleCombo->itemData(
200 curvePen.setStyle(penStyle);
203 m_plotCurve->setColor( colorPalette.color(QPalette::Button) );
206 QwtSymbol::Style symbolStyle = (QwtSymbol::Style)
m_symbolCombo->itemData(