~showard314/ubuntu/natty/qtiplot/Python2.7_fix

« back to all changes in this revision

Viewing changes to qtiplot/src/LineDialog.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Fathi Boudra
  • Date: 2008-04-04 15:11:55 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20080404151155-rjp12ziov4tryj0o
Tags: 0.9.4-1
* New upstream release.
* Refresh patches.
* Remove 04_homepage_url patch. Merged upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
#include "Graph.h"
33
33
#include "Plot.h"
34
34
#include "ApplicationWindow.h"
 
35
#include "DoubleSpinBox.h"
35
36
 
36
37
#include <qwt_plot.h>
37
38
 
50
51
    : QDialog( parent, fl )
51
52
{
52
53
    setWindowTitle( tr( "QtiPlot - Line options" ) );
53
 
 
 
54
        setAttribute(Qt::WA_DeleteOnClose);
 
55
        
54
56
        lm = line;
55
57
 
56
58
        QGroupBox *gb1 = new QGroupBox();
73
75
        setLineStyle(lm->style());
74
76
 
75
77
        gl1->addWidget(new QLabel(tr("Line width")), 2, 0);
76
 
    widthBox = new QComboBox( FALSE );
77
 
        widthBox->insertItem( tr( "1" ) );
78
 
    widthBox->insertItem( tr( "2" ) );
79
 
    widthBox->insertItem( tr( "3" ) );
80
 
    widthBox->insertItem( tr( "4" ) );
81
 
    widthBox->insertItem( tr( "5" ) );
82
 
        widthBox->setEditable (true);
83
 
        widthBox->setCurrentItem(0);
84
 
        widthBox->setEditText(QString::number(lm->width()));
 
78
    widthBox = new DoubleSpinBox('f');
 
79
        widthBox->setLocale(((ApplicationWindow *)parent)->locale());
 
80
        widthBox->setSingleStep(0.1);
 
81
    widthBox->setRange(0, 100);
 
82
        widthBox->setValue(lm->width());
85
83
        gl1->addWidget(widthBox, 2, 1);
86
84
 
87
85
        startBox = new QCheckBox();
254
252
    if (tw->currentPage()==(QWidget *)options){
255
253
        lm->setStyle(Graph::getPenStyle(styleBox->currentItem()));
256
254
        lm->setColor(colorBox->color());
257
 
        lm->setWidth(widthBox->currentText().toInt());
 
255
        lm->setWidth(widthBox->value());
258
256
        lm->drawEndArrow(endBox->isChecked());
259
257
        lm->drawStartArrow(startBox->isChecked());
260
258
        }
313
311
if (!app)
314
312
        return;
315
313
 
316
 
app->setArrowDefaultSettings(widthBox->currentText().toInt(), colorBox->color(),
 
314
app->setArrowDefaultSettings(widthBox->value(), colorBox->color(),
317
315
                                                        Graph::getPenStyle(styleBox->currentItem()),
318
316
                                                        boxHeadLength->value(), boxHeadAngle->value(), filledBox->isChecked());
319
317
}
325
323
else
326
324
        buttonDefault->setEnabled(true);
327
325
}
328