*** empty log message ***

This commit is contained in:
margraf 2004-06-26 07:05:47 +00:00
parent ba97a1a2c8
commit 4ba6387e3a
30 changed files with 743 additions and 435 deletions

View File

@ -22,10 +22,10 @@
# Boston, MA 02111-1307, USA.
#
SUBDIRS = qucs qucs-edit
SUBDIRS = qucs qucs-edit qucs-help
# Release specific. Remove the above SUBDIRS line and uncomment this one.
# SUBDIRS = qucs qucs-edit qucs-core
# SUBDIRS = qucs qucs-edit qucs-help qucs-core
EXTRA_DIST = autogen.sh depcomp PLATFORMS RELEASE

View File

@ -200,6 +200,7 @@ AH_TOP([
# Add here all your Makefiles. This are created by configure.
AC_CONFIG_FILES([Makefile
qucs-edit/Makefile
qucs-help/Makefile
qucs/Makefile
qucs/bitmaps/Makefile
qucs/components/Makefile

View File

@ -24,10 +24,10 @@
bin_PROGRAMS = qucsedit
#MOCHEADERS = qucsview.h qucs.h qucsinit.h qucsactions.h
#MOCFILES = $(MOCHEADERS:.h=.moc.cpp)
MOCHEADERS = qucsedit.h
MOCFILES = $(MOCHEADERS:.h=.moc.cpp)
qucsedit_SOURCES = qucsedit.cpp
qucsedit_SOURCES = main.cpp qucsedit.cpp
nodist_qucsedit_SOURCES = $(MOCFILES)

View File

@ -1,3 +1,176 @@
int main (void) {
return 0;
/***************************************************************************
qucsedit.cpp - description
-------------------
begin : Mon Nov 17 2003
copyright : (C) 2003 by Michael Margraf
email : michael.margraf@alumni.tu-berlin.de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "qucsedit.h"
#include <qlayout.h>
#include <qhbox.h>
#include <qpushbutton.h>
#include <qfile.h>
#include <qtextstream.h>
#include <qmessagebox.h>
#include <qtoolbutton.h>
#include <qimage.h>
#include <qfiledialog.h>
QucsEdit::QucsEdit(const QString& FileName_, bool readOnly)
{
setCaption("QucsEdit " PACKAGE_VERSION " - " + tr("File: "));
QVBoxLayout *v = new QVBoxLayout(this);
QHBox *h = new QHBox(this);
v->addWidget(h);
QToolButton *ButtLoad = new QToolButton(h);
ButtLoad->setIconSet(QIconSet(QImage(BITMAPDIR "fileopen.png")));
connect(ButtLoad, SIGNAL(clicked()), SLOT(slotLoad()));
QToolButton *ButtSave = new QToolButton(h);
ButtSave->setIconSet(QIconSet(QImage(BITMAPDIR "filesave.png")));
connect(ButtSave, SIGNAL(clicked()), SLOT(slotSave()));
ButtSave->setDisabled(readOnly);
h->setStretchFactor(new QWidget(h),5); // stretchable placeholder
QPushButton *ButtAbout = new QPushButton(tr("About"),h);
connect(ButtAbout, SIGNAL(clicked()), SLOT(slotAbout()));
QPushButton *ButtOK = new QPushButton(tr("Quit"),h);
connect(ButtOK, SIGNAL(clicked()), SLOT(slotQuit()));
ButtOK->setFocus();
text = new QTextEdit(this);
text->setTextFormat(Qt::PlainText);
text->setReadOnly(readOnly);
text->setWordWrap(QTextEdit::NoWrap);
text->setMinimumSize(300,200);
v->addWidget(text);
// .................................................
loadFile(FileName_);
}
QucsEdit::~QucsEdit()
{
}
// ************************************************************
void QucsEdit::slotAbout()
{
QMessageBox::about(this, tr("About..."),
tr("Qucs Editor Version ")+PACKAGE_VERSION+
tr("\nvery simple text editor for Qucs\n")+
tr("Copyright (C) 2004 by Michael Margraf\n"));
}
// ************************************************************
void QucsEdit::slotLoad()
{
QString s = QFileDialog::getOpenFileName(".", "*", this,
"", tr("Enter a Filename"));
if(s.isEmpty()) return;
if(!closeFile()) return;
loadFile(s);
}
// ************************************************************
void QucsEdit::slotSave()
{
if(FileName.isEmpty()) return;
QFile file(FileName);
if(!file.open(IO_WriteOnly)) {
QMessageBox::critical(this, tr("Error"),
tr("Cannot write file: ")+FileName);
return;
}
QTextStream stream(&file);
stream << text->text();
text->setModified(false);
file.close();
}
// ************************************************************
void QucsEdit::slotQuit()
{
if(!closeFile()) return;
int tmp;
tmp = x(); // call size and position function in order to ...
tmp = y(); // ... set them correctly before closing the ...
tmp = width(); // dialog !!! Otherwise the frame of the window ...
tmp = height(); // will not be recognized (a X11 problem).
accept();
}
// ************************************************************
// To get all close events.
void QucsEdit::closeEvent(QCloseEvent *Event)
{
int tmp;
tmp = x(); // call size and position function in order to ...
tmp = y(); // ... set them correctly before closing the ...
tmp = width(); // dialog !!! Otherwise the frame of the window ...
tmp = height(); // will not be recognized (a X11 problem).
Event->accept();
}
// ************************************************************
bool QucsEdit::loadFile(const QString& Name)
{
if(Name.isEmpty()) return false;
QFile file(Name);
if(!file.open(IO_ReadOnly)) {
QMessageBox::critical(this, tr("Error"),
tr("Cannot read file: ")+Name);
return false;
}
QTextStream stream(&file);
text->setText(stream.read());
file.close();
QFileInfo info(Name);
FileName = info.fileName();
setCaption("QucsEdit " PACKAGE_VERSION " - " + tr("File: ")+FileName);
return true;
}
// ************************************************************
bool QucsEdit::closeFile()
{
if(text->isModified()) {
switch(QMessageBox::warning(this,tr("Closing document"),
tr("The text contains unsaved changes!\n")+
tr("Do you want to save the changes?"),
tr("&Save"), tr("&Discard"), tr("Cancel"), 0, 2)) {
case 0: slotSave();
return true;
case 2: return false;
}
}
return true;
}

View File

@ -1,3 +1,12 @@
2004-06-25 Michael Margraf <michael.margraf@alumni.tu-berlin.de>
* added qucshelp and qucsedit as independent programs
* added an "edit" button to the componentdialog
* fixed bug in enabling/disabling undo button
* fixed bug in creating subcircuit netlist
* "Type" parameter in "parameter sweep", "AC simulation",
"S parameter simulation"
2004-06-22 Michael Margraf <michael.margraf@alumni.tu-berlin.de>
* changes current document by <tab> key.

View File

@ -24,7 +24,7 @@ AC_Sim::AC_Sim()
Description = QObject::tr("ac simulation");
QFontMetrics metrics(QucsSettings.largeFont);
QRect r = metrics.boundingRect(0,0,0,0,Qt::AlignAuto,Description);
QSize r = metrics.size(0, Description);
int xb = (r.width() >> 1) + 6;
int yb = (r.height() >> 1) + 4;
@ -42,17 +42,19 @@ AC_Sim::AC_Sim()
x1 = -xb-4; y1 = -yb-4;
x2 = xb+8; y2 = yb+9;
tx = x1+4;
tx = x1+8;
ty = y2+4;
Model = ".AC";
Name = "AC";
Props.append(new Property("Type", "lin", true,
QObject::tr("sweep type (lin,log)")));
Props.append(new Property("Start", "1 GHz", true,
QObject::tr("start frequency in Hertz")));
Props.append(new Property("Stop", "10 GHz", true,
QObject::tr("stop frequency in Hertz")));
Props.append(new Property("Step", "1 GHz", true,
QObject::tr("frequency steps in Hertz")));
Props.append(new Property("Points", "20", true,
QObject::tr("number of simulation steps")));
}
AC_Sim::~AC_Sim()

View File

@ -416,6 +416,7 @@ bool Component::load(const QString& _s)
cy = n.toInt(&ok);
if(!ok) return false;
if(Model.at(0) != '.') { // is simulation component (dc, ac, ...) ?
n = s.section(' ',5,5); // tx
ttx = n.toInt(&ok);
if(!ok) return false;
@ -434,6 +435,7 @@ bool Component::load(const QString& _s)
for(int z=0; z<tmp; z++) rotate(); // rotate component
tx = ttx; ty = tty; // restore text position (was changed by rotate/mirror)
}
int z=0;
// load all properties

View File

@ -24,12 +24,14 @@
#include <qmessagebox.h>
#include <qvalidator.h>
#include <qfiledialog.h>
#include <qprocess.h>
ComponentDialog::ComponentDialog(Component *c,
QWidget *parent, const char *name )
: QDialog(parent, name, TRUE, Qt::WDestructiveClose)
{
resize(400, 250);
setCaption(tr("Edit Component Properties"));
QGridLayout *g = new QGridLayout(this,9,2,5,5);
@ -88,6 +90,10 @@ ComponentDialog::ComponentDialog(Component *c,
QHBox *h3 = new QHBox(this);
g->addWidget(h3,4,1);
h3->setStretchFactor(new QWidget(h3),5); // stretchable placeholder
EditButt = new QPushButton(tr("Edit"),h3);
EditButt->setEnabled(false);
EditButt->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
connect(EditButt, SIGNAL(clicked()), SLOT(slotEditFile()));
BrowseButt = new QPushButton(tr("Browse"),h3);
BrowseButt->setEnabled(false);
BrowseButt->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
@ -132,8 +138,6 @@ ComponentDialog::ComponentDialog(Component *c,
connect(prop, SIGNAL(clicked(QListViewItem*)),
SLOT(slotSelectProperty(QListViewItem*)));
resize(400, 250);
}
ComponentDialog::~ComponentDialog()
@ -151,8 +155,14 @@ void ComponentDialog::slotSelectProperty(QListViewItem *item)
if(item->text(2) == tr("yes")) disp->setChecked(true);
else disp->setChecked(false);
if(item->text(0) == "File") BrowseButt->setEnabled(true);
else BrowseButt->setEnabled(false);
if(item->text(0) == "File") {
EditButt->setEnabled(true);
BrowseButt->setEnabled(true);
}
else {
EditButt->setEnabled(false);
BrowseButt->setEnabled(false);
}
int i;
QString PropDesc = item->text(3);
@ -342,6 +352,15 @@ void ComponentDialog::slotBrowseFile()
prop->currentItem()->setText(1, s);
}
// -------------------------------------------------------------------------
void ComponentDialog::slotEditFile()
{
QString com = QucsSettings.Editor + " " + edit->text();
QProcess QucsEditor(QStringList::split(" ", com));
if(!QucsEditor.start())
QMessageBox::critical(this, tr("Error"), tr("Cannot start text editor!"));
}
// -------------------------------------------------------------------------
// Is called if the add button is pressed. This is only possible for some
// properties.

View File

@ -47,6 +47,7 @@ private slots:
void slotApplyInput();
void slotApplyState(int State);
void slotBrowseFile();
void slotEditFile();
void slotApplyChange(const QString& Text);
void slotApplyProperty();
void slotApplyPropName();
@ -60,7 +61,7 @@ private:
QLineEdit *edit, *NameEdit;
QComboBox *ComboEdit;
QLabel *Name, *Description;
QPushButton *BrowseButt, *ButtAdd, *ButtRem;
QPushButton *BrowseButt, *EditButt, *ButtAdd, *ButtRem;
QCheckBox *disp;
Component *Comp;
bool changed, transfered;

View File

@ -24,7 +24,7 @@ DC_Sim::DC_Sim()
Description = QObject::tr("dc simulation");
QFontMetrics metrics(QucsSettings.largeFont);
QRect r = metrics.boundingRect(0,0,0,0,Qt::AlignAuto,Description);
QSize r = metrics.size(0, Description);
int xb = (r.width() >> 1) + 6;
int yb = (r.height() >> 1) + 4;
@ -42,7 +42,7 @@ DC_Sim::DC_Sim()
x1 = -xb-4; y1 = -yb-4;
x2 = xb+8; y2 = yb+9;
tx = x1+4;
tx = x1+8;
ty = y2+4;
Model = ".DC";
Name = "DC";

View File

@ -26,7 +26,7 @@ HB_Sim::HB_Sim()
QString s = Description;
s[s.findRev(" ")] = '\n'; // break line before the word "simulation"
QFontMetrics metrics(QucsSettings.largeFont);
QRect r = metrics.boundingRect(0,0,0,0, Qt::AlignAuto, s);
QSize r = metrics.size(0, s);
int xb = (r.width() >> 1) + 6;
int yb = (r.height() >> 1) + 4;
@ -44,7 +44,7 @@ HB_Sim::HB_Sim()
x1 = -xb-4; y1 = -yb-4;
x2 = xb+8; y2 = yb+9;
tx = x1+4;
tx = x1+8;
ty = y2+4;
Model = ".HB";
Name = "HB";

View File

@ -26,7 +26,7 @@ Param_Sweep::Param_Sweep()
QString s = Description;
s.replace(" ","\n");
QFontMetrics metrics(QucsSettings.largeFont);
QRect r = metrics.boundingRect(0,0,0,0, Qt::AlignAuto, s);
QSize r = metrics.size(0, s);
int xb = (r.width() >> 1) + 6;
int yb = (r.height() >> 1) + 4;
@ -44,21 +44,23 @@ Param_Sweep::Param_Sweep()
x1 = -xb-4; y1 = -yb-4;
x2 = xb+8; y2 = yb+9;
tx = x1+4;
tx = x1+8;
ty = y2+4;
Model = ".SW";
Name = "SW";
Props.append(new Property("Sim", "", true,
QObject::tr("simulation to perform parameter sweep on")));
Props.append(new Property("Type", "lin", true,
QObject::tr("sweep type (lin,log)")));
Props.append(new Property("Param", "R1", true,
QObject::tr("parameter to sweep")));
Props.append(new Property("Start", "5 Ohm", true,
QObject::tr("start value for sweep")));
Props.append(new Property("Stop", "50 Ohm", true,
QObject::tr("stop value for sweep")));
Props.append(new Property("Step", "5 Ohm", true,
QObject::tr("step size for sweep")));
Props.append(new Property("Points", "20", true,
QObject::tr("number of simulation steps")));
}
Param_Sweep::~Param_Sweep()

View File

@ -26,7 +26,7 @@ SP_Sim::SP_Sim()
QString s = Description;
s[s.findRev(" ")] = '\n'; // break line before the word "simulation"
QFontMetrics metrics(QucsSettings.largeFont);
QRect r = metrics.boundingRect(0,0,0,0, Qt::AlignAuto, s);
QSize r = metrics.size(0, s);
int xb = (r.width() >> 1) + 6;
int yb = (r.height() >> 1) + 4;
@ -44,22 +44,24 @@ SP_Sim::SP_Sim()
x1 = -xb-4; y1 = -yb-4;
x2 = xb+8; y2 = yb+9;
tx = x1+4;
tx = x1+8;
ty = y2+4;
Model = ".SP";
Name = "SP";
Props.append(new Property("Type", "lin", true,
QObject::tr("sweep type (lin,log)")));
Props.append(new Property("Start", "1 GHz", true,
QObject::tr("start frequency in Hertz")));
Props.append(new Property("Stop", "10 GHz", true,
QObject::tr("stop frequency in Hertz")));
Props.append(new Property("Step", "1 GHz", true,
QObject::tr("frequency steps in Hertz")));
Props.append(new Property("Points", "20", true,
QObject::tr("number of simulation steps")));
Props.append(new Property("Noise", "no", false,
QObject::tr("calculate noise parameters (yes,no)")));
Props.append(new Property("NoiseIP", "1", true,
Props.append(new Property("NoiseIP", "1", false,
QObject::tr("input port for noise figure")));
Props.append(new Property("NoiseOP", "2", true,
Props.append(new Property("NoiseOP", "2", false,
QObject::tr("output port for noise figure")));
}

View File

@ -26,7 +26,7 @@ TR_Sim::TR_Sim()
QString s = Description;
s.replace(" ","\n");
QFontMetrics metrics(QucsSettings.largeFont);
QRect r = metrics.boundingRect(0,0,0,0, Qt::AlignAuto, s);
QSize r = metrics.size(0, s);
int xb = (r.width() >> 1) + 6;
int yb = (r.height() >> 1) + 4;
@ -44,7 +44,7 @@ TR_Sim::TR_Sim()
x1 = -xb-4; y1 = -yb-4;
x2 = xb+8; y2 = yb+9;
tx = x1+4;
tx = x1+8;
ty = y2+4;
Model = ".TR";
Name = "TR";

View File

@ -24,13 +24,12 @@
noinst_LIBRARIES = libdialogs.a
MOCHEADERS = fileshowdialog.h helpdialog.h messagebox.h settingsdialog.h \
simmessage.h qucssettingsdialog.h
MOCHEADERS = messagebox.h settingsdialog.h simmessage.h qucssettingsdialog.h
MOCFILES = $(MOCHEADERS:.h=.moc.cpp)
libdialogs_a_SOURCES = fileshowdialog.cpp helpdialog.cpp messagebox.cpp \
settingsdialog.cpp newprojdialog.cpp simmessage.cpp \
qucssettingsdialog.cpp
libdialogs_a_SOURCES = messagebox.cpp settingsdialog.cpp newprojdialog.cpp \
simmessage.cpp qucssettingsdialog.cpp
nodist_libdialogs_a_SOURCES = $(MOCFILES)

View File

@ -1,62 +0,0 @@
/***************************************************************************
fileshowdialog.cpp - description
-------------------
begin : Mon Nov 17 2003
copyright : (C) 2003 by Michael Margraf
email : michael.margraf@alumni.tu-berlin.de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "fileshowdialog.h"
#include <qlayout.h>
#include <qtextedit.h>
#include <qpushbutton.h>
#include <qfile.h>
#include <qtextstream.h>
#include <qmessagebox.h>
FileShowDialog::FileShowDialog(const QString& FileName, QWidget *parent, const char *name )
: QDialog(parent, name, FALSE, Qt::WDestructiveClose)
{
setCaption(tr("File: ")+FileName);
QVBoxLayout *v = new QVBoxLayout(this);
v->setSpacing(5);
QTextEdit *text = new QTextEdit(this);
text->setTextFormat(Qt::PlainText);
text->setReadOnly(true);
text->setWordWrap(QTextEdit::NoWrap);
text->setMinimumSize(320,350);
v->addWidget(text);
QPushButton *ButtOK = new QPushButton(tr("OK"),this);
v->addWidget(ButtOK);
connect(ButtOK, SIGNAL(clicked()), SLOT(accept()));
ButtOK->setFocus();
// .................................................
QFile file(FileName);
if(!file.open(IO_ReadOnly)) {
text->setText(tr("ERROR: Cannot read file: ")+FileName+" !!!");
return;
}
QTextStream stream(&file);
text->setText(stream.read());
file.close();
}
FileShowDialog::~FileShowDialog()
{
}

View File

@ -1,34 +0,0 @@
/***************************************************************************
fileshowdialog.h - description
-------------------
begin : Mon Nov 17 2003
copyright : (C) 2003 by Michael Margraf
email : michael.margraf@alumni.tu-berlin.de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef FILESHOWDIALOG_H
#define FILESHOWDIALOG_H
#include <qdialog.h>
/**
*@author Michael Margraf
*/
class FileShowDialog : public QDialog {
Q_OBJECT
public:
FileShowDialog(const QString& _FileName, QWidget *parent=0, const char *name=0);
~FileShowDialog();
};
#endif

View File

@ -1,67 +0,0 @@
/***************************************************************************
helpdialog.cpp - description
-------------------
begin : Sun Jan 11 2004
copyright : (C) 2004 by Michael Margraf
email : michael.margraf@alumni.tu-berlin.de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "helpdialog.h"
#include <qpushbutton.h>
#include <qlayout.h>
#include <qhbox.h>
/* FIXME: #include <qtextcodec.h> */
HelpDialog::HelpDialog(const QString& page, QWidget *parent, const char *name )
: QDialog(parent, name, FALSE, Qt::WDestructiveClose)
{
setCaption(tr("Qucs Help System"));
QVBoxLayout *v = new QVBoxLayout(this);
v->setSpacing(5);
text = new QTextBrowser(this);
text->setMinimumSize(600,300);
v->addWidget(text);
text->setSource(DOCDIR +page);
/* FIXME: text->setSource(QString(DOCDIR) + QTextCodec::locale() + page); */
QHBox *h = new QHBox(this);
h->setSpacing(5);
v->addWidget(h);
QWidget *st = new QWidget(h); // stretchable placeholder
h->setStretchFactor(st,5);
QPushButton *ButtIndex = new QPushButton(tr("Help Index"),h);
connect(ButtIndex, SIGNAL(clicked()), SLOT(slotGotoIndex()));
QPushButton *ButtClose = new QPushButton(tr("Close"),h);
connect(ButtClose, SIGNAL(clicked()), SLOT(slotClose()));
ButtClose->setFocus();
}
HelpDialog::~HelpDialog()
{
}
void HelpDialog::slotGotoIndex()
{
text->setSource(DOCDIR "index.html");
}
void HelpDialog::slotClose()
{
done(0); // close and delete (because of WDestructiveClose)
}

View File

@ -1,43 +0,0 @@
/***************************************************************************
helpdialog.h - description
-------------------
begin : Sun Jan 11 2004
copyright : (C) 2004 by Michael Margraf
email : michael.margraf@alumni.tu-berlin.de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef HELPDIALOG_H
#define HELPDIALOG_H
#include <qdialog.h>
#include <qtextbrowser.h>
/**
*@author Michael Margraf
*/
class HelpDialog : public QDialog {
Q_OBJECT
public:
HelpDialog(const QString& page, QWidget *parent=0, const char *name=0);
~HelpDialog();
private slots:
void slotGotoIndex();
void slotClose();
private:
QTextBrowser *text;
};
#endif

View File

@ -15,6 +15,10 @@
* *
***************************************************************************/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "qucssettingsdialog.h"
#include "../main.h"
@ -41,7 +45,7 @@ QucsSettingsDialog::QucsSettingsDialog(QucsApp *parent,
// ...........................................................
QWidget *Tab1 = new QWidget(t);
QGridLayout *gp = new QGridLayout(Tab1,3,2,5,5);
QGridLayout *gp = new QGridLayout(Tab1,4,2,5,5);
QLabel *l1 = new QLabel(tr("Font (set after reload):"), Tab1);
gp->addWidget(l1,0,0);
@ -61,8 +65,13 @@ QucsSettingsDialog::QucsSettingsDialog(QucsApp *parent,
undoNumEdit->setValidator(new QIntValidator(0, 200, undoNumEdit));
gp->addWidget(undoNumEdit,2,1);
QLabel *l4 = new QLabel(tr("text editor:"), Tab1);
gp->addWidget(l4,3,0);
editorEdit = new QLineEdit(Tab1);
gp->addWidget(editorEdit,3,1);
t->addTab(Tab1, tr("Design"));
t->addTab(Tab1, tr("Settings"));
// ...........................................................
/* QWidget *Tab2 = new QWidget(t);
@ -107,6 +116,7 @@ QucsSettingsDialog::QucsSettingsDialog(QucsApp *parent,
BGColorButton->setPaletteBackgroundColor(
App->view->viewport()->paletteBackgroundColor());
undoNumEdit->setText(QString::number(QucsSettings.maxUndo));
editorEdit->setText(QucsSettings.Editor);
}
QucsSettingsDialog::~QucsSettingsDialog()
@ -144,6 +154,10 @@ void QucsSettingsDialog::slotApply()
QucsSettings.maxUndo = undoNumEdit->text().toInt(&ok);
changed = true;
}
if(QucsSettings.Editor != editorEdit->text()) {
QucsSettings.Editor = editorEdit->text();
changed = true;
}
if(changed) {
saveApplSettings(App); // also sets the small and large font
@ -176,6 +190,8 @@ void QucsSettingsDialog::slotDefaultValues()
{
Font = QFont("Helvetica", 12);
FontButton->setText(Font.toString());
BGColorButton->setPaletteBackgroundColor(QColor(255,250,225));
undoNumEdit->setText("20");
editorEdit->setText(BINARYDIR "qucsedit");
}

View File

@ -47,7 +47,7 @@ public:
QFont Font;
QPushButton *FontButton, *BGColorButton;
QLineEdit *undoNumEdit;
QLineEdit *undoNumEdit, *editorEdit;
};
#endif

View File

@ -38,7 +38,8 @@ tQucsSettings QucsSettings
= {0, 0, 600, 400, // position and size
QFont("Helvetica", 12), QFont("Helvetica", 16, QFont::DemiBold),
QFont("Helvetica", 10, QFont::Light),
QColor(255, 250, 225), 20};
QColor(255, 250, 225), 20,
BINARYDIR "qucsedit"};
QFont savingFont; // to remember which font to save in "qucsrc"
@ -82,6 +83,8 @@ bool loadSettings()
QucsSettings.BGColor.setRgb(255, 250, 225); }
else if(Setting == "maxUndo") {
QucsSettings.maxUndo = Line.toInt(&ok); }
else if(Setting == "Editor") {
QucsSettings.Editor = Line; }
}
file.close();
@ -108,7 +111,8 @@ bool saveApplSettings(QucsApp *qucs)
<< "Font=" << savingFont.toString() << "\n"
<< "BGColor=" << qucs->view->viewport()->paletteBackgroundColor().name()
<< "\n"
<< "maxUndo=" << QucsSettings.maxUndo << "\n";
<< "maxUndo=" << QucsSettings.maxUndo << "\n"
<< "Editor=" << QucsSettings.Editor << "\n";
file.close();
return true;
@ -153,6 +157,7 @@ QString complexRad (double real, double imag, int Precision)
return Text;
}
// #########################################################################
// ########## ##########
// ########## Program Start ##########

View File

@ -30,6 +30,7 @@ struct tQucsSettings {
QColor BGColor; // background color of view area
unsigned int maxUndo; // size of undo stack
QString Editor;
};
extern tQucsSettings QucsSettings; // extern because nearly everywhere used

View File

@ -27,9 +27,7 @@
#include "paintings/paintings.h"
#include "diagrams/diagrams.h"
#include "dialogs/messagebox.h"
#include "dialogs/helpdialog.h"
#include "dialogs/newprojdialog.h"
#include "dialogs/fileshowdialog.h"
#include "dialogs/settingsdialog.h"
#include "dialogs/qucssettingsdialog.h"
@ -785,15 +783,21 @@ void QucsApp::slotEditCopy()
// ########################################################################
void QucsApp::slotHelpIndex()
{
HelpDialog *d = new HelpDialog("index.html");
d->show();
QStringList com;
com << BINARYDIR "qucshelp" << "index.html";
QProcess QucsHelp(com);
if(!QucsHelp.start())
QMessageBox::critical(this, tr("Error"), tr("Cannot start qucshelp!"));
}
// ########################################################################
void QucsApp::slotGettingStarted()
{
HelpDialog *d = new HelpDialog("start.html");
d->show();
QStringList com;
com << BINARYDIR "qucshelp" << "start.html";
QProcess QucsHelp(com);
if(!QucsHelp.start())
QMessageBox::critical(this, tr("Error"), tr("Cannot start qucshelp!"));
}
// ########################################################################
@ -992,16 +996,20 @@ void QucsApp::slotAfterSimulation(int Status, SimMessage *sim)
// Is called to show the output messages of the last simulation.
void QucsApp::slotShowLastMsg()
{
FileShowDialog *d = new FileShowDialog("log.txt", this);
d->show();
QString com = QucsSettings.Editor + " log.txt";
QProcess QucsEditor(QStringList::split(" ", com));
if(!QucsEditor.start())
QMessageBox::critical(this, tr("Error"), tr("Cannot start text editor!"));
}
// ------------------------------------------------------------------------
// Is called to show the netlist of the last simulation.
void QucsApp::slotShowLastNetlist()
{
FileShowDialog *d = new FileShowDialog("netlist.txt", this);
d->show();
QString com = QucsSettings.Editor + " netlist.txt";
QProcess QucsEditor(QStringList::split(" ", com));
if(!QucsEditor.start())
QMessageBox::critical(this, tr("Error"), tr("Cannot start text editor!"));
}
// ------------------------------------------------------------------------
@ -1014,7 +1022,7 @@ void QucsApp::slotChangePage()
QMessageBox::critical(this, tr("Error"), tr("No page set !"));
return;
}
QFileInfo Info;
QucsDoc *d;

View File

@ -120,6 +120,18 @@
<source>Description</source>
<translation>Beschreibung</translation>
</message>
<message>
<source>Edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Error</source>
<translation type="unfinished">Fehler</translation>
</message>
<message>
<source>Cannot start text editor!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DiagramDialog</name>
@ -276,15 +288,15 @@
<name>FileShowDialog</name>
<message>
<source>File: </source>
<translation>Datei: </translation>
<translation type="obsolete">Datei: </translation>
</message>
<message>
<source>ERROR: Cannot read file: </source>
<translation>FEHLER: Datei kann nicht gelesen werden: </translation>
<translation type="obsolete">FEHLER: Datei kann nicht gelesen werden: </translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
<translation type="obsolete">OK</translation>
</message>
</context>
<context>
@ -449,15 +461,15 @@
<name>HelpDialog</name>
<message>
<source>Qucs Help System</source>
<translation>Qucs Hilfesystem</translation>
<translation type="obsolete">Qucs Hilfesystem</translation>
</message>
<message>
<source>Help Index</source>
<translation>Hilfeindex</translation>
<translation type="obsolete">Hilfeindex</translation>
</message>
<message>
<source>Close</source>
<translation>Schließen</translation>
<translation type="obsolete">Schließen</translation>
</message>
</context>
<context>
@ -750,7 +762,7 @@ Unbekanntes Feld!</translation>
</message>
<message>
<source>frequency steps in Hertz</source>
<translation>Frequenzschrittweite in Hertz</translation>
<translation type="obsolete">Frequenzschrittweite in Hertz</translation>
</message>
<message>
<source>ideal dc current source</source>
@ -1002,7 +1014,7 @@ Unbekanntes Feld!</translation>
</message>
<message>
<source>step size for sweep</source>
<translation>Schrittweite für den Durchlauf</translation>
<translation type="obsolete">Schrittweite für den Durchlauf</translation>
</message>
<message>
<source>resistor (US symbol)</source>
@ -1240,7 +1252,7 @@ Ungültiger Zeilenanfang!</translation>
</message>
<message>
<source>microstrip model (Kirschning,Kobayashi,Yamashita)</source>
<translation>Mikrostreifenmodell (Kirschning,Kobayashi,Yamashita)</translation>
<translation type="obsolete">Mikrostreifenmodell (Kirschning,Kobayashi,Yamashita)</translation>
</message>
<message>
<source>invalid</source>
@ -1594,6 +1606,62 @@ Ungültiger Zeilenanfang!</translation>
<source>Isr emission coefficient</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>simulation temperature in degree Celsius</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>relative tolerance for convergence</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>absolute tolerance for currents</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>absolute tolerance for voltages</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>put operating points into dataset (yes,no)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>maximum number of iterations until error</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>put result into dataset (yes,no)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>quasi-static microstrip model (Hammerstad,Wheeler,Schneider)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>microstrip dispersion model (Kirschning,Kobayashi,Yamashita,Hammerstad,Getsinger,Schneider,Pramanick)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calculate noise parameters (yes,no)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>input port for noise figure</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>output port for noise figure</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>sweep type (lin,log)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>number of simulation steps</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QucsActions</name>
@ -3288,6 +3356,14 @@ Setzt eine Markierung auf einen Graphen im Diagramm</translation>
<source>ac Current Source</source>
<translation type="obsolete">AC Stromquelle</translation>
</message>
<message>
<source>Cannot start qucshelp!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cannot start text editor!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QucsInit</name>
@ -4287,7 +4363,7 @@ Setzt die Einstellungen der Applikation</translation>
</message>
<message>
<source>Design</source>
<translation>Ansicht</translation>
<translation type="obsolete">Ansicht</translation>
</message>
<message>
<source>Default Values</source>
@ -4301,6 +4377,14 @@ Setzt die Einstellungen der Applikation</translation>
<source>maximum undo operations:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>text editor:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Settings</source>
<translation type="unfinished">Einstellungen</translation>
</message>
</context>
<context>
<name>QucsView</name>

View File

@ -120,6 +120,18 @@
<source>Description</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Error</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cannot start text editor!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DiagramDialog</name>
@ -268,21 +280,6 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FileShowDialog</name>
<message>
<source>File: </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>OK</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>ERROR: Cannot read file: </source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FillDialog</name>
<message>
@ -433,21 +430,6 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>HelpDialog</name>
<message>
<source>Qucs Help System</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Help Index</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Close</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MarkerDialog</name>
<message>
@ -645,10 +627,6 @@ Unknown field!</source>
<source>stop frequency in Hertz</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>frequency steps in Hertz</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>ideal dc current source</source>
<translation type="unfinished"></translation>
@ -849,10 +827,6 @@ Unknown field!</source>
<source>spacing between the lines</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>microstrip model (Kirschning,Kobayashi,Yamashita)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>microstrip cross</source>
<translation type="unfinished"></translation>
@ -909,10 +883,6 @@ Unknown field!</source>
<source>stop value for sweep</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>step size for sweep</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>phase shifter</source>
<translation type="unfinished"></translation>
@ -1482,6 +1452,62 @@ Wrong line start!</source>
<source>Isr emission coefficient</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>simulation temperature in degree Celsius</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>relative tolerance for convergence</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>absolute tolerance for currents</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>absolute tolerance for voltages</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>put operating points into dataset (yes,no)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>maximum number of iterations until error</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>put result into dataset (yes,no)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>quasi-static microstrip model (Hammerstad,Wheeler,Schneider)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>microstrip dispersion model (Kirschning,Kobayashi,Yamashita,Hammerstad,Getsinger,Schneider,Pramanick)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calculate noise parameters (yes,no)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>input port for noise figure</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>output port for noise figure</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>sweep type (lin,log)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>number of simulation steps</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QucsApp</name>
@ -1966,6 +1992,14 @@ Go on ?</source>
<source>filled Rectangle</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cannot start qucshelp!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cannot start text editor!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QucsInit</name>
@ -2848,10 +2882,6 @@ Sets properties of the application</source>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Design</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Default Values</source>
<translation type="unfinished"></translation>
@ -2864,6 +2894,14 @@ Sets properties of the application</source>
<source>maximum undo operations:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>text editor:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QucsView</name>

View File

@ -120,6 +120,18 @@
<source>Description</source>
<translation>Descrizione</translation>
</message>
<message>
<source>Edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Error</source>
<translation type="unfinished">Errore</translation>
</message>
<message>
<source>Cannot start text editor!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DiagramDialog</name>
@ -276,15 +288,15 @@
<name>FileShowDialog</name>
<message>
<source>File: </source>
<translation>File: </translation>
<translation type="obsolete">File: </translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
<translation type="obsolete">OK</translation>
</message>
<message>
<source>ERROR: Cannot read file: </source>
<translation>ERRORE: Impossibile leggere file: </translation>
<translation type="obsolete">ERRORE: Impossibile leggere file: </translation>
</message>
</context>
<context>
@ -449,15 +461,15 @@
<name>HelpDialog</name>
<message>
<source>Qucs Help System</source>
<translation>Sistema di Aiuto di Qucs</translation>
<translation type="obsolete">Sistema di Aiuto di Qucs</translation>
</message>
<message>
<source>Help Index</source>
<translation>Indice dell&apos;Aiuto</translation>
<translation type="obsolete">Indice dell&apos;Aiuto</translation>
</message>
<message>
<source>Close</source>
<translation>Chiudi</translation>
<translation type="obsolete">Chiudi</translation>
</message>
</context>
<context>
@ -709,7 +721,7 @@ Unknown field!</source>
</message>
<message>
<source>frequency steps in Hertz</source>
<translation>passo frequenza in Hertz</translation>
<translation type="obsolete">passo frequenza in Hertz</translation>
</message>
<message>
<source>ideal dc current source</source>
@ -994,10 +1006,6 @@ Wrong &apos;component&apos; line format!</source>
<source>stop value for sweep</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>step size for sweep</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>phase shifter</source>
<translation type="unfinished"></translation>
@ -1210,10 +1218,6 @@ Wrong &apos;component&apos; line format!</source>
<source>junction potential</source>
<translation>potenziale giunzione</translation>
</message>
<message>
<source>microstrip model (Kirschning,Kobayashi,Yamashita)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>specific resistance of metal</source>
<translation type="unfinished"></translation>
@ -1542,6 +1546,62 @@ Wrong &apos;component&apos; line format!</source>
<source>Isr emission coefficient</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>simulation temperature in degree Celsius</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>relative tolerance for convergence</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>absolute tolerance for currents</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>absolute tolerance for voltages</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>put operating points into dataset (yes,no)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>maximum number of iterations until error</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>put result into dataset (yes,no)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>quasi-static microstrip model (Hammerstad,Wheeler,Schneider)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>microstrip dispersion model (Kirschning,Kobayashi,Yamashita,Hammerstad,Getsinger,Schneider,Pramanick)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calculate noise parameters (yes,no)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>input port for noise figure</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>output port for noise figure</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>sweep type (lin,log)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>number of simulation steps</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QucsActions</name>
@ -2921,6 +2981,14 @@ Continuare ?</translation>
<source>filled Rectangle</source>
<translation>Rettangolo riempito</translation>
</message>
<message>
<source>Cannot start qucshelp!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cannot start text editor!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QucsInit</name>
@ -3914,10 +3982,6 @@ Sets properties of the application</source>
<source>Cancel</source>
<translation type="unfinished">Cancella</translation>
</message>
<message>
<source>Design</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Default Values</source>
<translation type="unfinished"></translation>
@ -3930,6 +3994,14 @@ Sets properties of the application</source>
<source>maximum undo operations:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>text editor:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Settings</source>
<translation type="unfinished">Impostazioni</translation>
</message>
</context>
<context>
<name>QucsView</name>

View File

@ -120,6 +120,18 @@
<source>Description</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Error</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cannot start text editor!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DiagramDialog</name>
@ -268,21 +280,6 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FileShowDialog</name>
<message>
<source>File: </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>OK</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>ERROR: Cannot read file: </source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FillDialog</name>
<message>
@ -433,21 +430,6 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>HelpDialog</name>
<message>
<source>Qucs Help System</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Help Index</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Close</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MarkerDialog</name>
<message>
@ -645,10 +627,6 @@ Unknown field!</source>
<source>stop frequency in Hertz</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>frequency steps in Hertz</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>ideal dc current source</source>
<translation type="unfinished"></translation>
@ -849,10 +827,6 @@ Unknown field!</source>
<source>spacing between the lines</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>microstrip model (Kirschning,Kobayashi,Yamashita)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>microstrip cross</source>
<translation type="unfinished"></translation>
@ -909,10 +883,6 @@ Unknown field!</source>
<source>stop value for sweep</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>step size for sweep</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>phase shifter</source>
<translation type="unfinished"></translation>
@ -1482,6 +1452,62 @@ Wrong line start!</source>
<source>Isr emission coefficient</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>simulation temperature in degree Celsius</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>relative tolerance for convergence</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>absolute tolerance for currents</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>absolute tolerance for voltages</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>put operating points into dataset (yes,no)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>maximum number of iterations until error</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>put result into dataset (yes,no)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>quasi-static microstrip model (Hammerstad,Wheeler,Schneider)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>microstrip dispersion model (Kirschning,Kobayashi,Yamashita,Hammerstad,Getsinger,Schneider,Pramanick)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calculate noise parameters (yes,no)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>input port for noise figure</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>output port for noise figure</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>sweep type (lin,log)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>number of simulation steps</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QucsApp</name>
@ -1966,6 +1992,14 @@ Go on ?</source>
<source>filled Rectangle</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cannot start qucshelp!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cannot start text editor!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QucsInit</name>
@ -2848,10 +2882,6 @@ Sets properties of the application</source>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Design</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Default Values</source>
<translation type="unfinished"></translation>
@ -2864,6 +2894,14 @@ Sets properties of the application</source>
<source>maximum undo operations:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>text editor:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QucsView</name>

View File

@ -120,6 +120,18 @@
<source>Select a file</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Error</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cannot start text editor!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DiagramDialog</name>
@ -268,21 +280,6 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FileShowDialog</name>
<message>
<source>File: </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>OK</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>ERROR: Cannot read file: </source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FillDialog</name>
<message>
@ -433,21 +430,6 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>HelpDialog</name>
<message>
<source>Qucs Help System</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Help Index</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Close</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MarkerDialog</name>
<message>
@ -655,10 +637,6 @@ Unknown field!</source>
<source>stop frequency in Hertz</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>frequency steps in Hertz</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>ideal dc current source</source>
<translation type="unfinished"></translation>
@ -914,10 +892,6 @@ Wrong &apos;component&apos; line format!</source>
<source>microstrip line</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>microstrip model (Kirschning,Kobayashi,Yamashita)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>microstrip mitered bend</source>
<translation type="unfinished"></translation>
@ -962,10 +936,6 @@ Wrong &apos;component&apos; line format!</source>
<source>stop value for sweep</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>step size for sweep</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>phase shifter</source>
<translation type="unfinished"></translation>
@ -1482,6 +1452,62 @@ Wrong &apos;component&apos; line format!</source>
<source>Isr emission coefficient</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>simulation temperature in degree Celsius</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>relative tolerance for convergence</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>absolute tolerance for currents</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>absolute tolerance for voltages</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>put operating points into dataset (yes,no)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>maximum number of iterations until error</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>put result into dataset (yes,no)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>quasi-static microstrip model (Hammerstad,Wheeler,Schneider)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>microstrip dispersion model (Kirschning,Kobayashi,Yamashita,Hammerstad,Getsinger,Schneider,Pramanick)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calculate noise parameters (yes,no)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>input port for noise figure</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>output port for noise figure</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>sweep type (lin,log)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>number of simulation steps</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QucsApp</name>
@ -1966,6 +1992,14 @@ Go on ?</source>
<source>filled Rectangle</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cannot start qucshelp!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cannot start text editor!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QucsInit</name>
@ -2848,10 +2882,6 @@ Sets properties of the application</source>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Design</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Default Values</source>
<translation type="unfinished"></translation>
@ -2864,6 +2894,14 @@ Sets properties of the application</source>
<source>maximum undo operations:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>text editor:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QucsView</name>

View File

@ -29,6 +29,7 @@
#include <qfileinfo.h>
#include <qimage.h>
#include <qiconset.h>
#include <qregexp.h>
#include <limits.h>
@ -100,10 +101,12 @@ QucsDoc::QucsDoc(QucsApp *App_, const QString& _Name) : File(this)
SimOpenDpl = true;
App = App_;
Bar = App->WorkView;
if(Bar != 0) {
Bar->addTab(Tab); // create tab in TabBar
Bar->repaint();
if(App) {
Bar = App->WorkView;
if(Bar) {
Bar->addTab(Tab); // create tab in TabBar
Bar->repaint();
}
}
DocChanged = false;
@ -174,7 +177,7 @@ void QucsDoc::setChanged(bool c, bool fillStack, char Op)
UndoStack.append(new QString(File.createUndoString(Op)));
//qDebug("time: %d ms", t.elapsed());
if(!App->undo->isEnabled()) App->undo->setEnabled(true);
if(App->redo->isEnabled()) App->undo->setEnabled(false);
if(App->redo->isEnabled()) App->redo->setEnabled(false);
while(UndoStack.count() > QucsSettings.maxUndo) // "while..." because
UndoStack.removeFirst(); // "maxUndo" could be decreased meanwhile
@ -2382,7 +2385,7 @@ bool QucsDoc::giveNodeNames(QTextStream *stream)
if(pc->Model == "GND") pc->Ports.first()->Connection->Name = "gnd";
else if(pc->Model.left(3) == "Sub") {
QucsDoc *d = new QucsDoc(0, pc->Props.getFirst()->Value);
if(!d->load()) { // load document if possible
if(!d->File.load()) { // load document if possible
delete d;
return false;
}
@ -2460,9 +2463,10 @@ bool QucsDoc::createSubNetlist(QTextStream *stream)
Component *pc;
for(pc = Comps.first(); pc != 0; pc = Comps.next())
if(pc->Model == "Port")
sl.append(pc->Props.first()->Value + ":" + pc->Ports.getFirst()->Connection->Name);
sl.append (pc->Props.first()->Value + ":" +
pc->Ports.getFirst()->Connection->Name);
sl.sort();
// QTextStream stream(NetlistFile);
(*stream) << "\nsubcircuit " << DocName << " " << sl.join(" ") << "\n";