Skip to content

Commit

Permalink
move BoxList in sweepdialog to Qlist
Browse files Browse the repository at this point in the history
  • Loading branch information
yodalee committed Nov 7, 2014
1 parent fa7e8b6 commit a09e00c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions qucs/qucs/dialogs/sweepdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,9 @@ void SweepDialog::slotNewValue(int)
{
DataX *pD = pGraph->cPointsX.first();
int Factor = 1, Index = 0;
for(mySpinBox *pb = BoxList.first(); pb!=0; pb = BoxList.next()) {
Index += pb->value() * Factor;
QList<mySpinBox *>::const_iterator it;
for(it = BoxList.constBegin(); it != BoxList.constEnd(); it++) {
Index += (*it)->value() * Factor;
Factor *= pD->count;
}
Index *= 2; // because of complex values
Expand Down
3 changes: 2 additions & 1 deletion qucs/qucs/dialogs/sweepdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <QDialog>
#include <QRegExp>
#include <Q3PtrList>
#include <QList>

#include <QSpinBox>
#include <QGridLayout>
Expand Down Expand Up @@ -61,7 +62,7 @@ private slots:
Graph* setBiasPoints();

QGridLayout *all; // the mother of all widgets
Q3PtrList<mySpinBox> BoxList;
QList<mySpinBox *> BoxList;

Graph *pGraph;
Schematic *Doc;
Expand Down

0 comments on commit a09e00c

Please sign in to comment.