Skip to content

Commit

Permalink
Merge pull request #694 from ra3xdh/cmake_fix
Browse files Browse the repository at this point in the history
Fix CMake and various warnings after merging #682
  • Loading branch information
andresmmera authored Jul 20, 2017
2 parents f23d012 + f087e98 commit 2dace0c
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 20 deletions.
2 changes: 1 addition & 1 deletion qucs/qucs-filter/ccoupled_shunt_resonators.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ CCoupled_Shunt_Resonator_Filter::CCoupled_Shunt_Resonator_Filter()

// -----------------------------------------------------------------------
// This function generates the schematic
QString* CCoupled_Shunt_Resonator_Filter::createSchematic(tFilter *Filter, tSubstrate *Substrate, bool isMicrostrip)
QString* CCoupled_Shunt_Resonator_Filter::createSchematic(tFilter *Filter)
{
//Design equations
double f0 = Filter->Frequency+0.5*(Filter->Frequency2-Filter->Frequency);//Central frequency
Expand Down
2 changes: 1 addition & 1 deletion qucs/qucs-filter/ccoupled_shunt_resonators.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class CCoupled_Shunt_Resonator_Filter : public TL_Filter {
public:
CCoupled_Shunt_Resonator_Filter();

static QString* createSchematic(tFilter*, tSubstrate*, bool);
static QString* createSchematic(tFilter*);
};

#endif
2 changes: 1 addition & 1 deletion qucs/qucs-filter/qucsfilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ QString * QucsFilter::calculateFilter(struct tFilter * Filter)
s = QW_Coupled_Ring_Filter::createSchematic(Filter, &Substrate, isMicrostrip);
return s;
case 7: // Capacitively coupled shunt resonators
s = CCoupled_Shunt_Resonator_Filter::createSchematic(Filter, &Substrate, isMicrostrip);
s = CCoupled_Shunt_Resonator_Filter::createSchematic(Filter);
return s;
case 8: // equation defined filter
s = Equation_Filter::createSchematic(Filter);
Expand Down
2 changes: 0 additions & 2 deletions qucs/qucs-filter/qw_coupled_ring_filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ QString* QW_Coupled_Ring_Filter::createSchematic(tFilter *Filter, tSubstrate *Su
double y = 0.01; // Bandpass ripple (dB)
double Ye = 1/Ze;
double x = -pow(10,(-y/20));
double rf = ftz/f0;//Ratio between the first transmission zero and the central frequency
double TZ = (sin(pi*ftz/(2*f0))*sin(pi*ftz/(2*f0)))/(1 + cos(pi*ftz/(2*f0))*cos(pi*ftz/(2*f0)));
double theta_tz = pi*ftz/(2*f0);
double SQ = sqrt((1-x*x)*(TZ*TZ-1)*(TZ*TZ-1)*Z0*Z0);
double R = -Ye*Z0*(Z0*(x*x-2)+2*SQ);
double Q = 2*TZ*TZ*Ye*Z0*(Z0*(x*x-2)+SQ);
Expand Down
4 changes: 2 additions & 2 deletions qucs/qucs/diagrams/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ diagrams.h
graph.h
marker.h
markerdialog.h
phasor.h
phasordiagram.h
polardiagram.h
psdiagram.h
rect3ddiagram.h
Expand All @@ -29,7 +29,7 @@ SET(DIAGRAMS_SRCS
curvediagram.cpp graph.cpp polardiagram.cpp smithdiagram.cpp
diagram.cpp marker.cpp psdiagram.cpp tabdiagram.cpp
diagramdialog.cpp markerdialog.cpp rect3ddiagram.cpp timingdiagram.cpp
rectdiagram.cpp phasor.cpp truthdiagram.cpp waveac.cpp
rectdiagram.cpp phasordiagram.cpp truthdiagram.cpp waveac.cpp
)

SET(DIAGRAMS_MOC_HDRS
Expand Down
20 changes: 9 additions & 11 deletions qucs/qucs/diagrams/diagramdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,13 +228,13 @@ DiagramDialog::DiagramDialog(Diagram *d, QWidget *parent, Graph *currentGraph)
PropertyBox->addItem(tr("solid line"));
if(Diag->Name != "Phasor")
{
PropertyBox->insertItem(tr("dash line"));
PropertyBox->insertItem(tr("dot line"));
PropertyBox->addItem(tr("dash line"));
PropertyBox->addItem(tr("dot line"));
if(Diag->Name != "Time") {
PropertyBox->insertItem(tr("long dash line"));
PropertyBox->insertItem(tr("stars"));
PropertyBox->insertItem(tr("circles"));
PropertyBox->insertItem(tr("arrows"));
PropertyBox->addItem(tr("long dash line"));
PropertyBox->addItem(tr("stars"));
PropertyBox->addItem(tr("circles"));
PropertyBox->addItem(tr("arrows"));
}
}
connect(PropertyBox, SIGNAL(activated(int)),
Expand Down Expand Up @@ -1598,7 +1598,7 @@ void DiagramDialog::addvar(QString a)
QFileInfo Info(defaultDataSet);
QString DocName = ChooseData->currentText()+".dat";

QFile file(Info.dirPath() + QDir::separator() + DocName);
QFile file(Info.path() + QDir::separator() + DocName);
if(!file.open(QIODevice::ReadOnly)) {
return;
}
Expand Down Expand Up @@ -1639,10 +1639,9 @@ void DiagramDialog::addvar(QString a)
m = GraphList->findItems(Var2, Qt::MatchExactly);
l = Var2.indexOf(a,0,Qt::CaseSensitive);

if( l != -1 && Var2.size() == (l + a.size()) && !m.size()>0)//Var2.size == (l + a.size()) in case of voltage (.v) to don't let pass a variable like (name.var)
if( l != -1 && Var2.size() == (l + a.size()) && !(m.size()>0))//Var2.size == (l + a.size()) in case of voltage (.v) to don't let pass a variable like (name.var)
{
QTableWidgetItem* I;
slotTakeVar(I);
slotTakeVar(NULL);//In the case of the phasor diagram, the table ChooseVars is not used. Instead of that, the graph is put in the list bu using Var2.
}

} while(i > 0);
Expand Down Expand Up @@ -1673,7 +1672,6 @@ void DiagramDialog::remvar(QString a)
/*checks if a type of graph is on screen*/
bool DiagramDialog::testvar (QString a)
{
int i;
QString Var;

foreach(Graph *pg, Diag->Graphs) {
Expand Down
2 changes: 1 addition & 1 deletion qucs/qucs/diagrams/graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ int Graph::getSelectedP(int x, int y)
yn = d1 * float(x) + b1;
}
}
if(((f1 >= f3) && (xn >= f3) && (xn <= f1)) || (f3 >= f1) && (xn >= f1) && (xn <= f3))
if(((f1 >= f3) && (xn >= f3) && (xn <= f1)) || ((f3 >= f1) && (xn >= f1) && (xn <= f3)))
if(((f2 >= f4) && (yn >= f4) && (yn <= f2)) || ((f4 >= f2) && (yn >= f2) && (yn <= f4)))
if((y >= int(yn) - 5) && (y <= int(yn) + 5) && (x >= int(xn) - 5) && (x <= int(xn) + 5))
return 1;
Expand Down
2 changes: 1 addition & 1 deletion qucs/qucs/diagrams/marker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ bool Marker::moveLeftRight(bool left)
x=diag()->freq[n];
if(VarPos[0] == x) break;
}
if(n == diag()->nfreqt) n == diag()->nfreqt-1;
if(n == diag()->nfreqt) n = diag()->nfreqt-1;

if(left) {
if(n == 0) return false;
Expand Down

0 comments on commit 2dace0c

Please sign in to comment.