Compiles with QT4 (still crashes when opening a document)

This commit is contained in:
Frans Schreuder 2012-10-31 09:15:06 +01:00
parent 41f9cf235c
commit 5736ac67f8
330 changed files with 4710 additions and 4331 deletions

View File

@ -38,7 +38,7 @@ if test "$enable_debug" = yes; then
QT_DEF=""
else
AC_DEFINE(NDEBUG, 1, [Define if debug code should be suppressed.])
QT_DEF="-DQT_NO_DEBUG -DQT_NO_CHECK"
QT_DEF="-DQT_NO_DEBUG"
if test "x$GCC" = xyes; then
CFLAGS="`echo $CFLAGS | sed -e 's/\-g //g'`"
CXXFLAGS="`echo $CXXFLAGS | sed -e 's/\-g //g'`"
@ -99,12 +99,12 @@ dnl Release specific. Uncomment these as required.
AC_SUBST(RELEASEDIRS)
dnl Check for language support.
AC_PATH_PROGS(LRELEASE, lrelease-qt3 lrelease, :, [$QTDIR/bin:$PATH])
AC_PATH_PROGS(LUPDATE, lupdate-qt3 lupdate, :, [$QTDIR/bin:$PATH])
AC_PATH_PROGS(LRELEASE, lrelease-qt4 lrelease, :, [$QTDIR/bin:$PATH])
AC_PATH_PROGS(LUPDATE, lupdate-qt4 lupdate, :, [$QTDIR/bin:$PATH])
dnl Check for MOC/UIC support.
AC_PATH_PROGS(MOC, moc-qt3 moc, :, [$QTDIR/bin:$PATH])
AC_PATH_PROGS(UIC, uic-qt3 uic, :, [$QTDIR/bin:$PATH])
AC_PATH_PROGS(MOC, moc-qt4 moc, :, [$QTDIR/bin:$PATH])
AC_PATH_PROGS(UIC, uic-qt4 uic, :, [$QTDIR/bin:$PATH])
if test "$MOC" = ":"; then
AC_MSG_WARN([
The $PACKAGE package needs the 'Qt Meta Object Compiler' to compile properly.
@ -128,16 +128,14 @@ dnl Check include path to Qt.
QT_INCLUDES=""
QT_VER=2
AC_MSG_CHECKING([for Qt headers])
paths="$QTDIR/include /usr/local/qt/include /usr/include/qt /usr/include/qt3 \
/usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/X11/qt \
/usr/X11R6/include/qt /usr/X11R6/include /sw/include/qt \
/usr/X11R6/include/qt2 $prefix/include/qt3"
paths="$QTDIR/include /usr/local/qt4/include /usr/include/qt4 /usr/include/qt4 \
/usr/include /usr/X11R6/include/X11/qt4 /usr/X11R6/include/X11/qt4 \
/usr/X11R6/include/qt4 /usr/X11R6/include /sw/include/qt4 \
/usr/X11R6/include/qt4 $prefix/include/qt4"
for path in $paths; do
if test -f "$path/qapplication.h"; then
QT_INCLUDES=$path
if test -f "$path/qmemarray.h"; then
QT_VER=3
fi
if test -f "$path/Qt/qapplication.h"; then
QT_INCLUDES="$path -I$path/Qt -I$path/QtGui -I$path/QtCore -I$path/Qt3Support"
QT_VER=4
break
fi
done
@ -154,15 +152,15 @@ AC_ARG_ENABLE([mt],
AC_HELP_STRING([--disable-mt],
[link to non-threaded Qt (deprecated)]),
enable_mt="$enableval",
[if test $QT_VER = 3; then
[if test $QT_VER = 4; then
enable_mt="yes"
else
enable_mt="no"
fi])
if test "$enable_mt" = yes; then
QT_LDF=""
QT_LIB="-lqt-mt"
QT_INC="$QT_DEF -DQT_THREAD_SUPPORT -D_REENTRANT"
QT_LIB="-lQtCore -lQtGui -lQt3Support"
QT_INC="$QT_DEF -DQT3_SUPPORT -DQT_THREAD_SUPPORT -D_REENTRANT"
[case $host_os in
*freebsd4*) QT_LIB="$QT_LIB -pthread" ;;
*freebsd[567]*) QT_LIB="$QT_LIB -lpthread" ;;
@ -171,13 +169,13 @@ if test "$enable_mt" = yes; then
QT_MTS="multi-threaded"
else
QT_LDF=""
QT_LIB="-lqt"
QT_LIB="-lQtCore -lQtGui -lQt3Support"
QT_INC="$QT_DEF"
QT_MTS="non-threaded"
fi
case $host_os in
*mingw*)
QT_LIB="$QT_LIB -lqtmain"
QT_LIB="$QT_LIB -lQtCore -lQtGui -lQt3Support"
QT_INC="$QT_INC -DQT_DLL -DUNICODE"
QT_LDF="$QT_LDF -mwindows"
;;
@ -189,9 +187,9 @@ QT_LDFLAGS=""
QT_LIBS=""
AC_MSG_RESULT([checking for Qt... $QT_VER ($QT_MTS)])
AC_MSG_CHECKING([for Qt library])
paths="$QTDIR/lib $QTDIR/lib64 /usr/local/qt/lib /usr/lib/qt /usr/lib \
/usr/X11R6/lib/X11/qt /usr/X11R6/lib/X11/qt /usr/X11R6/lib/qt \
/usr/X11R6/lib /sw/lib /usr/lib64/qt /usr/X11R6/lib/qt2"
paths="$QTDIR/lib $QTDIR/lib64 /usr/local/qt4/lib /usr/lib/qt4 /usr/lib/qt4/Qtconf /usr/lib \
/usr/X11R6/lib/X11/qt4 /usr/X11R6/lib/X11/qt4 /usr/X11R6/lib/qt4 \
/usr/X11R6/lib /sw/lib /usr/lib64/qt4 /usr/X11R6/lib/qt2"
AC_LANG(C++)
for path in $paths; do
save_LIBS="$LIBS"
@ -201,7 +199,7 @@ for path in $paths; do
LDFLAGS="$LDFLAGS $X11_LDFLAGS -L$path $QT_LDF"
CXXFLAGS="$CXXFLAGS $X11_INCLUDES $QT_INCLUDES $QT_INC"
AC_LINK_IFELSE(
[#include <qapplication.h>
[#include <Qt/qapplication.h>
int main (int argc, char ** argv) {
QApplication a (argc, argv); a.exec (); return 0; }],
[QT_LDFLAGS="$path";

View File

@ -22,9 +22,11 @@
#include "helpdialog.h"
#include <qlayout.h>
#include <qhbox.h>
#include <q3hbox.h>
#include <qpushbutton.h>
#include <qtextedit.h>
#include <q3textedit.h>
//Added by qt3to4:
#include <Q3VBoxLayout>
HelpDialog::HelpDialog(QWidget *parent)
@ -49,16 +51,16 @@ HelpDialog::HelpDialog(QWidget *parent)
// -------- create dialog widgets ------------
resize(250, 230);
vLayout = new QVBoxLayout(this);
vLayout = new Q3VBoxLayout(this);
Text = new QTextEdit(s, QString::null, this);
Text = new Q3TextEdit(s, QString::null, this);
Text->setTextFormat(Qt::PlainText);
Text->setReadOnly(true);
// Text->setWordWrap(QTextEdit::NoWrap);
Text->setMinimumSize(200,200);
vLayout->addWidget(Text);
QHBox *h = new QHBox(this);
Q3HBox *h = new Q3HBox(this);
vLayout->addWidget(h);
h->setStretchFactor(new QWidget(h),5); // stretchable placeholder

View File

@ -19,9 +19,11 @@
#define HELPDIALOG_H
#include <qdialog.h>
//Added by qt3to4:
#include <Q3VBoxLayout>
class QTextEdit;
class QVBoxLayout;
class Q3TextEdit;
class Q3VBoxLayout;
/**
*@author Michael Margraf
@ -37,8 +39,8 @@ private slots:
void slotClose();
private:
QVBoxLayout *vLayout;
QTextEdit *Text;
Q3VBoxLayout *vLayout;
Q3TextEdit *Text;
};
#endif

View File

@ -21,7 +21,7 @@
#include <qtextcodec.h>
#include <qtranslator.h>
#include <qfile.h>
#include <qtextstream.h>
#include <q3textstream.h>
#include <qmessagebox.h>
#include <qdir.h>
#include <qfont.h>
@ -39,10 +39,10 @@ bool loadSettings()
bool result = true;
QFile file(QDir::homeDirPath()+QDir::convertSeparators ("/.qucs/attenuatorrc"));
if(!file.open(IO_ReadOnly))
if(!file.open(QIODevice::ReadOnly))
result = false; // settings file doesn't exist
else {
QTextStream stream(&file);
Q3TextStream stream(&file);
QString Line, Setting;
while(!stream.atEnd()) {
Line = stream.readLine();
@ -58,10 +58,10 @@ bool loadSettings()
}
file.setName(QDir::homeDirPath()+QDir::convertSeparators ("/.qucs/qucsrc"));
if(!file.open(IO_ReadOnly))
if(!file.open(QIODevice::ReadOnly))
result = true; // qucs settings not necessary
else {
QTextStream stream(&file);
Q3TextStream stream(&file);
QString Line, Setting;
while(!stream.atEnd()) {
Line = stream.readLine();
@ -87,14 +87,14 @@ bool saveApplSettings(QucsAttenuator *qucs)
QFile file(QDir::homeDirPath()+QDir::convertSeparators ("/.qucs/attenuatorrc"));
if(!file.open(IO_WriteOnly)) {
if(!file.open(QIODevice::WriteOnly)) {
QMessageBox::warning(0, QObject::tr("Warning"),
QObject::tr("Cannot save settings !"));
return false;
}
QString Line;
QTextStream stream(&file);
Q3TextStream stream(&file);
stream << "Settings file, Qucs Attenuator " PACKAGE_VERSION "\n"
<< "AttenuatorWindow=" << qucs->x() << ',' << qucs->y() << '\n';

View File

@ -16,12 +16,16 @@
#include "attenuatorfunc.h"
#include "qucsattenuator.h"
//Added by qt3to4:
#include <Q3GridLayout>
#include <QPixmap>
#include <Q3VBoxLayout>
#include "helpdialog.h"
#include <qvgroupbox.h>
#include <qvbox.h>
#include <q3vgroupbox.h>
#include <q3vbox.h>
#include <qmenubar.h>
#include <qpopupmenu.h>
#include <q3popupmenu.h>
#include <qmessagebox.h>
#include <qlayout.h>
#include <qlabel.h>
@ -39,11 +43,11 @@ QucsAttenuator::QucsAttenuator()
setIcon(QPixmap(QucsSettings.BitmapDir + "big.qucs.xpm"));
setCaption("Qucs Attenuator " PACKAGE_VERSION);
QPopupMenu *fileMenu = new QPopupMenu();
fileMenu->insertItem(tr("E&xit"), this, SLOT(slotQuit()), CTRL+Key_Q);
Q3PopupMenu *fileMenu = new Q3PopupMenu();
fileMenu->insertItem(tr("E&xit"), this, SLOT(slotQuit()), Qt::CTRL+Qt::Key_Q);
QPopupMenu *helpMenu = new QPopupMenu();
helpMenu->insertItem(tr("Help..."), this, SLOT(slotHelpIntro()), Key_F1);
Q3PopupMenu *helpMenu = new Q3PopupMenu();
helpMenu->insertItem(tr("Help..."), this, SLOT(slotHelpIntro()), Qt::Key_F1);
helpMenu->insertSeparator();
helpMenu->insertItem(
tr("&About QucsAttenuator..."), this, SLOT(slotHelpAbout()), 0);
@ -54,8 +58,8 @@ QucsAttenuator::QucsAttenuator()
bar->insertSeparator ();
bar->insertItem(tr("&Help"), helpMenu);
QVBoxLayout * v2 = new QVBoxLayout (this);
QVBox * vm = new QVBox (this);
Q3VBoxLayout * v2 = new Q3VBoxLayout (this);
Q3VBox * vm = new Q3VBox (this);
vm->setSpacing(0);
v2->setSpacing(2);
@ -63,15 +67,15 @@ QucsAttenuator::QucsAttenuator()
Space->setFixedSize(5, bar->height());
v2->addWidget(Space);
QHBox * h1 = new QHBox (this);
Q3HBox * h1 = new Q3HBox (this);
v2->addWidget(h1);
h1->setSpacing(2);
h1->setMargin(5);
QVBox * v1 = new QVBox (h1);
Q3VBox * v1 = new Q3VBox (h1);
v1->setSpacing(2);
QGroupBox * TopoGroup = new QGroupBox (tr("Topology"), v1);
QGridLayout * tbox = new QGridLayout(TopoGroup, 3,1,5,5);
Q3GroupBox * TopoGroup = new Q3GroupBox (tr("Topology"), v1);
Q3GridLayout * tbox = new Q3GridLayout(TopoGroup, 3,1,5,5);
QWidget *Space2 = new QWidget(TopoGroup);
Space2->setFixedSize(8, 8);
@ -88,11 +92,11 @@ QucsAttenuator::QucsAttenuator()
pixTopology->setPixmap(QPixmap (QImage (QucsSettings.BitmapDir + "att_pi.png")));
tbox->addMultiCellWidget(pixTopology,2,2,0,0);
QVBox * vb = new QVBox (h1);
Q3VBox * vb = new Q3VBox (h1);
vb->setSpacing(2);
QGroupBox * InputGroup = new QGroupBox (tr("Input"), vb);
QGridLayout * ibox = new QGridLayout(InputGroup, 5,3,5,5);
Q3GroupBox * InputGroup = new Q3GroupBox (tr("Input"), vb);
Q3GridLayout * ibox = new Q3GridLayout(InputGroup, 5,3,5,5);
ibox->addMultiCellWidget(Space2,0,0,0,2);
IntVal = new QIntValidator(this);
@ -130,8 +134,8 @@ QucsAttenuator::QucsAttenuator()
Calculate = new QPushButton(tr("Calculate and put into Clipboard"), vb);
connect(Calculate, SIGNAL(clicked()), SLOT(slotCalculate()));
QGroupBox * OutputGroup = new QGroupBox (tr("Output"), vb);
QGridLayout * obox = new QGridLayout(OutputGroup, 5,3,5,5);
Q3GroupBox * OutputGroup = new Q3GroupBox (tr("Output"), vb);
Q3GridLayout * obox = new Q3GridLayout(OutputGroup, 5,3,5,5);
obox->addMultiCellWidget(Space2,0,0,0,2);
LabelR1 = new QLabel(tr("R1:"), OutputGroup);

View File

@ -15,9 +15,12 @@
#define QUCSATTENUATOR_H
#include <qdialog.h>
//Added by qt3to4:
#include <Q3GridLayout>
#include <QLabel>
#include "attenuatorfunc.h"
class QGridLayout;
class Q3GridLayout;
class QComboBox;
class QLineEdit;
class QIntValidator;

View File

@ -26,7 +26,7 @@
#include <qtextcodec.h>
#include <qtranslator.h>
#include <qfile.h>
#include <qtextstream.h>
#include <q3textstream.h>
#include <qmessagebox.h>
#include <qdir.h>
#include <qfont.h>
@ -42,10 +42,10 @@ bool loadSettings()
bool result = true;
QFile file(QDir::homeDirPath()+QDir::convertSeparators ("/.qucs/editrc"));
if(!file.open(IO_ReadOnly))
if(!file.open(QIODevice::ReadOnly))
result = false; // settings file doesn't exist
else {
QTextStream stream(&file);
Q3TextStream stream(&file);
QString Line, Setting;
while(!stream.atEnd()) {
Line = stream.readLine();
@ -62,10 +62,10 @@ bool loadSettings()
}
file.setName(QDir::homeDirPath()+QDir::convertSeparators ("/.qucs/qucsrc"));
if(!file.open(IO_ReadOnly))
if(!file.open(QIODevice::ReadOnly))
result = true; // qucs settings not necessary
else {
QTextStream stream(&file);
Q3TextStream stream(&file);
QString Line, Setting;
while(!stream.atEnd()) {
Line = stream.readLine();
@ -93,14 +93,14 @@ bool saveApplSettings(QucsEdit *qucs)
QFile file(QDir::homeDirPath()+QDir::convertSeparators ("/.qucs/editrc"));
if(!file.open(IO_WriteOnly)) {
if(!file.open(QIODevice::WriteOnly)) {
QMessageBox::warning(0, QObject::tr("Warning"),
QObject::tr("Cannot save settings !"));
return false;
}
QString Line;
QTextStream stream(&file);
Q3TextStream stream(&file);
stream << "Settings file, Qucs Editor " PACKAGE_VERSION "\n"
<< "EditWindow=" << qucs->x() << ',' << qucs->y() << ','

View File

@ -21,18 +21,22 @@
#include "qucsedit.h"
#include <qtextedit.h>
#include <q3textedit.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qhbox.h>
#include <q3hbox.h>
#include <qpushbutton.h>
#include <qfile.h>
#include <qtextstream.h>
#include <q3textstream.h>
#include <qmessagebox.h>
#include <qtoolbutton.h>
#include <qimage.h>
#include <qfiledialog.h>
#include <q3filedialog.h>
#include <qfont.h>
//Added by qt3to4:
#include <QPixmap>
#include <Q3VBoxLayout>
#include <QCloseEvent>
QucsEdit::QucsEdit(const QString& FileName_, bool readOnly)
@ -41,19 +45,19 @@ QucsEdit::QucsEdit(const QString& FileName_, bool readOnly)
setIcon (QPixmap(QucsSettings.BitmapDir + "big.qucs.xpm"));
setCaption("Qucs Editor " PACKAGE_VERSION " - " + tr("File: "));
QVBoxLayout *v = new QVBoxLayout(this);
Q3VBoxLayout *v = new Q3VBoxLayout(this);
QHBox *h = new QHBox(this);
Q3HBox *h = new Q3HBox(this);
v->addWidget(h);
QToolButton *ButtLoad = new QToolButton(h);
ButtLoad->setIconSet(
QIconSet(QImage(QucsSettings.BitmapDir + "fileopen.png")));
QIcon((QucsSettings.BitmapDir + "fileopen.png")));
connect(ButtLoad, SIGNAL(clicked()), SLOT(slotLoad()));
QToolButton *ButtSave = new QToolButton(h);
ButtSave->setIconSet(
QIconSet(QImage(QucsSettings.BitmapDir + "filesave.png")));
QIcon((QucsSettings.BitmapDir + "filesave.png")));
connect(ButtSave, SIGNAL(clicked()), SLOT(slotSave()));
ButtSave->setDisabled(readOnly);
@ -74,10 +78,10 @@ QucsEdit::QucsEdit(const QString& FileName_, bool readOnly)
fedit.setStyleHint(QFont::Courier);
fedit.setFixedPitch(true);
text = new QTextEdit(this);
text = new Q3TextEdit(this);
text->setTextFormat(Qt::PlainText);
text->setReadOnly(readOnly);
text->setWordWrap(QTextEdit::NoWrap);
text->setWordWrap(Q3TextEdit::NoWrap);
text->setMinimumSize(300,200);
text->setFont(fedit);
text->setCurrentFont(fedit);
@ -116,7 +120,7 @@ void QucsEdit::slotLoad()
{
static QString lastDir; // to remember last directory and file
QString s = QFileDialog::getOpenFileName(
QString s = Q3FileDialog::getOpenFileName(
lastDir.isEmpty() ? QString(".") : lastDir,
"*", this, "", tr("Enter a Filename"));
if(s.isEmpty()) return;
@ -129,19 +133,19 @@ void QucsEdit::slotLoad()
void QucsEdit::slotSave()
{
if(FileName.isEmpty()) {
FileName = QFileDialog::getSaveFileName(".", QString::null,
FileName = Q3FileDialog::getSaveFileName(".", QString::null,
this, "", tr("Enter a Document Name"));
if(FileName.isEmpty()) return;
}
QFile file(FileName);
if(!file.open(IO_WriteOnly)) {
if(!file.open(QIODevice::WriteOnly)) {
QMessageBox::critical(this, tr("Error"),
tr("Cannot write file: ")+FileName);
return;
}
QTextStream stream(&file);
Q3TextStream stream(&file);
stream << text->text();
text->setModified(false);
file.close();
@ -173,13 +177,13 @@ bool QucsEdit::loadFile(const QString& Name)
{
if(Name.isEmpty()) return false;
QFile file(Name);
if(!file.open(IO_ReadOnly)) {
if(!file.open(QIODevice::ReadOnly)) {
QMessageBox::critical(this, tr("Error"),
tr("Cannot read file: ")+Name);
return false;
}
QTextStream stream(&file);
Q3TextStream stream(&file);
text->setText(stream.read());
file.close();

View File

@ -19,9 +19,12 @@
#define QUCSEDIT_H
#include <qdialog.h>
//Added by qt3to4:
#include <QCloseEvent>
#include <QLabel>
class QLabel;
class QTextEdit;
class Q3TextEdit;
struct tQucsSettings {
@ -54,7 +57,7 @@ private:
bool closeFile();
QString FileName;
QTextEdit *text;
Q3TextEdit *text;
QLabel *PosText;
};

View File

@ -7,14 +7,14 @@
#include "qf_box.h"
#include "qf_dialog.h"
#include <qbutton.h>
#include <q3button.h>
#include <qcombobox.h>
#include <qlineedit.h>
#include <qcheckbox.h>
#include <qlabel.h>
#include <qvalidator.h>
#include <qpushbutton.h>
#include <qvbuttongroup.h>
#include <q3buttongroup.h>
#include <qradiobutton.h>
// static QButton::ToggleState OrderBoxState = QButton::Off;
@ -175,10 +175,10 @@ bool qf_box::semanticCheck (void) {
if (spec. r2 == 0) spec.r2 = spec.r1;
spec. dual = (DualBox -> state () == QButton::On);
spec. all_ind_equal = (EqualInductorBox -> state () == QButton::On);
spec. use_cross = (UseCrossBox -> state () == QButton::On);
spec. stop_is_pole = (CauerPoleBox -> state () == QButton::On);
spec. dual = (DualBox -> state () == QCheckBox::On);
spec. all_ind_equal = (EqualInductorBox -> state () == QCheckBox::On);
spec. use_cross = (UseCrossBox -> state () == QCheckBox::On);
spec. stop_is_pole = (CauerPoleBox -> state () == QCheckBox::On);
// Optimization subdialog
if ((spec. optc = OptimizeCauerBox -> isChecked ())) {
@ -254,7 +254,7 @@ void qf_box::updateDialog (void) {
// The capacity flags are the logical OR of general capacity flags
// and the flags corresponding to the current order (if selected)
if (OrderBox -> state () == QButton::Off ||
if (OrderBox -> state () == QCheckBox::Off ||
! (cflags & CAN_ORDER)) {
fflags |= fapi -> if_no_order;
tflags |= tapi -> if_no_order;
@ -306,7 +306,7 @@ void qf_box::updateDialog (void) {
}
if (cflags & CAN_ORDER_ONLY) {
if (OrderBox -> state () == QButton::Off)
if (OrderBox -> state () == QCheckBox::Off)
OrderBox -> setChecked (true);
OrderBox -> setEnabled (false);
}
@ -509,7 +509,7 @@ void qf_box::on_SubOrderCombo_activated (int type) {
void qf_box::on_OrderBox_stateChanged (int state) {
if ((state == QButton::On) && (cflags & CAN_ORDER)) {
if ((state == QCheckBox::On) && (cflags & CAN_ORDER)) {
OrderCombo -> setEnabled (true);
on_OrderCombo_activated (OrderCombo -> currentItem ());
}

View File

@ -1,3 +1,5 @@
//Added by qt3to4:
#include <Q3TextStream>
// Header for butterworth and chebychev I type filters
// These filters are the easiest to compute, since the values of the
// standard lowpass prototype are given by simple formulae. There is, thus,
@ -16,7 +18,7 @@ class qf_buttcheb: public qf_filter {
qf_buttcheb (qf_spec*);
virtual ~qf_buttcheb (void) {}
friend void btchdump (qf_filter*, QTextStream&);
friend void btchdump (qf_filter*, Q3TextStream&);
};
class qf_butt: public qf_buttcheb {
@ -44,7 +46,7 @@ class qf_cheb: public qf_buttcheb {
qf_filter* butt (qf_spec*);
qf_filter* cheb (qf_spec*);
void btchdump (qf_filter*, QTextStream&);
void btchdump (qf_filter*, Q3TextStream&);
bool chebvalid (qf_spec *);
# ifdef _QF_API

View File

@ -16,7 +16,7 @@
#include <iomanip>
#include <string>
#include <typeinfo>
#include <qtextstream.h>
#include <q3textstream.h>
using namespace std;

View File

@ -21,6 +21,8 @@
#include "qf_common.h"
#include "qf_comp.h"
//Added by qt3to4:
#include <Q3TextStream>
// DUMP functions and utilities
static QString valstr (qf_double_t num) {
@ -51,7 +53,7 @@ static QString valstr (qf_double_t num) {
}
QString buffer;
QTextStream str (& buffer, IO_WriteOnly);
Q3TextStream str (& buffer, QIODevice::WriteOnly);
str. precision (3);
@ -63,7 +65,7 @@ static QString valstr (qf_double_t num) {
}
void qf_cmp1::dump (unsigned n1, unsigned n2,
QTextStream& com, QTextStream& wir) {
Q3TextStream& com, Q3TextStream& wir) {
// type of component
if (name == "CAP")
@ -105,7 +107,7 @@ void qf_cmp1::dump (unsigned n1, unsigned n2,
}
void qf_cmplc::dump (unsigned n1, unsigned n2,
QTextStream& com, QTextStream& wir) {
Q3TextStream& com, Q3TextStream& wir) {
if (name == "PLC") {
// parallel L and C to ground
@ -236,14 +238,14 @@ void qf_cmplc::dump (unsigned n1, unsigned n2,
}
void qf_pslc::dump (unsigned n1, unsigned n2,
QTextStream& s, QTextStream& wir) {
Q3TextStream& s, Q3TextStream& wir) {
qf_slc (vC, vL, shnt, gnd). dump (n1, n2, s, wir);
qf_slc (vC2, vL2, shnt, gnd). dump (n1, n2, s, wir);
}
// Dumps the whole filter structure
int qf_lcmp::dump_node (int& p, list <qf_cmp*>::iterator& i,
QTextStream& com, QTextStream& wir) {
Q3TextStream& com, Q3TextStream& wir) {
int n = p + 1;
int g = 0;
@ -289,7 +291,7 @@ int qf_lcmp::dump_node (int& p, list <qf_cmp*>::iterator& i,
return -n;
}
void qf_lcmp::dump_all (QTextStream& out) {
void qf_lcmp::dump_all (Q3TextStream& out) {
if (lst.size () == 0) {
return;
@ -297,8 +299,8 @@ void qf_lcmp::dump_all (QTextStream& out) {
int node = 1;
QByteArray buf1, buf2;
QTextStream com (buf1, IO_ReadWrite);
QTextStream wir (buf2, IO_ReadWrite);
Q3TextStream com (buf1, QIODevice::ReadWrite);
Q3TextStream wir (buf2, QIODevice::ReadWrite);
x = 0;
y = 0;

View File

@ -3,7 +3,7 @@
#include <vector>
#include <list>
#include <qtextstream.h>
#include <q3textstream.h>
#include <qstring.h>
using namespace std;
@ -32,7 +32,7 @@ struct qf_cmp {
name (n), shnt(s), gnd (g) {}
virtual ~qf_cmp (void) {};
virtual void dump (unsigned, unsigned, QTextStream&, QTextStream&) = 0;
virtual void dump (unsigned, unsigned, Q3TextStream&, Q3TextStream&) = 0;
// Denormalization according to the transformations implemented
// By default, these do nothing
@ -72,8 +72,8 @@ class qf_lcmp {
bool isvoid (void) {return lst. size () == 0;}
int dump_node (int&, list <qf_cmp*>::iterator&,
QTextStream&, QTextStream&);
void dump_all (QTextStream&);
Q3TextStream&, Q3TextStream&);
void dump_all (Q3TextStream&);
qf_lcmp (void) {};
~qf_lcmp (void) {clear ();}
@ -91,7 +91,7 @@ struct qf_cmp1: public qf_cmp {
qf_cmp (n, s, g), val(v), unit (u) {}
virtual ~qf_cmp1 (void) {};
virtual void dump (unsigned, unsigned, QTextStream&, QTextStream&);
virtual void dump (unsigned, unsigned, Q3TextStream&, Q3TextStream&);
};
// A generic class of either serial or parallel LC
@ -106,7 +106,7 @@ struct qf_cmplc: public qf_cmp {
qf_cmp (n, s, g), vC(vc), vL(vl) {}
virtual ~qf_cmplc (void) {};
virtual void dump (unsigned, unsigned, QTextStream&, QTextStream&);
virtual void dump (unsigned, unsigned, Q3TextStream&, Q3TextStream&);
};
// Fake component to signal output
@ -115,7 +115,7 @@ struct qf_end: public qf_cmp {
qf_end (void): qf_cmp ("END", false, false) {}
inline ~qf_end (void) {}
void dump (unsigned, unsigned, QTextStream&, QTextStream&) {};
void dump (unsigned, unsigned, Q3TextStream&, Q3TextStream&) {};
};
// Inductor
@ -219,7 +219,7 @@ struct qf_pslc : public qf_cmplc {
vC2(vc2), vL2 (vl2) {}
inline ~qf_pslc(void) {};
void dump (unsigned, unsigned, QTextStream&, QTextStream&);
void dump (unsigned, unsigned, Q3TextStream&, Q3TextStream&);
};
# endif //_QF_COMP_H

View File

@ -19,7 +19,7 @@
# include <config.h>
#endif
#include <qpopupmenu.h>
#include <q3popupmenu.h>
#include <qmenubar.h>
#include <qlayout.h>
#include <qtabwidget.h>
@ -28,12 +28,15 @@
#include <qlabel.h>
#include <qcheckbox.h>
#include <qradiobutton.h>
#include <qvbuttongroup.h>
#include <q3buttongroup.h>
#include <qpushbutton.h>
#include <qhbox.h>
#include <q3hbox.h>
#include <qmessagebox.h>
#include "qf_dialog.h"
//Added by qt3to4:
#include <Q3GridLayout>
#include <Q3VBoxLayout>
FilterDialog::FilterDialog (QWidget * parent) : QDialog (parent)
{
@ -41,13 +44,13 @@ FilterDialog::FilterDialog (QWidget * parent) : QDialog (parent)
///setIcon (QPixmap(QucsSettings.BitmapDir + "big.qucs.xpm"));
setCaption("Qucs Filter " PACKAGE_VERSION);
all = new QVBoxLayout(this);
all = new Q3VBoxLayout(this);
// -------- create menubar -------------------
QPopupMenu *fileMenu = new QPopupMenu();
fileMenu->insertItem(tr("E&xit"), this, SLOT(slotQuit()), CTRL+Key_Q);
Q3PopupMenu *fileMenu = new Q3PopupMenu();
fileMenu->insertItem(tr("E&xit"), this, SLOT(slotQuit()), Qt::CTRL+Qt::Key_Q);
QPopupMenu *helpMenu = new QPopupMenu();
Q3PopupMenu *helpMenu = new Q3PopupMenu();
helpMenu->insertItem(
tr("&About Qucs Filter..."), this, SLOT(slotHelpAbout()), 0);
helpMenu->insertItem(tr("About Qt..."), this, SLOT(slotHelpAboutQt()), 0);
@ -66,7 +69,7 @@ FilterDialog::FilterDialog (QWidget * parent) : QDialog (parent)
// ...........................................................
QWidget *Tab1 = new QWidget(t);
QGridLayout *gp1 = new QGridLayout(Tab1,12,6,5,5);
Q3GridLayout *gp1 = new Q3GridLayout(Tab1,12,6,5,5);
FilterName = new QComboBox(FALSE, Tab1);
gp1->addWidget(FilterName,0,0);
@ -75,7 +78,7 @@ FilterDialog::FilterDialog (QWidget * parent) : QDialog (parent)
OrderBox = new QCheckBox(tr("Specify order"), Tab1);
gp1->addWidget(OrderBox,1,0);
QHBox *h1 = new QHBox(Tab1);
Q3HBox *h1 = new Q3HBox(Tab1);
h1->setSpacing (5);
OrderCombo = new QComboBox(FALSE, h1);
OrderCombo->setEnabled(TRUE);
@ -171,13 +174,13 @@ FilterDialog::FilterDialog (QWidget * parent) : QDialog (parent)
UseCrossBox->setEnabled(FALSE);
gp1->addMultiCellWidget(UseCrossBox,9,9,3,5);
Cboxes = new QVButtonGroup(tr("Optimize C"),Tab1);
Cboxes = new Q3VButtonGroup(tr("Optimize C"),Tab1);
Cmin = new QRadioButton(tr("Cmin"),Cboxes);
Cmax = new QRadioButton(tr("Cmax"),Cboxes);
NoC = new QRadioButton(tr("noC"),Cboxes);
gp1->addMultiCellWidget(Cboxes,11,11,0,2);
Lboxes = new QVButtonGroup(tr("Optimize L"),Tab1);
Lboxes = new Q3VButtonGroup(tr("Optimize L"),Tab1);
Lmin = new QRadioButton(tr("Lmin"),Lboxes);
Lmax = new QRadioButton(tr("Lmax"),Lboxes);
NoL = new QRadioButton(tr("noL"),Lboxes);
@ -198,7 +201,7 @@ FilterDialog::FilterDialog (QWidget * parent) : QDialog (parent)
// ...........................................................
// buttons on the bottom of the dialog (independent of the TabWidget)
QHBox *Butts = new QHBox(this);
Q3HBox *Butts = new Q3HBox(this);
Butts->setSpacing(3);
Butts->setMargin(3);
all->addWidget(Butts);

View File

@ -19,14 +19,17 @@
#define FILTERDIALOG_H
#include <qdialog.h>
//Added by qt3to4:
#include <Q3VBoxLayout>
#include <QLabel>
class QVBoxLayout;
class Q3VBoxLayout;
class QLineEdit;
class QComboBox;
class QLabel;
class QCheckBox;
class QRadioButton;
class QVButtonGroup;
class Q3VButtonGroup;
class QPushButton;
class QWidget;
@ -48,7 +51,7 @@ public:
QPushButton * okButton, * cancelButton;
QLineEdit * EnterCutoff, * EnterZin, * EnterZout, * EnterStopband,
* EnterAngle, * EnterBandwidth, * EnterAttenuation, * EnterRipple;
QVBoxLayout * all;
Q3VBoxLayout * all;
QComboBox * CutoffCombo, * StopbandCombo, * FilterName, * TformName,
* OrderCombo, * SubOrderCombo, * BandwidthCombo;
QLabel * CutoffLabel, * ZinLabel, * OhmLabel, * ZoutLabel, * OhmLabel_2,
@ -57,7 +60,7 @@ public:
QCheckBox * OrderBox, * DualBox, * CauerPoleBox, * OptimizeCauerBox,
* EqualInductorBox, * UseCrossBox;
QRadioButton * Cmax, * Cmin, * NoC, * Lmin, * NoL, * Lmax;
QVButtonGroup * Lboxes, * Cboxes;
Q3VButtonGroup * Lboxes, * Cboxes;
};
#endif

View File

@ -22,7 +22,7 @@
# define PACKAGE_VERSION "Qf test"
# endif
# include <qtextstream.h>
# include <q3textstream.h>
using namespace std;

View File

@ -3,10 +3,10 @@
#endif
#include <qbuffer.h>
#include <qtextstream.h>
#include <q3textstream.h>
#include <qobject.h>
#include <qapplication.h>
#include <qtextedit.h>
#include <q3textedit.h>
#include <qdir.h>
#include <qtextcodec.h>
#include <qclipboard.h>
@ -22,8 +22,10 @@
#include "qf_tform.h"
#include "qf_box.h"
#include "qf_settings.h"
//Added by qt3to4:
#include <QTranslator>
void compute_lumped (qf_spec* spec_p, QTextStream& out) {
void compute_lumped (qf_spec* spec_p, Q3TextStream& out) {
qf_tform* T = qf_tform_apis [spec_p -> tform] -> cons (spec_p);
@ -97,10 +99,10 @@ int main (int argc, char * argv []) {
spec_p = Filterbox. get_spec ();
QByteArray buf;
QTextStream s (buf, IO_ReadWrite);
Q3TextStream s (buf, QIODevice::ReadWrite);
compute_lumped (spec_p, s);
s. device () -> flush ();
#warning s. device () -> flush ();
QClipboard *cb = QApplication::clipboard();
cb->setText(buf);

View File

@ -21,6 +21,8 @@
#include "qf_box.h"
#include "qf_settings.h"
//Added by qt3to4:
#include <Q3TextStream>
struct tQucsSettings QucsSettings;
@ -31,10 +33,10 @@ bool loadSettings (void)
bool result = true;
QFile file(QDir::homeDirPath()+QDir::convertSeparators ("/.qucs/filterrc"));
if(!file.open(IO_ReadOnly))
if(!file.open(QIODevice::ReadOnly))
result = false; // settings file doesn't exist
else {
QTextStream stream(&file);
Q3TextStream stream(&file);
QString Line, Setting;
while(!stream.atEnd()) {
Line = stream.readLine();
@ -55,10 +57,10 @@ bool loadSettings (void)
}
file.setName(QDir::homeDirPath()+QDir::convertSeparators ("/.qucs/qucsrc"));
if(!file.open(IO_ReadOnly))
if(!file.open(QIODevice::ReadOnly))
result = true; // qucs settings not necessary
else {
QTextStream stream(&file);
Q3TextStream stream(&file);
QString Line, Setting;
while(!stream.atEnd()) {
Line = stream.readLine();
@ -84,14 +86,14 @@ bool saveSettings(qf_box *qucs)
QFile file(QDir::homeDirPath()+QDir::convertSeparators ("/.qucs/filterrc"));
if(!file.open(IO_WriteOnly)) {
if(!file.open(QIODevice::WriteOnly)) {
QMessageBox::warning(0, QObject::tr("Warning"),
QObject::tr("Cannot save settings !"));
return false;
}
QString Line;
QTextStream stream(&file);
Q3TextStream stream(&file);
stream << "Settings file, Qucs Filter " PACKAGE_VERSION "\n"
<< "FilterWindow=" << qucs->x() << ',' << qucs->y() << '\n';
@ -155,14 +157,14 @@ bool saveXmlSettings (qf_box * qucs)
rt.appendChild (gr);
QFile file (QDir::homeDirPath()+QDir::convertSeparators ("/.qucs/filterrc"));
if (!file.open (IO_WriteOnly)) {
if (!file.open (QIODevice::WriteOnly)) {
QMessageBox::warning (0,
QObject::tr("Warning"),
QObject::tr("Cannot save settings file !"));
return false;
}
QTextStream str (&file);
Q3TextStream str (&file);
str << doc.toString ();
file.close ();
return true;
@ -229,16 +231,17 @@ bool loadXmlSettings (void)
bool result = true;
QFile file (QDir::homeDirPath()+QDir::convertSeparators ("/.qucs/filterrc"));
if (!file.open(IO_ReadOnly))
if (!file.open(QIODevice::ReadOnly))
result = false; // settings file doesn't exist
else {
QDomDocument doc;
QString errmsg;
int line, col;
if (!doc.setContent(&file, true, &errmsg, &line, &col)) {
cerr << file.name () << ":" << line << ":" << col
<< ": " << errmsg << endl;
cerr << doc.toCString ();
cerr << (const char*)file.fileName().toUtf8() << ":" << line << ":" << col
<< ": " << (const char*)errmsg.toUtf8() << endl;
cerr << (const char*)doc.toString ().toUtf8();
file.close();
return false;
}

View File

@ -4,6 +4,8 @@
# include "qf_capacity.h"
# include "qf_filter.h"
# include "qf_tform.h"
//Added by qt3to4:
#include <Q3TextStream>
// Validation functions
@ -116,7 +118,7 @@ qf_bandstop::qf_bandstop (qf_spec* Tspec): qf_tform (Tspec) {
// Dump functions
void qf_nonetf::dump (QTextStream& out) {
void qf_nonetf::dump (Q3TextStream& out) {
lcmp.tx = qf_filter_apis [Tspec -> filter] -> name +
" of order " + QString::number(Tspec -> ord) + Tspec -> subord;
@ -126,7 +128,7 @@ void qf_nonetf::dump (QTextStream& out) {
lcmp.dump_all (out);
}
void qf_lowpass::dump (QTextStream& out) {
void qf_lowpass::dump (Q3TextStream& out) {
lcmp.tx = qf_filter_apis [Tspec -> filter] -> name + " low-pass filter" +
" of order " + QString::number(Tspec -> ord) + Tspec -> subord;
@ -136,7 +138,7 @@ void qf_lowpass::dump (QTextStream& out) {
lcmp.dump_all (out);
}
void qf_highpass::dump (QTextStream& out) {
void qf_highpass::dump (Q3TextStream& out) {
lcmp.tx = qf_filter_apis [Tspec -> filter] -> name + " high-pass filter" +
" of order " + QString::number(Tspec -> ord) + Tspec -> subord;
@ -146,7 +148,7 @@ void qf_highpass::dump (QTextStream& out) {
lcmp.dump_all (out);
}
void qf_bandpass::dump (QTextStream& out) {
void qf_bandpass::dump (Q3TextStream& out) {
lcmp.tx = qf_filter_apis [Tspec -> filter] -> name + " band-pass filter" +
" of order " + QString::number(Tspec -> ord) + Tspec -> subord;
@ -156,7 +158,7 @@ void qf_bandpass::dump (QTextStream& out) {
lcmp.dump_all (out);
}
void qf_bandstop::dump (QTextStream& out) {
void qf_bandstop::dump (Q3TextStream& out) {
lcmp.tx = qf_filter_apis [Tspec -> filter] -> name + " band-stop filter" +
" of order " + QString::number(Tspec -> ord) + Tspec -> subord;

View File

@ -1,3 +1,5 @@
//Added by qt3to4:
#include <Q3TextStream>
# ifndef _QF_TFORM_H
# define _QF_TFORM_H
// Headers for standard transformations
@ -25,7 +27,7 @@ class qf_tform {
qf_tform (qf_spec* Ts) : Tspec (Ts) {};
public:
virtual void dump (QTextStream&) = 0;
virtual void dump (Q3TextStream&) = 0;
};
// A common static function to dispatch denormalization
@ -58,7 +60,7 @@ class qf_lowpass : public qf_tform {
public:
// Dump
virtual void dump (QTextStream&);
virtual void dump (Q3TextStream&);
friend qf_tform* lowpass (qf_spec* Tspec) {return new qf_lowpass (Tspec);}
};
@ -76,7 +78,7 @@ class qf_nonetf : public qf_tform {
public:
void dump (QTextStream&);
void dump (Q3TextStream&);
friend qf_tform* nonetf (qf_spec* Tspec) {return new qf_nonetf (Tspec);}
};
@ -93,7 +95,7 @@ class qf_highpass : public qf_tform {
public:
// Dump
void dump (QTextStream&);
void dump (Q3TextStream&);
friend qf_tform* highpass (qf_spec* spec) {return new qf_highpass (spec);}
};
@ -113,7 +115,7 @@ class qf_bandpass : public qf_tform {
public:
// Dump
void dump (QTextStream&);
void dump (Q3TextStream&);
friend qf_tform* bandpass (qf_spec* spec) {return new qf_bandpass (spec);}
};
@ -138,7 +140,7 @@ class qf_bandstop: public qf_tform {
public:
// Dump
void dump (QTextStream&);
void dump (Q3TextStream&);
friend qf_tform* bandstop (qf_spec* spec) {return new qf_bandstop (spec);}
};

View File

@ -14,6 +14,8 @@
#include "qf_cauer.h"
#include "qf_tform.h"
#include "qf_zigzag.h"
//Added by qt3to4:
#include <Q3TextStream>
#undef _QF_ZIGZAG_DEBUG
@ -74,7 +76,7 @@ void qf_zigzag::synth_zz (qf_cauer* F) {
#ifdef _QF_ZIGZAG_DEBUG
QString * buf = new QString ();
QTextStream *CD = new QTextStream (* buf, IO_ReadWrite);
Q3TextStream *CD = new Q3TextStream (* buf, QIODevice::ReadWrite);
(F -> lcmp). dump_all (* CD);
std::cout << buf -> data ();
std::cout. flush ();
@ -342,7 +344,7 @@ void qf_zigzag::synth_zz (qf_cauer* F) {
Tspec -> r2 = Tspec -> r1 * pts2 * tp[m] * tp[m];
}
void qf_zigzag::dump (QTextStream& out) {
void qf_zigzag::dump (Q3TextStream& out) {
lcmp.tx = qf_filter_apis [Tspec -> filter] -> name + " zigzag filter" +
" of order " + QString::number(Tspec -> ord);

View File

@ -4,6 +4,8 @@
#define _QF_ZIGZAG_H
#include <vector>
//Added by qt3to4:
#include <Q3TextStream>
using namespace std;
class qf_zigzag: public qf_tform {
@ -30,12 +32,12 @@ class qf_zigzag: public qf_tform {
// Dump
void dump (QTextStream&);
void dump (Q3TextStream&);
friend qf_tform* zigzag (qf_spec* Tspec) {return new qf_zigzag (Tspec);}
};
qf_tform* zigzag (qf_spec*);
void zzdump (qf_tform*, QTextStream&);
void zzdump (qf_tform*, Q3TextStream&);
# ifdef _QF_API

View File

@ -22,9 +22,11 @@
#include "helpdialog.h"
#include <qlayout.h>
#include <qhbox.h>
#include <q3hbox.h>
#include <qpushbutton.h>
#include <qtextedit.h>
#include <q3textedit.h>
//Added by qt3to4:
#include <Q3VBoxLayout>
HelpDialog::HelpDialog(QWidget *parent)
@ -49,16 +51,16 @@ HelpDialog::HelpDialog(QWidget *parent)
// -------- create dialog widgets ------------
resize(250, 230);
vLayout = new QVBoxLayout(this);
vLayout = new Q3VBoxLayout(this);
Text = new QTextEdit(s, QString::null, this);
Text = new Q3TextEdit(s, QString::null, this);
Text->setTextFormat(Qt::PlainText);
Text->setReadOnly(true);
// Text->setWordWrap(QTextEdit::NoWrap);
Text->setMinimumSize(200,200);
vLayout->addWidget(Text);
QHBox *h = new QHBox(this);
Q3HBox *h = new Q3HBox(this);
vLayout->addWidget(h);
h->setStretchFactor(new QWidget(h),5); // stretchable placeholder

View File

@ -19,9 +19,11 @@
#define HELPDIALOG_H
#include <qdialog.h>
//Added by qt3to4:
#include <Q3VBoxLayout>
class QTextEdit;
class QVBoxLayout;
class Q3TextEdit;
class Q3VBoxLayout;
/**
*@author Michael Margraf
@ -37,8 +39,8 @@ private slots:
void slotClose();
private:
QVBoxLayout *vLayout;
QTextEdit *Text;
Q3VBoxLayout *vLayout;
Q3TextEdit *Text;
};
#endif

View File

@ -26,7 +26,7 @@
#include <qtextcodec.h>
#include <qtranslator.h>
#include <qfile.h>
#include <qtextstream.h>
#include <q3textstream.h>
#include <qmessagebox.h>
#include <qdir.h>
#include <qfont.h>
@ -42,10 +42,10 @@ bool loadSettings()
bool result = true;
QFile file(QDir::homeDirPath()+QDir::convertSeparators ("/.qucs/filterrc"));
if(!file.open(IO_ReadOnly))
if(!file.open(QIODevice::ReadOnly))
result = false; // settings file doesn't exist
else {
QTextStream stream(&file);
Q3TextStream stream(&file);
QString Line, Setting;
while(!stream.atEnd()) {
Line = stream.readLine();
@ -61,10 +61,10 @@ bool loadSettings()
}
file.setName(QDir::homeDirPath()+QDir::convertSeparators ("/.qucs/qucsrc"));
if(!file.open(IO_ReadOnly))
if(!file.open(QIODevice::ReadOnly))
result = true; // qucs settings not necessary
else {
QTextStream stream(&file);
Q3TextStream stream(&file);
QString Line, Setting;
while(!stream.atEnd()) {
Line = stream.readLine();
@ -90,14 +90,14 @@ bool saveApplSettings(QucsFilter *qucs)
QFile file(QDir::homeDirPath()+QDir::convertSeparators ("/.qucs/filterrc"));
if(!file.open(IO_WriteOnly)) {
if(!file.open(QIODevice::WriteOnly)) {
QMessageBox::warning(0, QObject::tr("Warning"),
QObject::tr("Cannot save settings !"));
return false;
}
QString Line;
QTextStream stream(&file);
Q3TextStream stream(&file);
stream << "Settings file, Qucs Filter " PACKAGE_VERSION "\n"
<< "FilterWindow=" << qucs->x() << ',' << qucs->y() << '\n';

View File

@ -24,7 +24,7 @@
#include <string>
#include <qmenubar.h>
#include <qpopupmenu.h>
#include <q3popupmenu.h>
#include <qmessagebox.h>
#include <qlayout.h>
#include <qlabel.h>
@ -35,6 +35,9 @@
#include <qtimer.h>
#include <qclipboard.h>
#include <qapplication.h>
//Added by qt3to4:
#include <Q3GridLayout>
#include <QPixmap>
#include "lc_filter.h"
#include "qf_poly.h"
@ -51,11 +54,11 @@ QucsFilter::QucsFilter()
// -------- create menubar -------------------
QPopupMenu *fileMenu = new QPopupMenu();
fileMenu->insertItem(tr("E&xit"), this, SLOT(slotQuit()), CTRL+Key_Q);
Q3PopupMenu *fileMenu = new Q3PopupMenu();
fileMenu->insertItem(tr("E&xit"), this, SLOT(slotQuit()), Qt::CTRL+Qt::Key_Q);
QPopupMenu *helpMenu = new QPopupMenu();
helpMenu->insertItem(tr("Help..."), this, SLOT(slotHelpIntro()), Key_F1);
Q3PopupMenu *helpMenu = new Q3PopupMenu();
helpMenu->insertItem(tr("Help..."), this, SLOT(slotHelpIntro()), Qt::Key_F1);
helpMenu->insertSeparator();
helpMenu->insertItem(
tr("&About QucsFilter..."), this, SLOT(slotHelpAbout()), 0);
@ -68,7 +71,7 @@ QucsFilter::QucsFilter()
// ------- create main windows widgets --------
gbox = new QGridLayout(this, 10,3,5,5);
gbox = new Q3GridLayout(this, 10,3,5,5);
QWidget *Space = new QWidget(this); // reserve space for menubar
Space->setFixedSize(5, bar->height());

View File

@ -19,8 +19,11 @@
#define QUCSFILTER_H
#include <qdialog.h>
//Added by qt3to4:
#include <Q3GridLayout>
#include <QLabel>
class QGridLayout;
class Q3GridLayout;
class QComboBox;
class QLineEdit;
class QLabel;
@ -61,7 +64,7 @@ private:
int ResultState;
QGridLayout *gbox;
Q3GridLayout *gbox;
QComboBox *ComboType, *ComboClass, *ComboCorner, *ComboStop, *ComboBandStop;
QLineEdit *EditOrder, *EditCorner, *EditStop, *EditRipple, *EditImpedance;
QLineEdit *EditAtten, *EditBandStop;

View File

@ -19,7 +19,10 @@
#include "htmldatafetcher.h"
#include <qmime.h>
#include <qdragobject.h>
#include <q3dragobject.h>
//Added by qt3to4:
#include <Q3TextStream>
#include <Q3MimeSourceFactory>
HtmlDataFetcher::HtmlDataFetcher()
{
@ -314,19 +317,19 @@ QStringList HtmlDataFetcher::fetchChapterTexts(const QString &indexFile)
QStringList retVal;
QFile file(indexFile);
if(!file.open(IO_ReadOnly))
if(!file.open(QIODevice::ReadOnly))
{
qWarning("HtmlDataFetcher::fetchChapterTexts() : Can't open file %s",indexFile.latin1());
return retVal;
}
const QMimeSource *source = QMimeSourceFactory::defaultFactory()->data(indexFile);
const QMimeSource *source = Q3MimeSourceFactory::defaultFactory()->data(indexFile);
Q_ASSERT(source);
QString sourceText;
bool status = QTextDrag::decode(source,sourceText);
bool status = Q3TextDrag::decode(source,sourceText);
Q_ASSERT(status);
QTextStream str(&sourceText,IO_ReadOnly);
Q3TextStream str(&sourceText,QIODevice::ReadOnly);
QString txt;
bool inText = false;//spans multiple lines
while ( !str.atEnd() )
@ -382,12 +385,12 @@ QStringList HtmlDataFetcher::fetchLinksToFiles(const QString &indexFile)
QStringList retVal;
retVal << QString("index.html");
QFile file(indexFile);
if(!file.open(IO_ReadOnly))
if(!file.open(QIODevice::ReadOnly))
{
qWarning("HtmlDataFetcher::fetchLinksToFiles() : File open error");
return QStringList();
}
QTextStream str(&file);
Q3TextStream str(&file);
QString line,link;
int index = -1;
int end = -1;

View File

@ -26,7 +26,7 @@
#include <qtextcodec.h>
#include <qtranslator.h>
#include <qfile.h>
#include <qtextstream.h>
#include <q3textstream.h>
#include <qmessagebox.h>
#include <qdir.h>
#include <qfont.h>
@ -44,10 +44,10 @@ bool loadSettings()
bool result = true;
QFile file(QDir::homeDirPath()+QDir::convertSeparators ("/.qucs/helprc"));
if(!file.open(IO_ReadOnly))
if(!file.open(QIODevice::ReadOnly))
result = false; // settings file doesn't exist
else {
QTextStream stream(&file);
Q3TextStream stream(&file);
QString Line, Setting;
while(!stream.atEnd()) {
Line = stream.readLine();
@ -64,10 +64,10 @@ bool loadSettings()
}
file.setName(QDir::homeDirPath()+QDir::convertSeparators ("/.qucs/qucsrc"));
if(!file.open(IO_ReadOnly))
if(!file.open(QIODevice::ReadOnly))
result = true; // qucs settings not necessary
else {
QTextStream stream(&file);
Q3TextStream stream(&file);
QString Line, Setting;
while(!stream.atEnd()) {
Line = stream.readLine();
@ -95,14 +95,14 @@ bool saveApplSettings(QucsHelp *qucs)
QFile file(QDir::homeDirPath()+QDir::convertSeparators ("/.qucs/helprc"));
if(!file.open(IO_WriteOnly)) {
if(!file.open(QIODevice::WriteOnly)) {
QMessageBox::warning(0, QObject::tr("Warning"),
QObject::tr("Cannot save settings !"));
return false;
}
QString Line;
QTextStream stream(&file);
Q3TextStream stream(&file);
stream << "Settings file, Qucs Help System " PACKAGE_VERSION "\n"
<< "HelpWindow=" << qucs->x() << ',' << qucs->y() << ','

View File

@ -26,11 +26,11 @@
#include <qaction.h>
#include <qpixmap.h>
#include <qfile.h>
#include <qtextstream.h>
#include <qpopupmenu.h>
#include <q3textstream.h>
#include <q3popupmenu.h>
#include <qmenubar.h>
#include <qapplication.h>
#include <qlistview.h>
#include <q3listview.h>
@ -61,25 +61,25 @@ QucsHelp::~QucsHelp()
void QucsHelp::setupActions()
{
QToolBar *toolbar = new QToolBar(this,"main_toolbar");
Q3ToolBar *toolbar = new Q3ToolBar(this,"main_toolbar");
QMenuBar *bar = menuBar();
statusBar();
const QKeySequence ks = QKeySequence();
QAction *quitAction = new QAction(QIconSet(QPixmap(QucsSettings.BitmapDir + "quit.png")),
tr("&Quit"), CTRL+Key_Q, this);
QAction *backAction = new QAction(QIconSet(QPixmap(QucsSettings.BitmapDir + "back.png")),
tr("&Back"), ALT+Key_Left, this);
QAction *forwardAction = new QAction(QIconSet(QPixmap(QucsSettings.BitmapDir + "forward.png")),
tr("&Forward"), ALT+Key_Right, this);
QAction *homeAction = new QAction(QIconSet(QPixmap(QucsSettings.BitmapDir + "home.png")),
tr("&Home"),CTRL+Key_H,this);
previousAction = new QAction(QIconSet(QPixmap(QucsSettings.BitmapDir + "previous.png")),tr("&Previous"),
ks, this);
nextAction = new QAction(QIconSet(QPixmap(QucsSettings.BitmapDir + "next.png")),
tr("&Next"), ks, this);
viewBrowseDock = new QAction(tr("&Table of Contents"), 0, this);
QAction *quitAction = new QAction(QIcon((QucsSettings.BitmapDir + "quit.png")),
tr("&Quit"), (const QKeySequence&)Qt::CTRL+Qt::Key_Q, this,"");
QAction *backAction = new QAction(QIcon((QucsSettings.BitmapDir + "back.png")),
tr("&Back"), Qt::ALT+Qt::Key_Left, this,"");
QAction *forwardAction = new QAction(QIcon((QucsSettings.BitmapDir + "forward.png")),
tr("&Forward"), Qt::ALT+Qt::Key_Right, this,"");
QAction *homeAction = new QAction(QIcon((QucsSettings.BitmapDir + "home.png")),
tr("&Home"),Qt::CTRL+Qt::Key_H,this,"");
previousAction = new QAction(QIcon((QucsSettings.BitmapDir + "previous.png")),tr("&Previous"),
ks, this,"");
nextAction = new QAction(QIcon((QucsSettings.BitmapDir + "next.png")),
tr("&Next"), ks, this,"");
viewBrowseDock = new QAction(tr("&Table of Contents"), 0, this,"");
viewBrowseDock->setToggleAction(true);
viewBrowseDock->setOn(true);
viewBrowseDock->setStatusTip(tr("Enables/disables the table of contents"));
@ -109,10 +109,10 @@ void QucsHelp::setupActions()
toolbar->addSeparator();
quitAction->addTo(toolbar);
QPopupMenu *fileMenu = new QPopupMenu(this);
Q3PopupMenu *fileMenu = new Q3PopupMenu(this);
quitAction->addTo(fileMenu);
QPopupMenu *viewMenu = new QPopupMenu(this);
Q3PopupMenu *viewMenu = new Q3PopupMenu(this);
backAction->addTo(viewMenu);
forwardAction->addTo(viewMenu);
homeAction->addTo(viewMenu);
@ -121,7 +121,7 @@ void QucsHelp::setupActions()
viewMenu->insertSeparator();
viewBrowseDock->addTo(viewMenu);
QPopupMenu *helpMenu = new QPopupMenu(this);
Q3PopupMenu *helpMenu = new Q3PopupMenu(this);
helpMenu->insertItem(tr("&About Qt"),qApp,SLOT(aboutQt()));
bar->insertItem(tr("&File"), fileMenu );
@ -134,26 +134,26 @@ void QucsHelp::setupActions()
void QucsHelp::createSidebar()
{
dock = new QDockWindow(QDockWindow::InDock,this);
dock = new Q3DockWindow(Q3DockWindow::InDock,this);
dock->setResizeEnabled(true);
dock->setCloseMode(QDockWindow::Always);
dock->setCloseMode(Q3DockWindow::Always);
connect(dock,SIGNAL(visibilityChanged(bool)),this,SLOT(slotToggleSidebarAction(bool)));
chaptersView = new QListView(dock,"chapters_view");
chaptersView = new Q3ListView(dock,"chapters_view");
chaptersView->setRootIsDecorated(false);
chaptersView->addColumn(tr("Contents"));
chaptersView->setSorting(-1);
chaptersView->setSelectionMode(QListView::Single);
chaptersView->setSelectionMode(Q3ListView::Single);
dock->setWidget(chaptersView);
moveDockWindow(dock,QDockWindow::Left);
moveDockWindow(dock,Qt::Left);
QStringList l = dataFetcher->fetchChapterTexts(QucsHelpDir.filePath("index.html"));
for(int i=l.count()-1;i>=0;i--)
chaptersView->insertItem(new QListViewItem(chaptersView,l[i],QString::number(i+1)));
chaptersView->insertItem(new Q3ListViewItem(chaptersView,l[i],QString::number(i+1)));
QListViewItem *curItem = new QListViewItem(chaptersView,tr("Home"),QString::number(0));
Q3ListViewItem *curItem = new Q3ListViewItem(chaptersView,tr("Home"),QString::number(0));
chaptersView->insertItem(curItem);
chaptersView->setSelected(curItem,true);
@ -194,7 +194,7 @@ void QucsHelp::slotSourceChanged(const QString& _str)
temp = chaptersView->selectedItem()->text(1);
if(temp.toUInt() != i)
{
QListViewItem *item = chaptersView->findItem(QString::number(i),1);
Q3ListViewItem *item = chaptersView->findItem(QString::number(i),1);
if(item != 0l)
{
chaptersView->blockSignals(true);

View File

@ -18,8 +18,8 @@
#ifndef QUCSHELP_H
#define QUCSHELP_H
#include <qmainwindow.h>
#include <qtextbrowser.h>
#include <q3mainwindow.h>
#include <q3textbrowser.h>
#include <qdir.h>
#include <qfont.h>
#include <qstringlist.h>
@ -36,27 +36,27 @@ struct tQucsSettings {
extern tQucsSettings QucsSettings;
extern QDir QucsHelpDir;
class QAction;
class QListViewItem;
class QListView;
class Q3ListViewItem;
class Q3ListView;
class HtmlDataFetcher;
class QDockWindow;
class Q3DockWindow;
class TextBrowser : public QTextBrowser
class TextBrowser : public Q3TextBrowser
{
Q_OBJECT
public:
TextBrowser(QWidget *parent = 0) : QTextBrowser(parent)
TextBrowser(QWidget *parent = 0) : Q3TextBrowser(parent)
{}
public slots:
void setSource(const QString& name)
{
// Dont do anything if the clicked link is web url
if(!name.startsWith("http://"))
QTextBrowser::setSource(name);
Q3TextBrowser::setSource(name);
}
};
class QucsHelp : public QMainWindow {
class QucsHelp : public Q3MainWindow {
Q_OBJECT
public:
QucsHelp(const QString& page);
@ -80,8 +80,8 @@ class QucsHelp : public QMainWindow {
QAction *previousAction;
QAction *nextAction;
QAction *viewBrowseDock;
QListView *chaptersView;
QDockWindow *dock;
Q3ListView *chaptersView;
Q3DockWindow *dock;
HtmlDataFetcher *dataFetcher;
QString currentSource;
QString cachedSelectedText;

View File

@ -22,49 +22,51 @@
#include "displaydialog.h"
#include <qlayout.h>
#include <qhbox.h>
#include <q3hbox.h>
#include <qpushbutton.h>
#include <qtextedit.h>
#include <qvgroupbox.h>
#include <q3textedit.h>
#include <q3vgroupbox.h>
//Added by qt3to4:
#include <Q3VBoxLayout>
DisplayDialog::DisplayDialog(QWidget *parent, bool helper)
: QDialog(parent, 0, false, Qt::WDestructiveClose)
{
vLayout = new QVBoxLayout(this);
vLayout = new Q3VBoxLayout(this);
vLayout->setMargin(3);
if(helper) {
Text = new QTextEdit(this);
Text = new Q3TextEdit(this);
Text->setTextFormat(Qt::PlainText);
Text->setReadOnly(true);
Text->setMinimumSize(200, 100);
vLayout->addWidget(Text);
}
else {
QVGroupBox *Analog = new QVGroupBox (tr("Analogue"), this);
Text = new QTextEdit(Analog);
Q3VGroupBox *Analog = new Q3VGroupBox (tr("Analogue"), this);
Text = new Q3TextEdit(Analog);
Text->setTextFormat(Qt::PlainText);
Text->setReadOnly(true);
Text->setMinimumSize(200, 80);
vLayout->addWidget(Analog);
QVGroupBox *VHDL = new QVGroupBox (tr("VHDL"), this);
VHDLText = new QTextEdit(VHDL);
Q3VGroupBox *VHDL = new Q3VGroupBox (tr("VHDL"), this);
VHDLText = new Q3TextEdit(VHDL);
VHDLText->setTextFormat(Qt::PlainText);
VHDLText->setReadOnly(true);
VHDLText->setMinimumSize(200, 80);
vLayout->addWidget(VHDL);
QVGroupBox *Verilog = new QVGroupBox (tr("Verilog"), this);
VerilogText = new QTextEdit(Verilog);
Q3VGroupBox *Verilog = new Q3VGroupBox (tr("Verilog"), this);
VerilogText = new Q3TextEdit(Verilog);
VerilogText->setTextFormat(Qt::PlainText);
VerilogText->setReadOnly(true);
VerilogText->setMinimumSize(200, 80);
vLayout->addWidget(Verilog);
}
QHBox *h = new QHBox(this);
Q3HBox *h = new Q3HBox(this);
vLayout->addWidget(h);
h->setStretchFactor(new QWidget(h),5); // stretchable placeholder

View File

@ -19,9 +19,11 @@
#define DISPLAYDIALOG_H
#include <qdialog.h>
//Added by qt3to4:
#include <Q3VBoxLayout>
class QTextEdit;
class QVBoxLayout;
class Q3TextEdit;
class Q3VBoxLayout;
class DisplayDialog : public QDialog {
@ -30,13 +32,13 @@ public:
DisplayDialog(QWidget *parent = 0, bool helper = true);
~DisplayDialog();
QTextEdit *Text, *VHDLText, *VerilogText;
Q3TextEdit *Text, *VHDLText, *VerilogText;
private slots:
void slotClose();
private:
QVBoxLayout *vLayout;
Q3VBoxLayout *vLayout;
};
#endif

View File

@ -22,8 +22,8 @@
#include "librarydialog.h"
#include "qucslib.h"
#include <qhbox.h>
#include <qvbox.h>
#include <q3hbox.h>
#include <q3vbox.h>
#include <qfile.h>
#include <qlabel.h>
#include <qlayout.h>
@ -31,9 +31,12 @@
#include <qvalidator.h>
#include <qmessagebox.h>
#include <qpushbutton.h>
#include <qscrollview.h>
#include <q3scrollview.h>
#include <qradiobutton.h>
#include <qvbuttongroup.h>
#include <q3buttongroup.h>
#include <q3button.h>
//Added by qt3to4:
#include <Q3VBoxLayout>
LibraryDialog::LibraryDialog(QWidget *App_)
@ -45,26 +48,26 @@ LibraryDialog::LibraryDialog(QWidget *App_)
Validator = new QRegExpValidator(Expr, this);
// ...........................................................
QVBoxLayout *all = new QVBoxLayout(this);
Q3VBoxLayout *all = new Q3VBoxLayout(this);
all->setMargin(5);
all->setSpacing(6);
Group = new QVButtonGroup(tr("Choose library:"), this);
Group = new Q3VButtonGroup(tr("Choose library:"), this);
all->addWidget(Group);
QScrollView *Dia_Scroll = new QScrollView(Group);
Q3ScrollView *Dia_Scroll = new Q3ScrollView(Group);
Dia_Scroll->setMargin(5);
Dia_Box = new QVBox(Dia_Scroll->viewport());
Dia_Box = new Q3VBox(Dia_Scroll->viewport());
Dia_Scroll->addChild(Dia_Box);
QHBox *h1 = new QHBox(this);
Q3HBox *h1 = new Q3HBox(this);
all->addWidget(h1);
theLabel = new QLabel(tr("New Name:"), h1);
NameEdit = new QLineEdit(h1);
NameEdit->setValidator(Validator);
// ...........................................................
QHBox *h2 = new QHBox(this);
Q3HBox *h2 = new Q3HBox(this);
all->addWidget(h2);
ButtDelete = new QPushButton(tr("Delete"), h2);
connect(ButtDelete, SIGNAL(clicked()), SLOT(slotDelete()));
@ -78,7 +81,7 @@ LibraryDialog::LibraryDialog(QWidget *App_)
// insert all user libraries
QStringList LibFiles = UserLibDir.entryList("*.lib", QDir::Files, QDir::Name);
toggleGroup = new QVButtonGroup(); // only to handle exclusive toggling
toggleGroup = new Q3VButtonGroup(); // only to handle exclusive toggling
previousLib = 0;
QStringList::iterator it;
@ -87,7 +90,7 @@ LibraryDialog::LibraryDialog(QWidget *App_)
toggleGroup->insert(new QRadioButton((*it).left((*it).length()-4), Dia_Box));
QColor theColor;
QButton *rButton = toggleGroup->find(0);
QAbstractButton *rButton = toggleGroup->find(0);
if(rButton)
theColor = rButton->paletteBackgroundColor();
else {
@ -142,7 +145,7 @@ void LibraryDialog::slotRename()
}
QFile LibFile(oldName + ".lib");
if(!LibFile.open(IO_ReadOnly)) {
if(!LibFile.open(QIODevice::ReadOnly)) {
QMessageBox::critical(this, tr("Error"), tr("Cannot open library!"));
return;
}
@ -162,7 +165,7 @@ void LibraryDialog::slotRename()
p = strstr(Name, "\">");
if(p == 0) break;
if(!NewLibFile.open(IO_WriteOnly)) {
if(!NewLibFile.open(QIODevice::WriteOnly)) {
QMessageBox::critical(this, tr("Error"), tr("No permission to modify library!"));
return;
}

View File

@ -21,14 +21,17 @@
#include <qdialog.h>
#include <qregexp.h>
#include <qstringlist.h>
//Added by qt3to4:
#include <QLabel>
#include <Q3VBoxLayout>
class QVBox;
class Q3VBox;
class QLabel;
class QLineEdit;
class QPushButton;
class QVBoxLayout;
class Q3VBoxLayout;
class QRadioButton;
class QVButtonGroup;
class Q3VButtonGroup;
class QRegExpValidator;
@ -45,11 +48,11 @@ private slots:
private:
QRadioButton *previousLib;
QVBoxLayout *all; // the mother of all widgets
QVBox *Dia_Box;
Q3VBoxLayout *all; // the mother of all widgets
Q3VBox *Dia_Box;
QLabel *theLabel;
QLineEdit *NameEdit;
QVButtonGroup *Group, *toggleGroup;
Q3VButtonGroup *Group, *toggleGroup;
QPushButton *ButtDelete, *ButtRename, *ButtClose;
QRegExp Expr;

View File

@ -26,7 +26,7 @@
#include <qtextcodec.h>
#include <qtranslator.h>
#include <qfile.h>
#include <qtextstream.h>
#include <q3textstream.h>
#include <qmessagebox.h>
#include <qdir.h>
#include <qfont.h>
@ -42,10 +42,10 @@ bool loadSettings()
bool result = true;
QFile file(QDir::homeDirPath()+QDir::convertSeparators ("/.qucs/librc"));
if(!file.open(IO_ReadOnly))
if(!file.open(QIODevice::ReadOnly))
result = false; // settings file doesn't exist
else {
QTextStream stream(&file);
Q3TextStream stream(&file);
QString Line, Setting;
while(!stream.atEnd()) {
Line = stream.readLine();
@ -62,10 +62,10 @@ bool loadSettings()
}
file.setName(QDir::homeDirPath()+QDir::convertSeparators ("/.qucs/qucsrc"));
if(!file.open(IO_ReadOnly))
if(!file.open(QIODevice::ReadOnly))
result = true; // qucs settings not necessary
else {
QTextStream stream(&file);
Q3TextStream stream(&file);
QString Line, Setting;
while(!stream.atEnd()) {
Line = stream.readLine();
@ -85,14 +85,14 @@ bool loadSettings()
bool saveApplSettings(QucsLib *qucs)
{
QFile file(QDir::homeDirPath()+QDir::convertSeparators ("/.qucs/librc"));
if(!file.open(IO_WriteOnly)) {
if(!file.open(QIODevice::WriteOnly)) {
QMessageBox::warning(0, QObject::tr("Warning"),
QObject::tr("Cannot save settings !"));
return false;
}
QString Line;
QTextStream stream(&file);
Q3TextStream stream(&file);
stream << "Settings file, QucsLib " PACKAGE_VERSION "\n"
<< "Position=" << qucs->x() << "," << qucs->y() << "\n"

View File

@ -1,4 +1,4 @@
/***************************************************************************
/**************************************************************************
qucslib.cpp
-------------
begin : Sat May 28 2005
@ -21,20 +21,25 @@
#include <qmenubar.h>
#include <qaction.h>
#include <qpopupmenu.h>
#include <q3popupmenu.h>
#include <qcombobox.h>
#include <qclipboard.h>
#include <qapplication.h>
#include <qlayout.h>
#include <qhbox.h>
#include <qvgroupbox.h>
#include <q3hbox.h>
#include <q3vgroupbox.h>
#include <qpushbutton.h>
#include <qmessagebox.h>
#include <qtextedit.h>
#include <qlistbox.h>
#include <q3textedit.h>
#include <q3listbox.h>
#include <qregexp.h>
#include "qucslib.h"
//Added by qt3to4:
#include <Q3TextStream>
#include <QCloseEvent>
#include <QPixmap>
#include <Q3VBoxLayout>
#include "librarydialog.h"
#include "displaydialog.h"
#include "symbolwidget.h"
@ -51,27 +56,27 @@ QucsLib::QucsLib()
QMenuBar * menuBar = new QMenuBar (this);
// create file menu
QPopupMenu * fileMenu = new QPopupMenu ();
Q3PopupMenu * fileMenu = new Q3PopupMenu ();
QAction * manageLib =
new QAction ("Manage User Libraries...", tr("Manage User &Libraries..."), CTRL+Key_M, this);
new QAction (tr("Manage User &Libraries..."), Qt::CTRL+Qt::Key_M, this,"");
manageLib->addTo (fileMenu);
connect(manageLib, SIGNAL(activated()), SLOT(slotManageLib()));
fileMenu->insertSeparator();
QAction * fileQuit =
new QAction ("Quit", tr("&Quit"), CTRL+Key_Q, this);
new QAction (tr("&Quit"), Qt::CTRL+Qt::Key_Q, this,"");
fileQuit->addTo (fileMenu);
connect(fileQuit, SIGNAL(activated()), SLOT(slotQuit()));
// create help menu
QPopupMenu * helpMenu = new QPopupMenu ();
Q3PopupMenu * helpMenu = new Q3PopupMenu ();
QAction * helpHelp =
new QAction (tr("Help"), tr("&Help"), Key_F1, this);
new QAction (tr("&Help"), Qt::Key_F1, this,"");
helpHelp->addTo (helpMenu);
connect(helpHelp, SIGNAL(activated()), SLOT(slotHelp()));
QAction * helpAbout =
new QAction (tr("About"), tr("About"), 0, helpMenu);
new QAction (tr("About"), 0, helpMenu,"");
helpAbout->addTo (helpMenu);
connect(helpAbout, SIGNAL(activated()), SLOT(slotAbout()));
@ -81,7 +86,7 @@ QucsLib::QucsLib()
menuBar->insertItem (tr("&Help"), helpMenu);
// main box
QVBoxLayout * all = new QVBoxLayout (this);
Q3VBoxLayout * all = new Q3VBoxLayout (this);
all->setSpacing (0);
all->setMargin (0);
@ -91,35 +96,35 @@ QucsLib::QucsLib()
all->addWidget (Space);
// main layout
QHBox * h = new QHBox (this);
Q3HBox * h = new Q3HBox (this);
h->setSpacing (5);
h->setMargin (3);
all->addWidget (h);
// library and component choice
QVGroupBox * LibGroup = new QVGroupBox (tr("Component Selection"), h);
Q3VGroupBox * LibGroup = new Q3VGroupBox (tr("Component Selection"), h);
Library = new QComboBox (LibGroup);
connect(Library, SIGNAL(activated(int)), SLOT(slotSelectLibrary(int)));
CompList = new QListBox(LibGroup);
connect(CompList, SIGNAL(highlighted(QListBoxItem*)),
SLOT(slotShowComponent(QListBoxItem*)));
CompList = new Q3ListBox(LibGroup);
connect(CompList, SIGNAL(highlighted(Q3ListBoxItem*)),
SLOT(slotShowComponent(Q3ListBoxItem*)));
QHBox * h1 = new QHBox (LibGroup);
Q3HBox * h1 = new Q3HBox (LibGroup);
QPushButton * SearchButton = new QPushButton (tr("Search..."), h1);
connect(SearchButton, SIGNAL(clicked()), SLOT(slotSearchComponent()));
h1->setStretchFactor(new QWidget(h1), 5); // stretchable placeholder
// component display
QVGroupBox *CompGroup = new QVGroupBox (tr("Component"), h);
CompDescr = new QTextEdit(CompGroup);
Q3VGroupBox *CompGroup = new Q3VGroupBox (tr("Component"), h);
CompDescr = new Q3TextEdit(CompGroup);
CompDescr->setTextFormat(Qt::PlainText);
CompDescr->setReadOnly(true);
CompDescr->setWordWrap(QTextEdit::NoWrap);
CompDescr->setWordWrap(Q3TextEdit::NoWrap);
Symbol = new SymbolWidget (CompGroup);
QHBox * h2 = new QHBox (CompGroup);
Q3HBox * h2 = new Q3HBox (CompGroup);
QPushButton * CopyButton = new QPushButton (tr("Copy to clipboard"), h2);
connect(CopyButton, SIGNAL(clicked()), SLOT(slotCopyToClipBoard()));
QPushButton * ShowButton = new QPushButton (tr("Show Model"), h2);
@ -244,11 +249,11 @@ void QucsLib::slotShowModel()
d->setCaption(tr("Model"));
d->resize(500, 150);
d->Text->setText(Symbol->ModelString);
d->Text->setWordWrap(QTextEdit::NoWrap);
d->Text->setWordWrap(Q3TextEdit::NoWrap);
d->VHDLText->setText(Symbol->VHDLModelString);
d->VHDLText->setWordWrap(QTextEdit::NoWrap);
d->VHDLText->setWordWrap(Q3TextEdit::NoWrap);
d->VerilogText->setText(Symbol->VerilogModelString);
d->VerilogText->setWordWrap(QTextEdit::NoWrap);
d->VerilogText->setWordWrap(Q3TextEdit::NoWrap);
d->show();
}
@ -273,14 +278,14 @@ void QucsLib::slotSelectLibrary(int Index)
else
file.setName(QucsSettings.LibDir + Library->text(Index) + ".lib");
if(!file.open(IO_ReadOnly)) {
if(!file.open(QIODevice::ReadOnly)) {
QMessageBox::critical(this, tr("Error"),
tr("Cannot open \"%1\".").arg(
QucsSettings.LibDir + Library->text(Index) + ".lib"));
return;
}
QTextStream ReadWhole(&file);
Q3TextStream ReadWhole(&file);
QString LibraryString = ReadWhole.read();
file.close();
@ -338,12 +343,12 @@ void QucsLib::slotSearchComponent()
}
// ----------------------------------------------------
void QucsLib::slotShowComponent(QListBoxItem *Item)
void QucsLib::slotShowComponent(Q3ListBoxItem *Item)
{
if(!Item) return;
QStringList::Iterator CompString = LibraryComps.at(CompList->index(Item));
QString LibName = (*CompString).section('\n', 0, 0);
QString CompString = LibraryComps.at(CompList->index(Item));
QString LibName = (CompString).section('\n', 0, 0);
CompDescr->setText("Name: " + Item->text());
CompDescr->append("Library: " + LibName);
CompDescr->append("----------------------------");
@ -352,25 +357,25 @@ void QucsLib::slotShowComponent(QListBoxItem *Item)
LibName = UserLibDir.absPath() + QDir::separator() + LibName;
QString content;
if(!getSection("Description", *CompString, content))
if(!getSection("Description", CompString, content))
return;
CompDescr->append(content);
if(!getSection("Model", *CompString, content))
if(!getSection("Model", CompString, content))
return;
Symbol->ModelString = content;
if(Symbol->ModelString.contains('\n') < 2)
if(Symbol->ModelString.count('\n') < 2)
Symbol->createSymbol(LibName, Item->text());
if(!getSection("VHDLModel", *CompString, content))
if(!getSection("VHDLModel", CompString, content))
return;
Symbol->VHDLModelString = content;
if(!getSection("VerilogModel", *CompString, content))
if(!getSection("VerilogModel", CompString, content))
return;
Symbol->VerilogModelString = content;
if(!getSection("Symbol", *CompString, content))
if(!getSection("Symbol", CompString, content))
return;
if(!content.isEmpty())
Symbol->setSymbol(content, LibName, Item->text());

View File

@ -23,14 +23,17 @@
#include <qfont.h>
#include <qstring.h>
#include <qstringlist.h>
//Added by qt3to4:
#include <Q3VBoxLayout>
#include <QCloseEvent>
class SymbolWidget;
class QTextEdit;
class Q3TextEdit;
class QComboBox;
class QListBox;
class QVGroupBox;
class QVBoxLayout;
class QListBoxItem;
class Q3ListBox;
class Q3VGroupBox;
class Q3VBoxLayout;
class Q3ListBoxItem;
// Application settings.
@ -52,7 +55,7 @@ public:
QucsLib();
~QucsLib();
QListBox *CompList;
Q3ListBox *CompList;
QStringList LibraryComps;
QComboBox *Library;
QString DefaultSymbol;
@ -65,7 +68,7 @@ private slots:
void slotShowModel();
void slotSelectLibrary(int);
void slotSearchComponent();
void slotShowComponent(QListBoxItem*);
void slotShowComponent(Q3ListBoxItem*);
void slotManageLib();
private:
@ -75,8 +78,8 @@ private:
int UserLibCount;
SymbolWidget *Symbol;
QTextEdit *CompDescr;
QVBoxLayout *all;
Q3TextEdit *CompDescr;
Q3VBoxLayout *all;
QDir QucsHomeDir; // Qucs user directory where all projects are located
};

View File

@ -23,14 +23,17 @@
#include "qucslib.h"
#include <qlayout.h>
#include <qhbox.h>
#include <q3hbox.h>
#include <qpushbutton.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qdir.h>
#include <qfile.h>
#include <qlistbox.h>
#include <q3listbox.h>
#include <qcombobox.h>
//Added by qt3to4:
#include <Q3TextStream>
#include <Q3VBoxLayout>
SearchDialog::SearchDialog(QucsLib *parent)
@ -38,7 +41,7 @@ SearchDialog::SearchDialog(QucsLib *parent)
{
ParentDialog = parent;
all = new QVBoxLayout(this);
all = new Q3VBoxLayout(this);
all->setMargin(5);
all->setSpacing(5);
@ -47,14 +50,14 @@ SearchDialog::SearchDialog(QucsLib *parent)
"name contains the search string. All libraries\n"
"are included in the search."), this) );
QHBox *h1 = new QHBox(this);
Q3HBox *h1 = new Q3HBox(this);
all->addWidget(h1);
new QLabel(tr("Search string:"), h1);
SearchEdit = new QLineEdit(h1);
connect(SearchEdit, SIGNAL(returnPressed()), SLOT(slotSearch()));
QHBox *h2 = new QHBox(this);
Q3HBox *h2 = new Q3HBox(this);
all->addWidget(h2);
h2->setStretchFactor(new QWidget(h2), 5); // stretchable placeholder
@ -92,13 +95,13 @@ void SearchDialog::slotSearch()
QStringList LibFiles = LibDir.entryList("*.lib", QDir::Files, QDir::Name);
QFile File;
QTextStream ReadWhole;
Q3TextStream ReadWhole;
QString LibraryString, LibName, CompName;
QStringList::iterator it;
int Start, End, NameStart, NameEnd;
for(it = LibFiles.begin(); it != LibFiles.end(); it++) { // all library files
File.setName(QucsSettings.LibDir + (*it));
if(!File.open(IO_ReadOnly)) continue;
if(!File.open(QIODevice::ReadOnly)) continue;
ReadWhole.setDevice(&File);
LibraryString = ReadWhole.read();

View File

@ -19,8 +19,10 @@
#define SEARCHDIALOG_H
#include <qdialog.h>
//Added by qt3to4:
#include <Q3VBoxLayout>
class QVBoxLayout;
class Q3VBoxLayout;
class QLineEdit;
class QucsLib;
@ -36,7 +38,7 @@ private slots:
void slotSearch();
private:
QVBoxLayout *all;
Q3VBoxLayout *all;
QLineEdit *SearchEdit;
QucsLib *ParentDialog;
};

View File

@ -19,8 +19,13 @@
#include <limits.h>
#include <qpainter.h>
#include <qdragobject.h>
#include <qtextstream.h>
#include <q3dragobject.h>
#include <q3textstream.h>
//Added by qt3to4:
#include <QPaintEvent>
#include <QPixmap>
#include <QMouseEvent>
#include <QTextIStream>
#include "symbolwidget.h"
#include "qucslib.h"
@ -61,7 +66,7 @@ QString SymbolWidget::theModel()
{
// single component line
if(!ModelString.isEmpty())
if(ModelString.contains('\n') < 2)
if(ModelString.count('\n') < 2)
return ModelString.remove('\n');
// real library component
@ -74,7 +79,7 @@ QString SymbolWidget::theModel()
// ************************************************************
void SymbolWidget::mouseMoveEvent(QMouseEvent*)
{
myDragObject = new QTextDrag("QucsComponent:"+theModel(), this);
myDragObject = new Q3TextDrag("QucsComponent:"+theModel(), this);
myDragObject->setPixmap( QPixmap(empty_xpm), QPoint(0, 0) );
myDragObject->dragCopy();
}
@ -83,11 +88,11 @@ void SymbolWidget::mouseMoveEvent(QMouseEvent*)
void SymbolWidget::paintEvent(QPaintEvent*)
{
QPainter Painter(this);
Painter.drawText(2, 2, 0, 0, Qt::AlignAuto | Qt::DontClip, PaintText);
Painter.drawText(2, 2, 0, 0, Qt::AlignLeft | Qt::TextDontClip, PaintText);
int dx = (x2-x1)/2 + TextWidth - DragNDropWidth/2;
if(dx < 2) dx = 2;
Painter.drawText(dx, y2-y1+2, 0, 0, Qt::AlignAuto | Qt::DontClip, DragNDropText);
Painter.drawText(dx, y2-y1+2, 0, 0, Qt::AlignLeft | Qt::TextDontClip, DragNDropText);
// paint all lines
for(Line *pl = Lines.first(); pl != 0; pl = Lines.next()) {
@ -116,7 +121,7 @@ void SymbolWidget::paintEvent(QPaintEvent*)
Painter.drawEllipse(cx+pa->x, cy+pa->y, pa->w, pa->h);
}
Painter.setPen(QPen(QPen::black,1));
Painter.setPen(QPen(Qt::black,1));
QFont Font = Painter.font(); // save current font
Font.setWeight(QFont::Light);
// write all text
@ -124,7 +129,7 @@ void SymbolWidget::paintEvent(QPaintEvent*)
Font.setPointSizeFloat(pt->Size);
Painter.setFont(Font);
Painter.setPen(pt->Color);
Painter.drawText(cx+pt->x, cy+pt->y, 0, 0, Qt::DontClip, pt->s);
Painter.drawText(cx+pt->x, cy+pt->y, 0, 0, Qt::TextDontClip, pt->s);
}
}
@ -147,114 +152,114 @@ int SymbolWidget::createSymbol(const QString& Lib_, const QString& Comp_)
QString FirstProp = ModelString.section('"', 1,1);
if(Comp == "_BJT") {
Lines.append(new Line(-10,-15,-10, 15,QPen(QPen::darkBlue,3)));
Lines.append(new Line(-30, 0,-10, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-10, -5, 0,-15,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0,-15, 0,-30,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-10, 5, 0, 15,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0, 15, 0, 30,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-10,-15,-10, 15,QPen(Qt::darkBlue,3)));
Lines.append(new Line(-30, 0,-10, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-10, -5, 0,-15,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0,-15, 0,-30,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-10, 5, 0, 15,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0, 15, 0, 30,QPen(Qt::darkBlue,2)));
if(FirstProp == "npn") {
Lines.append(new Line( -6, 15, 0, 15,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0, 9, 0, 15,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -6, 15, 0, 15,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0, 9, 0, 15,QPen(Qt::darkBlue,2)));
}
else {
Lines.append(new Line( -5, 10, -5, 16,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -5, 10, 1, 10,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -5, 10, -5, 16,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -5, 10, 1, 10,QPen(Qt::darkBlue,2)));
}
Arcs.append(new struct Arc(-34, -4, 8, 8, 0, 16*360,
QPen(QPen::red,1)));
QPen(Qt::red,1)));
Arcs.append(new struct Arc(-4, -34, 8, 8, 0, 16*360,
QPen(QPen::red,1)));
QPen(Qt::red,1)));
Arcs.append(new struct Arc(-4, 26, 8, 8, 0, 16*360,
QPen(QPen::red,1)));
QPen(Qt::red,1)));
PortNo = 3;
x1 = -34; y1 = -34;
x2 = 4; y2 = 34;
}
else if(Comp == "JFET") {
Lines.append(new Line(-10,-15,-10, 15,QPen(QPen::darkBlue,3)));
Lines.append(new Line(-30, 0,-10, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-10,-10, 0,-10,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0,-10, 0,-30,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-10, 10, 0, 10,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0, 10, 0, 30,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-10,-15,-10, 15,QPen(Qt::darkBlue,3)));
Lines.append(new Line(-30, 0,-10, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-10,-10, 0,-10,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0,-10, 0,-30,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-10, 10, 0, 10,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0, 10, 0, 30,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -4, 24, 4, 20,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -4, 24, 4, 20,QPen(Qt::darkBlue,2)));
if(FirstProp == "nfet") {
Lines.append(new Line(-16, -5,-11, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-16, 5,-11, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-16, -5,-11, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-16, 5,-11, 0,QPen(Qt::darkBlue,2)));
}
else {
Lines.append(new Line(-18, 0,-13, -5,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-18, 0,-13, 5,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-18, 0,-13, -5,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-18, 0,-13, 5,QPen(Qt::darkBlue,2)));
}
Arcs.append(new struct Arc(-34, -4, 8, 8, 0, 16*360,
QPen(QPen::red,1)));
QPen(Qt::red,1)));
Arcs.append(new struct Arc(-4, -34, 8, 8, 0, 16*360,
QPen(QPen::red,1)));
QPen(Qt::red,1)));
Arcs.append(new struct Arc(-4, 26, 8, 8, 0, 16*360,
QPen(QPen::red,1)));
QPen(Qt::red,1)));
PortNo = 3;
x1 = -30; y1 = -30;
x2 = 4; y2 = 30;
}
else if(Comp == "_MOSFET") {
Lines.append(new Line(-14,-13,-14, 13,QPen(QPen::darkBlue,3)));
Lines.append(new Line(-30, 0,-14, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-14,-13,-14, 13,QPen(Qt::darkBlue,3)));
Lines.append(new Line(-30, 0,-14, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-10,-11, 0,-11,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0,-11, 0,-30,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-10, 11, 0, 11,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0, 0, 0, 30,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-10, 0, 0, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-10,-11, 0,-11,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0,-11, 0,-30,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-10, 11, 0, 11,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0, 0, 0, 30,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-10, 0, 0, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-10,-16,-10, -7,QPen(QPen::darkBlue,3)));
Lines.append(new Line(-10, 7,-10, 16,QPen(QPen::darkBlue,3)));
Lines.append(new Line(-10,-16,-10, -7,QPen(Qt::darkBlue,3)));
Lines.append(new Line(-10, 7,-10, 16,QPen(Qt::darkBlue,3)));
if(FirstProp == "nfet") {
Lines.append(new Line( -9, 0, -4, -5,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -9, 0, -4, 5,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -9, 0, -4, -5,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -9, 0, -4, 5,QPen(Qt::darkBlue,2)));
}
else {
Lines.append(new Line( -1, 0, -6, -5,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -1, 0, -6, 5,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -1, 0, -6, -5,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -1, 0, -6, 5,QPen(Qt::darkBlue,2)));
}
// depletion or enhancement MOSFET ?
if((ModelString.section('"', 3,3).stripWhiteSpace().at(0) == '-') ==
(FirstProp == "nfet"))
Lines.append(new Line(-10, -8,-10, 8,QPen(QPen::darkBlue,3)));
Lines.append(new Line(-10, -8,-10, 8,QPen(Qt::darkBlue,3)));
else
Lines.append(new Line(-10, -4,-10, 4,QPen(QPen::darkBlue,3)));
Lines.append(new Line(-10, -4,-10, 4,QPen(Qt::darkBlue,3)));
Arcs.append(new struct Arc(-34, -4, 8, 8, 0, 16*360,
QPen(QPen::red,1)));
QPen(Qt::red,1)));
Arcs.append(new struct Arc(-4, -34, 8, 8, 0, 16*360,
QPen(QPen::red,1)));
QPen(Qt::red,1)));
Arcs.append(new struct Arc(-4, 26, 8, 8, 0, 16*360,
QPen(QPen::red,1)));
QPen(Qt::red,1)));
PortNo = 3;
x1 = -34; y1 = -34;
x2 = 4; y2 = 34;
}
else if(Comp == "Diode") {
Lines.append(new Line(-30, 0, 30, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -6, -9, -6, 9,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 6, -9, 6, 9,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -6, 0, 6, -9,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -6, 0, 6, 9,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 0, 30, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -6, -9, -6, 9,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 6, -9, 6, 9,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -6, 0, 6, -9,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -6, 0, 6, 9,QPen(Qt::darkBlue,2)));
Arcs.append(new struct Arc(-34, -4, 8, 8, 0, 16*360,
QPen(QPen::red,1)));
QPen(Qt::red,1)));
Arcs.append(new struct Arc(26, -4, 8, 8, 0, 16*360,
QPen(QPen::red,1)));
QPen(Qt::red,1)));
PortNo = 2;
x1 = -34; y1 = -9;
@ -265,92 +270,92 @@ int SymbolWidget::createSymbol(const QString& Lib_, const QString& Comp_)
Comp == "hicumL2V2p23" || Comp == "hicumL2V2p24" ||
Comp == "hicumL0V1p2g" || Comp == "hicumL0V1p3") {
// normal bipolar
Lines.append(new Line(-10,-15,-10, 15,QPen(QPen::darkBlue,3)));
Lines.append(new Line(-30, 0,-10, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-10, -5, 0,-15,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0,-15, 0,-30,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-10, 5, 0, 15,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0, 15, 0, 30,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-10,-15,-10, 15,QPen(Qt::darkBlue,3)));
Lines.append(new Line(-30, 0,-10, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-10, -5, 0,-15,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0,-15, 0,-30,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-10, 5, 0, 15,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0, 15, 0, 30,QPen(Qt::darkBlue,2)));
// substrate node
Lines.append(new Line( 9, 0, 30, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 9, -7, 9, 7,QPen(QPen::darkBlue,3)));
Lines.append(new Line( 9, 0, 30, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 9, -7, 9, 7,QPen(Qt::darkBlue,3)));
// thermal node
Lines.append(new Line(-30, 20,-20, 20,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-20, 17,-20, 23,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 20,-20, 20,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-20, 17,-20, 23,QPen(Qt::darkBlue,2)));
// arrow
if(FirstProp == "npn" || Comp == "hic2_full" || Comp == "hicumL2V2p23" ||
Comp == "hicumL2V2p1") {
Lines.append(new Line( -6, 15, 0, 15,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0, 9, 0, 15,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -6, 15, 0, 15,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0, 9, 0, 15,QPen(Qt::darkBlue,2)));
} else {
Lines.append(new Line( -5, 10, -5, 16,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -5, 10, 1, 10,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -5, 10, -5, 16,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -5, 10, 1, 10,QPen(Qt::darkBlue,2)));
}
// H
Lines.append(new Line(-30,-30,-30,-24,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-30,-27,-26,-27,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-26,-30,-26,-24,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-30,-30,-30,-24,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-30,-27,-26,-27,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-26,-30,-26,-24,QPen(Qt::darkBlue,1)));
// I
Lines.append(new Line(-24,-30,-24,-24,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-24,-30,-24,-24,QPen(Qt::darkBlue,1)));
// C
Lines.append(new Line(-22,-30,-22,-24,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-22,-30,-19,-30,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-22,-24,-19,-24,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-22,-30,-22,-24,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-22,-30,-19,-30,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-22,-24,-19,-24,QPen(Qt::darkBlue,1)));
// U
Lines.append(new Line(-17,-30,-17,-24,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-14,-30,-14,-24,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-17,-24,-14,-24,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-17,-30,-17,-24,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-14,-30,-14,-24,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-17,-24,-14,-24,QPen(Qt::darkBlue,1)));
// M
Lines.append(new Line(-12,-30,-12,-24,QPen(QPen::darkBlue,1)));
Lines.append(new Line( -8,-30, -8,-24,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-12,-30,-10,-28,QPen(QPen::darkBlue,1)));
Lines.append(new Line( -8,-30,-10,-28,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-12,-30,-12,-24,QPen(Qt::darkBlue,1)));
Lines.append(new Line( -8,-30, -8,-24,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-12,-30,-10,-28,QPen(Qt::darkBlue,1)));
Lines.append(new Line( -8,-30,-10,-28,QPen(Qt::darkBlue,1)));
// terminal definitions
Arcs.append(new struct Arc( -4, -34, 8, 8, 0, 16*360,
QPen(QPen::red,1))); // collector
QPen(Qt::red,1))); // collector
Arcs.append(new struct Arc(-34, -4, 8, 8, 0, 16*360,
QPen(QPen::red,1))); // base
QPen(Qt::red,1))); // base
Arcs.append(new struct Arc( -4, 26, 8, 8, 0, 16*360,
QPen(QPen::red,1))); // emitter
QPen(Qt::red,1))); // emitter
Arcs.append(new struct Arc( 26, -4, 8, 8, 0, 16*360,
QPen(QPen::red,1))); // substrate
QPen(Qt::red,1))); // substrate
Arcs.append(new struct Arc(-34, 16, 8, 8, 0, 16*360,
QPen(QPen::red,1))); // thermal node
QPen(Qt::red,1))); // thermal node
// relative boundings
x1 = -34; y1 = -34;
x2 = 34; y2 = 34;
}
else if(Comp == "SUBST") {
Lines.append(new Line(-30,-16, 30,-16,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30,-12, 30,-12,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 16, 30, 16,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 12, 30, 12,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30,-16,-30, 16,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 30,-16, 30, 16,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30,-16, 30,-16,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30,-12, 30,-12,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30, 16, 30, 16,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30, 12, 30, 12,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30,-16,-30, 16,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 30,-16, 30, 16,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30,-16, 16,-40,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 30,-16, 80,-40,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 30,-12, 80,-36,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 30, 12, 80,-16,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 30, 16, 80,-12,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 16,-40, 80,-40,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 80,-40, 80,-12,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30,-16, 16,-40,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 30,-16, 80,-40,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 30,-12, 80,-36,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 30, 12, 80,-16,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 30, 16, 80,-12,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 16,-40, 80,-40,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 80,-40, 80,-12,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30, 0,-18,-12,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-22, 12, 2,-12,QPen(QPen::darkBlue,1)));
Lines.append(new Line( -2, 12, 22,-12,QPen(QPen::darkBlue,1)));
Lines.append(new Line( 18, 12, 30, 0,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-30, 0,-18,-12,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-22, 12, 2,-12,QPen(Qt::darkBlue,1)));
Lines.append(new Line( -2, 12, 22,-12,QPen(Qt::darkBlue,1)));
Lines.append(new Line( 18, 12, 30, 0,QPen(Qt::darkBlue,1)));
Lines.append(new Line( 30, 1, 37, 8,QPen(QPen::darkBlue,1)));
Lines.append(new Line( 37,-15, 52, 0,QPen(QPen::darkBlue,1)));
Lines.append(new Line( 52,-22, 66, -8,QPen(QPen::darkBlue,1)));
Lines.append(new Line( 66,-30, 80,-16,QPen(QPen::darkBlue,1)));
Lines.append(new Line( 30, 1, 37, 8,QPen(Qt::darkBlue,1)));
Lines.append(new Line( 37,-15, 52, 0,QPen(Qt::darkBlue,1)));
Lines.append(new Line( 52,-22, 66, -8,QPen(Qt::darkBlue,1)));
Lines.append(new Line( 66,-30, 80,-16,QPen(Qt::darkBlue,1)));
PortNo = 0;
x1 = -34; y1 =-44;
@ -442,7 +447,7 @@ int SymbolWidget::analyseLine(const QString& Row)
if(s == ".PortSym") { // here: ports are open nodes
if(!getIntegers(Row, &i1, &i2, &i3)) return -1;
Arcs.append(new struct Arc(i1-4, i2-4, 8, 8, 0, 16*360,
QPen(QPen::red,1)));
QPen(Qt::red,1)));
if((i1-4) < x1) x1 = i1-4; // keep track of component boundings
if((i1+4) > x2) x2 = i1+4;
@ -672,7 +677,7 @@ bool SymbolWidget::getBrush(const QString& s, QBrush& Brush, int i)
i++;
n = s.section(' ',i,i); // filled
if(n.toInt(&ok) == 0) Brush.setStyle(QBrush::NoBrush);
if(n.toInt(&ok) == 0) Brush.setStyle(Qt::NoBrush);
if(!ok) return false;
return true;

View File

@ -24,9 +24,12 @@
#include <qbrush.h>
#include <qcolor.h>
#include <qstring.h>
#include <qptrlist.h>
#include <q3ptrlist.h>
//Added by qt3to4:
#include <QMouseEvent>
#include <QPaintEvent>
class QDragObject;
class Q3DragObject;
class QPaintEvent;
class QSizePolicy;
@ -94,15 +97,15 @@ private:
bool getPen (const QString&, QPen&, int);
bool getBrush(const QString&, QBrush&, int);
QDragObject *myDragObject;
Q3DragObject *myDragObject;
QString PaintText, DragNDropText;
int TextWidth, DragNDropWidth, TextHeight;
int cx, cy, x1, x2, y1, y2;
QPtrList<Line> Lines;
QPtrList<struct Arc> Arcs;
QPtrList<Area> Rects, Ellips;
QPtrList<Text> Texts;
Q3PtrList<Line> Lines;
Q3PtrList<struct Arc> Arcs;
Q3PtrList<Area> Rects, Ellips;
Q3PtrList<Text> Texts;
};
#endif

View File

@ -20,9 +20,11 @@
#endif
#include <qlayout.h>
#include <qhbox.h>
#include <q3hbox.h>
#include <qpushbutton.h>
#include <qtextedit.h>
#include <q3textedit.h>
//Added by qt3to4:
#include <Q3VBoxLayout>
#include "helpdialog.h"
@ -46,11 +48,11 @@ HelpDialog::HelpDialog(QWidget *parent)
// -------- create dialog widgets ------------
resize(350, 230);
vLayout = new QVBoxLayout(this);
vLayout = new Q3VBoxLayout(this);
vLayout->setMargin(3);
vLayout->setSpacing(3);
Text = new QTextEdit(s, QString::null, this);
Text = new Q3TextEdit(s, QString::null, this);
Text->setTextFormat(Qt::PlainText);
Text->setReadOnly(true);
Text->setMinimumSize(300,200);

View File

@ -19,9 +19,11 @@
#define HELPDIALOG_H
#include <qdialog.h>
//Added by qt3to4:
#include <Q3VBoxLayout>
class QTextEdit;
class QVBoxLayout;
class Q3TextEdit;
class Q3VBoxLayout;
/**
*@author Stefan Jahn
@ -37,8 +39,8 @@ private slots:
void slotClose();
private:
QVBoxLayout *vLayout;
QTextEdit *Text;
Q3VBoxLayout *vLayout;
Q3TextEdit *Text;
};
#endif

View File

@ -26,7 +26,7 @@
#include <qtextcodec.h>
#include <qtranslator.h>
#include <qfile.h>
#include <qtextstream.h>
#include <q3textstream.h>
#include <qmessagebox.h>
#include <qdir.h>
#include <qfont.h>
@ -43,10 +43,10 @@ bool loadSettings()
bool result = true;
QFile file(QDir::homeDirPath()+QDir::convertSeparators ("/.qucs/transrc"));
if(!file.open(IO_ReadOnly))
if(!file.open(QIODevice::ReadOnly))
result = false; // settings file doesn't exist
else {
QTextStream stream(&file);
Q3TextStream stream(&file);
QString Line, Setting;
while(!stream.atEnd()) {
Line = stream.readLine();
@ -83,10 +83,10 @@ bool loadSettings()
}
file.setName(QDir::homeDirPath()+QDir::convertSeparators ("/.qucs/qucsrc"));
if(!file.open(IO_ReadOnly))
if(!file.open(QIODevice::ReadOnly))
result = true; // qucs settings not necessary
else {
QTextStream stream(&file);
Q3TextStream stream(&file);
QString Line, Setting;
while(!stream.atEnd()) {
Line = stream.readLine();
@ -106,14 +106,14 @@ bool loadSettings()
bool saveApplSettings(QucsTranscalc *qucs)
{
QFile file(QDir::homeDirPath()+QDir::convertSeparators ("/.qucs/transrc"));
if(!file.open(IO_WriteOnly)) {
if(!file.open(QIODevice::WriteOnly)) {
QMessageBox::warning(0, QObject::tr("Warning"),
QObject::tr("Cannot save settings !"));
return false;
}
QString Line;
QTextStream stream(&file);
Q3TextStream stream(&file);
stream << "Settings file, QucsTranscalc " PACKAGE_VERSION "\n"
<< "Mode=" << qucs->getMode() << "\n"

View File

@ -20,12 +20,14 @@
#endif
#include <qlayout.h>
#include <qhbox.h>
#include <qhgroupbox.h>
#include <q3hbox.h>
#include <q3hgroupbox.h>
#include <qpushbutton.h>
#include <qvbox.h>
#include <q3vbox.h>
#include <qlabel.h>
#include <qcombobox.h>
//Added by qt3to4:
#include <Q3VBoxLayout>
#include "optionsdialog.h"
#include "qucstrans.h"
@ -38,13 +40,13 @@ OptionsDialog::OptionsDialog(QWidget *parent)
setCaption("QucsTranscalc "+tr("Options"));
// -------- create dialog widgets ------------
vLayout = new QVBoxLayout(this);
vLayout = new Q3VBoxLayout(this);
vLayout->setMargin(3);
vLayout->setSpacing(3);
QHGroupBox * h = new QHGroupBox(tr("Units"), this);
Q3HGroupBox * h = new Q3HGroupBox(tr("Units"), this);
vLayout->addWidget(h);
QVBox * l = new QVBox(h);
Q3VBox * l = new Q3VBox(h);
l->setSpacing(3);
QLabel * lfr = new QLabel(tr("Frequency"),l);
lfr->setAlignment (Qt::AlignRight);
@ -54,7 +56,7 @@ OptionsDialog::OptionsDialog(QWidget *parent)
lre->setAlignment (Qt::AlignRight);
QLabel * lan = new QLabel(tr("Angle"),l);
lan->setAlignment (Qt::AlignRight);
QVBox * r = new QVBox(h);
Q3VBox * r = new Q3VBox(h);
r->setSpacing(3);
for (int j = 0; j < 4; j++) {
units[j] = new QComboBox(r);
@ -66,7 +68,7 @@ OptionsDialog::OptionsDialog(QWidget *parent)
units[2]->setCurrentItem (QucsSettings.res_unit);
units[3]->setCurrentItem (QucsSettings.ang_unit);
QHBox * h2 = new QHBox(this);
Q3HBox * h2 = new Q3HBox(this);
vLayout->addWidget(h2);
QPushButton *ButtonSave = new QPushButton(tr("Save as Default"), h2);

View File

@ -19,8 +19,10 @@
#define OPTIONSDIALOG_H
#include <qdialog.h>
//Added by qt3to4:
#include <Q3VBoxLayout>
class QVBoxLayout;
class Q3VBoxLayout;
class QComboBox;
/**
@ -38,7 +40,7 @@ private slots:
void slotSave();
private:
QVBoxLayout *vLayout;
Q3VBoxLayout *vLayout;
QComboBox *units[4];
};

View File

@ -18,40 +18,46 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <QDate>
#include <QTime>
#include <qlayout.h>
#include <qhbox.h>
#include <qvbox.h>
#include <q3hbox.h>
#include <q3vbox.h>
#include <qpushbutton.h>
#include <qfile.h>
#include <qtextstream.h>
#include <q3textstream.h>
#include <qmessagebox.h>
#include <qtoolbutton.h>
#include <qimage.h>
#include <qfiledialog.h>
#include <q3filedialog.h>
#include <qmenubar.h>
#include <qaction.h>
#include <qpopupmenu.h>
#include <qhgroupbox.h>
#include <qvgroupbox.h>
#include <q3popupmenu.h>
#include <q3hgroupbox.h>
#include <q3vgroupbox.h>
#include <qcombobox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qimage.h>
#include <qiconset.h>
#include <qscrollview.h>
#include <qicon.h>
#include <q3scrollview.h>
#include <qtooltip.h>
#include <qradiobutton.h>
#include <qstatusbar.h>
#include <qdir.h>
#include <qbuttongroup.h>
#include <qwidgetstack.h>
#include <q3buttongroup.h>
#include <q3widgetstack.h>
#include <qregexp.h>
#include <qvalidator.h>
#include <qclipboard.h>
#include <qapplication.h>
#include "qucstrans.h"
//Added by qt3to4:
#include <QPixmap>
#include <Q3VBoxLayout>
#include <QCloseEvent>
#include "helpdialog.h"
#include "optionsdialog.h"
#include "transline.h"
@ -257,50 +263,50 @@ QucsTranscalc::QucsTranscalc() {
QMenuBar * menuBar = new QMenuBar (this);
// create file menu
QPopupMenu * fileMenu = new QPopupMenu ();
Q3PopupMenu * fileMenu = new Q3PopupMenu ();
QAction * fileLoad =
new QAction (tr("Load"), tr("&Load"), CTRL+Key_L, this);
new QAction (tr("&Load"), Qt::CTRL+Qt::Key_L, this,"");
fileLoad->addTo (fileMenu);
connect(fileLoad, SIGNAL(activated()), SLOT(slotFileLoad()));
QAction * fileSave =
new QAction (tr("Save"), tr("&Save"), CTRL+Key_S, this);
new QAction (tr("&Save"), Qt::CTRL+Qt::Key_S, this,"");
fileSave->addTo (fileMenu);
connect(fileSave, SIGNAL(activated()), SLOT(slotFileSave()));
fileMenu->insertSeparator ();
QAction * fileOption =
new QAction (tr("Options"), tr("&Options"), CTRL+Key_O, this);
new QAction (tr("&Options"), Qt::CTRL+Qt::Key_O, this,"");
fileOption->addTo (fileMenu);
connect(fileOption, SIGNAL(activated()), SLOT(slotOptions()));
fileMenu->insertSeparator ();
QAction * fileQuit =
new QAction (tr("Quit"), tr("&Quit"), CTRL+Key_Q, this);
new QAction (tr("&Quit"), Qt::CTRL+Qt::Key_Q, this,"");
fileQuit->addTo (fileMenu);
connect(fileQuit, SIGNAL(activated()), SLOT(slotQuit()));
// create execute menu
QPopupMenu * execMenu = new QPopupMenu ();
Q3PopupMenu * execMenu = new Q3PopupMenu ();
QAction * execCopy =
new QAction (tr("Copy to Clipboard"),
tr("&Copy to Clipboard"), Key_F2, this);
new QAction (
tr("&Copy to Clipboard"), Qt::Key_F2, this,"");
execCopy->addTo (execMenu);
connect(execCopy, SIGNAL(activated()), SLOT(slotCopyToClipBoard()));
QAction * execAnalyze =
new QAction (tr("Analyze"), tr("&Analyze"), Key_F3, this);
new QAction (tr("&Analyze"), Qt::Key_F3, this,"");
execAnalyze->addTo (execMenu);
connect(execAnalyze, SIGNAL(activated()), SLOT(slotAnalyze()));
QAction * execSynthesize =
new QAction (tr("Synthesize"), tr("&Synthesize"), Key_F4, this);
new QAction (tr("&Synthesize"), Qt::Key_F4, this,"");
execSynthesize->addTo (execMenu);
connect(execSynthesize, SIGNAL(activated()), SLOT(slotSynthesize()));
// create help menu
QPopupMenu * helpMenu = new QPopupMenu ();
Q3PopupMenu * helpMenu = new Q3PopupMenu ();
QAction * helpHelp =
new QAction (tr("Help"), tr("&Help"), Key_F1, this);
new QAction ( tr("&Help"), Qt::Key_F1, this,"");
helpHelp->addTo (helpMenu);
connect(helpHelp, SIGNAL(activated()), SLOT(slotHelpIntro()));
QAction * helpAbout =
new QAction (tr("About"), tr("About"), 0, helpMenu);
new QAction ( tr("About"), 0, helpMenu,"");
helpAbout->addTo (helpMenu);
connect(helpAbout, SIGNAL(activated()), SLOT(slotAbout()));
@ -311,7 +317,7 @@ QucsTranscalc::QucsTranscalc() {
menuBar->insertItem (tr("&Help"), helpMenu);
// main box
QVBoxLayout * v = new QVBoxLayout (this);
Q3VBoxLayout * v = new Q3VBoxLayout (this);
v->setSpacing (0);
v->setMargin (0);
@ -321,7 +327,7 @@ QucsTranscalc::QucsTranscalc() {
v->addWidget (Space);
// main layout
QHBox * h = new QHBox (this);
Q3HBox * h = new Q3HBox (this);
h->setSpacing (5);
v->addWidget (h);
@ -330,7 +336,7 @@ QucsTranscalc::QucsTranscalc() {
sl->setFixedWidth (2);
// transmission line type choice
QVGroupBox * lineGroup = new QVGroupBox (tr("Transmission Line Type"), h);
Q3VGroupBox * lineGroup = new Q3VGroupBox (tr("Transmission Line Type"), h);
tranType = new QComboBox (lineGroup);
tranType->insertItem (tr("Microstrip Line"));
tranType->insertItem (tr("Coplanar Waveguide"));
@ -344,9 +350,9 @@ QucsTranscalc::QucsTranscalc() {
pix->setPixmap (QPixmap (QImage (QucsSettings.BitmapDir +
"microstrip.png")));
QVBox * vm = new QVBox (h);
Q3VBox * vm = new Q3VBox (h);
vm->setSpacing (3);
QVBox * vr = new QVBox (h);
Q3VBox * vr = new Q3VBox (h);
vr->setSpacing (3);
// right margin
@ -360,19 +366,19 @@ QucsTranscalc::QucsTranscalc() {
mode = ModeMicrostrip;
// substrate parameter box
QHGroupBox * substrate = new QHGroupBox (tr("Substrate Parameters"), vm);
Q3HGroupBox * substrate = new Q3HGroupBox (tr("Substrate Parameters"), vm);
createPropItems (substrate, TRANS_SUBSTRATE);
// component parameter box
QHGroupBox * component = new QHGroupBox (tr("Component Parameters"), vm);
Q3HGroupBox * component = new Q3HGroupBox (tr("Component Parameters"), vm);
createPropItems (component, TRANS_COMPONENT);
// physical parameter box
QHGroupBox * physical = new QHGroupBox (tr("Physical Parameters"), vr);
Q3HGroupBox * physical = new Q3HGroupBox (tr("Physical Parameters"), vr);
createPropItems (physical, TRANS_PHYSICAL);
// analyze/synthesize buttons
QHBox * h2 = new QHBox (vr);
Q3HBox * h2 = new Q3HBox (vr);
QPushButton * analyze = new QPushButton (tr("Analyze"), h2);
QToolTip::add (analyze, tr("Derive Electrical Parameters"));
connect(analyze, SIGNAL(clicked()), SLOT(slotAnalyze()));
@ -381,10 +387,10 @@ QucsTranscalc::QucsTranscalc() {
connect(synthesize, SIGNAL(clicked()), SLOT(slotSynthesize()));
// electrical parameter box
QHGroupBox * electrical = new QHGroupBox (tr("Electrical Parameters"), vr);
Q3HGroupBox * electrical = new Q3HGroupBox (tr("Electrical Parameters"), vr);
createPropItems (electrical, TRANS_ELECTRICAL);
calculated = new QHGroupBox (tr("Calculated Results"), vr);
calculated = new Q3HGroupBox (tr("Calculated Results"), vr);
// status line
statBar = new QStatusBar (this);
@ -553,8 +559,8 @@ void QucsTranscalc::setupTranslations () {
/* Creates a property item 'val' in a parameter category specified by
its 'box'. */
void QucsTranscalc::createPropItem (QVBox ** parentRows, TransValue * val,
int box, QButtonGroup * group) {
void QucsTranscalc::createPropItem (Q3VBox ** parentRows, TransValue * val,
int box, Q3ButtonGroup * group) {
QRadioButton * r = NULL;
QLabel * l;
QLineEdit * e;
@ -596,7 +602,7 @@ void QucsTranscalc::createPropItem (QVBox ** parentRows, TransValue * val,
// special synthesize-computation choice
if (box == TRANS_PHYSICAL) {
QWidgetStack * s = new QWidgetStack(parentRows[3]);
Q3WidgetStack * s = new Q3WidgetStack(parentRows[3]);
s->setFixedSize (val->lineedit->height()-10, val->lineedit->height()-10);
r = new QRadioButton (s);
QWidget * spacer = new QWidget (s);
@ -710,18 +716,18 @@ void QucsTranscalc::updateSelection () {
/* The function creates the property items for the given category of
transmission line parameters. */
void QucsTranscalc::createPropItems (QHGroupBox * parent, int box) {
void QucsTranscalc::createPropItems (Q3HGroupBox * parent, int box) {
struct TransValue * val, * dup;
int last = 0, idx = getTypeIndex ();
val = TransLineTypes[idx].array[box].item;
QVBox *rows[4];
QButtonGroup * group = new QButtonGroup();
Q3VBox *rows[4];
Q3ButtonGroup * group = new Q3ButtonGroup();
connect(group, SIGNAL(pressed(int)), SLOT(slotRadioChecked(int)));
rows[0] = new QVBox (parent);
rows[1] = new QVBox (parent);
rows[2] = new QVBox (parent);
rows[3] = new QVBox (parent);
rows[0] = new Q3VBox (parent);
rows[1] = new Q3VBox (parent);
rows[2] = new Q3VBox (parent);
rows[3] = new Q3VBox (parent);
parent->layout()->setSpacing (2);
rows[0]->setSpacing (2);
@ -756,7 +762,7 @@ void QucsTranscalc::createPropItems (QHGroupBox * parent, int box) {
}
/* Creates a single result item. */
void QucsTranscalc::createResultItem (QVBox ** parentRows, TransResult * res) {
void QucsTranscalc::createResultItem (Q3VBox ** parentRows, TransResult * res) {
QLabel * n =
new QLabel (res->name ? *(res->name) + ":" : QString(), parentRows[0]);
n->setAlignment (Qt::AlignRight);
@ -783,14 +789,14 @@ void QucsTranscalc::updateResultItem (TransResult * res) {
}
/* Creates all the result items. */
void QucsTranscalc::createResultItems (QHGroupBox * parent) {
void QucsTranscalc::createResultItems (Q3HGroupBox * parent) {
struct TransResult * res, * dup;
int idx = getTypeIndex ();
res = & TransLineTypes[idx].result[0];
QVBox *rows[2];
rows[0] = new QVBox (parent);
rows[1] = new QVBox (parent);
Q3VBox *rows[2];
rows[0] = new Q3VBox (parent);
rows[1] = new Q3VBox (parent);
parent->layout()->setSpacing (2);
rows[0]->setSpacing (2);
@ -982,9 +988,9 @@ void QucsTranscalc::slotValueChanged()
// Load transmission line values from the given file.
bool QucsTranscalc::loadFile(QString fname, int * _mode) {
QFile file(QDir::convertSeparators (fname));
if(!file.open(IO_ReadOnly)) return false; // file doesn't exist
if(!file.open(QIODevice::ReadOnly)) return false; // file doesn't exist
QTextStream stream(&file);
Q3TextStream stream(&file);
QString Line, Name, Unit;
double Value;
@ -1024,8 +1030,8 @@ bool QucsTranscalc::loadFile(QString fname, int * _mode) {
// Saves current transmission line values into the given file.
bool QucsTranscalc::saveFile(QString fname) {
QFile file (QDir::convertSeparators (fname));
if(!file.open (IO_WriteOnly)) return false; // file not writable
QTextStream stream (&file);
if(!file.open (QIODevice::WriteOnly)) return false; // file not writable
Q3TextStream stream (&file);
// some lines of documentation
stream << "# QucsTranscalc " << PACKAGE_VERSION << " " << fname << "\n";
@ -1042,7 +1048,7 @@ bool QucsTranscalc::saveFile(QString fname) {
/* Writes the transmission line values for the current modes into the
given stream. */
void QucsTranscalc::saveMode(QTextStream& stream) {
void QucsTranscalc::saveMode(Q3TextStream& stream) {
struct TransType * t = &TransLineTypes[getTypeIndex ()];
struct TransValue * val = NULL;
stream << "<" << t->description << ">\n";
@ -1058,7 +1064,7 @@ void QucsTranscalc::saveMode(QTextStream& stream) {
}
// Writes the transmission line values for all modes into the given stream.
void QucsTranscalc::saveModes(QTextStream& stream) {
void QucsTranscalc::saveModes(Q3TextStream& stream) {
int oldmode = mode;
for (int i = 0; i < MAX_TRANS_TYPES; i++) {
mode = TransLineTypes[i].type;
@ -1096,7 +1102,7 @@ void QucsTranscalc::slotFileLoad()
{
statBar->message(tr("Loading file..."));
int _mode = 0;
QString s = QFileDialog::getOpenFileName(QucsWorkDir.path(),
QString s = Q3FileDialog::getOpenFileName(QucsWorkDir.path(),
tr("Transcalc File")+" (*.trc)", this, "", tr("Enter a Filename"));
if (!s.isEmpty()) {
QucsWorkDir.setPath(QDir::cleanDirPath(s));
@ -1114,7 +1120,7 @@ void QucsTranscalc::slotFileSave()
{
statBar->message(tr("Saving file..."));
QString s = QFileDialog::getSaveFileName(QucsWorkDir.path(),
QString s = Q3FileDialog::getSaveFileName(QucsWorkDir.path(),
tr("Transcalc File")+" (*.trc)", this, "", tr("Enter a Filename"));
if (!s.isEmpty()) {
QucsWorkDir.setPath(QDir::cleanDirPath(s));

View File

@ -21,19 +21,25 @@
#include <qdialog.h>
#include <qfont.h>
#include <qstring.h>
//Added by qt3to4:
#include <Q3GridLayout>
#include <Q3TextStream>
#include <Q3VBoxLayout>
#include <QLabel>
#include <QCloseEvent>
class QComboBox;
class QLineEdit;
class QLabel;
class QHGroupBox;
class QVBox;
class QVBoxLayout;
class Q3HGroupBox;
class Q3VBox;
class Q3VBoxLayout;
class QRadioButton;
class QGridLayout;
class Q3GridLayout;
class QStatusBar;
class QTextStream;
class QButtonGroup;
class QWidgetStack;
class Q3TextStream;
class Q3ButtonGroup;
class Q3WidgetStack;
class transline;
@ -81,7 +87,7 @@ struct TransValue {
QLineEdit * lineedit; // Qt value widget
QComboBox * combobox; // Qt unit widget
QRadioButton * radio; // Qt fixed widget
QWidgetStack * stack; // Qt fixed stack
Q3WidgetStack * stack; // Qt fixed stack
};
// Array of transmission line values.
@ -141,8 +147,8 @@ public:
void setResult (int, const char *);
bool isSelected (QString);
void saveMode (QTextStream&);
void saveModes (QTextStream&);
void saveMode (Q3TextStream&);
void saveModes (Q3TextStream&);
bool loadFile (QString, int * _mode = 0);
QString getMode (void);
void setMode (QString);
@ -164,12 +170,12 @@ private slots:
private:
void updateSelection ();
void createPropItem (QVBox **, TransValue *, int, QButtonGroup *);
void createResultItem (QVBox **, TransResult *);
void createPropItem (Q3VBox **, TransValue *, int, Q3ButtonGroup *);
void createResultItem (Q3VBox **, TransResult *);
void updateResultItem (TransResult *);
void createResultItems (QHGroupBox *);
void createResultItems (Q3HGroupBox *);
void updateResultItems ();
void createPropItems (QHGroupBox *, int);
void createPropItems (Q3HGroupBox *, int);
int getTypeIndex ();
void updatePropItem (TransValue *);
void setMode (int);
@ -187,7 +193,7 @@ private:
QStatusBar * statBar;
QLabel * pix;
QComboBox * tranType;
QHGroupBox * calculated;
Q3HGroupBox * calculated;
int mode;
};

View File

@ -46,21 +46,21 @@ Element * DLS_1ton::info(QString& Name, char * &BitmapFile, bool getNewOne)
void DLS_1ton::createSymbol()
{
Lines.append(new Line(-30, -30, 30,-30,QPen(QPen::darkRed,2)));
Lines.append(new Line( 30, -30, 30, 30,QPen(QPen::darkRed,2)));
Lines.append(new Line( 30, 30,-30, 30,QPen(QPen::darkRed,2)));
Lines.append(new Line(-30, 30, -30, -30,QPen(QPen::darkRed,2)));
Lines.append(new Line(-30, -30, 30,-30,QPen(Qt::darkRed,2)));
Lines.append(new Line( 30, -30, 30, 30,QPen(Qt::darkRed,2)));
Lines.append(new Line( 30, 30,-30, 30,QPen(Qt::darkRed,2)));
Lines.append(new Line(-30, 30, -30, -30,QPen(Qt::darkRed,2)));
Lines.append(new Line(-30, 30, 30, -30,QPen(QPen::darkRed,2)));
Lines.append(new Line(-30, 30, 30, -30,QPen(Qt::darkRed,2)));
Lines.append(new Line(-40, 0,-30, 0,QPen(QPen::darkRed,2))); // Lin
Lines.append(new Line( 30, 0, 40, 0,QPen(QPen::darkRed,2))); // Lout
Lines.append(new Line(-40, 0,-30, 0,QPen(Qt::darkRed,2))); // Lin
Lines.append(new Line( 30, 0, 40, 0,QPen(Qt::darkRed,2))); // Lout
Lines.append(new Line(-25, -20,-15, -20,QPen(QPen::darkRed,2)));
Lines.append(new Line( 25, 20, 15, 20,QPen(QPen::darkRed,2)));
Lines.append(new Line(-25, -20,-15, -20,QPen(Qt::darkRed,2)));
Lines.append(new Line( 25, 20, 15, 20,QPen(Qt::darkRed,2)));
Texts.append(new Text(-10,-32, "1", QPen::darkRed, 12.0));
Texts.append(new Text( 0, 8, "n", QPen::darkRed, 12.0));
Texts.append(new Text(-10,-32, "1", Qt::darkRed, 12.0));
Texts.append(new Text( 0, 8, "n", Qt::darkRed, 12.0));
Ports.append(new Port(-40, 0)); // Lin
Ports.append(new Port( 40, 0)); // Lout

View File

@ -47,21 +47,21 @@ Element * DLS_nto1::info(QString& Name, char * &BitmapFile, bool getNewOne)
void DLS_nto1::createSymbol()
{
Lines.append(new Line(-30, -30, 30,-30,QPen(QPen::darkRed,2)));
Lines.append(new Line( 30, -30, 30, 30,QPen(QPen::darkRed,2)));
Lines.append(new Line( 30, 30,-30, 30,QPen(QPen::darkRed,2)));
Lines.append(new Line(-30, 30, -30, -30,QPen(QPen::darkRed,2)));
Lines.append(new Line(-30, -30, 30,-30,QPen(Qt::darkRed,2)));
Lines.append(new Line( 30, -30, 30, 30,QPen(Qt::darkRed,2)));
Lines.append(new Line( 30, 30,-30, 30,QPen(Qt::darkRed,2)));
Lines.append(new Line(-30, 30, -30, -30,QPen(Qt::darkRed,2)));
Lines.append(new Line(-30, 30, 30, -30,QPen(QPen::darkRed,2)));
Lines.append(new Line(-30, 30, 30, -30,QPen(Qt::darkRed,2)));
Lines.append(new Line(-40, 0,-30, 0,QPen(QPen::darkRed,2))); // Lin
Lines.append(new Line( 30, 0, 40, 0,QPen(QPen::darkRed,2))); // Lout
Lines.append(new Line(-40, 0,-30, 0,QPen(Qt::darkRed,2))); // Lin
Lines.append(new Line( 30, 0, 40, 0,QPen(Qt::darkRed,2))); // Lout
Lines.append(new Line(-25, -20,-15, -20,QPen(QPen::darkRed,2)));
Lines.append(new Line( 25, 20, 15, 20,QPen(QPen::darkRed,2)));
Lines.append(new Line(-25, -20,-15, -20,QPen(Qt::darkRed,2)));
Lines.append(new Line( 25, 20, 15, 20,QPen(Qt::darkRed,2)));
Texts.append(new Text(-10,-32, "n", QPen::darkRed, 12.0));
Texts.append(new Text( 0, 8, "1", QPen::darkRed, 12.0));
Texts.append(new Text(-10,-32, "n", Qt::darkRed, 12.0));
Texts.append(new Text( 0, 8, "1", Qt::darkRed, 12.0));
Ports.append(new Port(-40, 0)); // Lin
Ports.append(new Port( 40, 0)); // Lout

View File

@ -7,7 +7,7 @@
* any later version.
*
*/
#include <QtGui>
#include "node.h"
#include "EKV26MOS.h"
@ -223,44 +223,44 @@ Element * EKV26MOS::info_pmos(QString& Name, char * &BitmapFile, bool getNewOne)
void EKV26MOS::createSymbol()
{
// put in here symbol drawing code and terminal definitions
Lines.append(new Line(-14,-13,-14, 13,QPen(QPen::darkBlue,3)));
Lines.append(new Line(-30, 0,-14, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-10,-11, 0,-11,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0,-11, 0,-30,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-14,-13,-14, 13,QPen(Qt::darkBlue,3)));
Lines.append(new Line(-30, 0,-14, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-10,-11, 0,-11,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0,-11, 0,-30,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-10, 11, 0, 11,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0, 11, 0, 30,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-10, 0, 20, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-10,-16,-10, -7,QPen(QPen::darkBlue,3)));
Lines.append(new Line(-10, 11, 0, 11,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0, 11, 0, 30,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-10, 0, 20, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-10,-16,-10, -7,QPen(Qt::darkBlue,3)));
Lines.append(new Line(-10, 7,-10, 16,QPen(QPen::darkBlue,3)));
Lines.append(new Line( -4, 24, 4, 20,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-10, 7,-10, 16,QPen(Qt::darkBlue,3)));
Lines.append(new Line( -4, 24, 4, 20,QPen(Qt::darkBlue,2)));
// arrow
if(getProperty("Type")->Value == "nmos") {
Lines.append(new Line( -9, 0, -4, -5,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -9, 0, -4, 5,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -9, 0, -4, -5,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -9, 0, -4, 5,QPen(Qt::darkBlue,2)));
} else {
Lines.append(new Line( -5, 5, 0, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -5, -5, 0, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -5, 5, 0, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -5, -5, 0, 0,QPen(Qt::darkBlue,2)));
}
Lines.append(new Line(-10, -3,-10, 3,QPen(QPen::darkBlue,3)));
Lines.append(new Line(-10, -8,-10, -6,QPen(QPen::darkBlue,3)));
Lines.append(new Line(-10, 8,-10, 6,QPen(QPen::darkBlue,3)));
Lines.append(new Line(-10, -3,-10, 3,QPen(Qt::darkBlue,3)));
Lines.append(new Line(-10, -8,-10, -6,QPen(Qt::darkBlue,3)));
Lines.append(new Line(-10, 8,-10, 6,QPen(Qt::darkBlue,3)));
// E
Lines.append(new Line(-30,-30,-30,-24,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-30,-30,-26,-30,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-30,-27,-26,-27,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-30,-24,-26,-24,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-30,-30,-30,-24,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-30,-30,-26,-30,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-30,-27,-26,-27,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-30,-24,-26,-24,QPen(Qt::darkBlue,1)));
// K
Lines.append(new Line(-24,-30,-24,-24,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-24,-27,-20,-30,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-24,-27,-20,-24,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-24,-30,-24,-24,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-24,-27,-20,-30,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-24,-27,-20,-24,QPen(Qt::darkBlue,1)));
// V
Lines.append(new Line(-18,-30,-16,-24,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-14,-30,-16,-24,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-18,-30,-16,-24,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-14,-30,-16,-24,QPen(Qt::darkBlue,1)));
Ports.append(new Port( 0,-30)); // drain
Ports.append(new Port(-30, 0)); // gate

View File

@ -177,35 +177,35 @@ HBT_X::HBT_X()
// normal bipolar
Lines.append(new Line(-10,-15,-10, 15,QPen(QPen::darkBlue,3)));
Lines.append(new Line(-30, 0,-10, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-10, -5, 0,-15,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0,-15, 0,-30,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-10, 5, 0, 15,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0, 15, 0, 30,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-10,-15,-10, 15,QPen(Qt::darkBlue,3)));
Lines.append(new Line(-30, 0,-10, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-10, -5, 0,-15,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0,-15, 0,-30,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-10, 5, 0, 15,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0, 15, 0, 30,QPen(Qt::darkBlue,2)));
// thermal node
Lines.append(new Line(-30, 20,-20, 20,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-20, 17,-20, 23,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 20,-20, 20,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-20, 17,-20, 23,QPen(Qt::darkBlue,2)));
// arrow
Lines.append(new Line( -6, 15, 0, 15,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0, 9, 0, 15,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -6, 15, 0, 15,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0, 9, 0, 15,QPen(Qt::darkBlue,2)));
// H
Lines.append(new Line(-30,-30,-30,-24,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-30,-27,-26,-27,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-26,-30,-26,-24,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-30,-30,-30,-24,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-30,-27,-26,-27,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-26,-30,-26,-24,QPen(Qt::darkBlue,1)));
// B
Lines.append(new Line(-23,-30,-23,-24,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-24,-30,-20,-30,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-23,-27,-20,-27,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-24,-24,-20,-24,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-20,-30,-20,-27,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-20,-27,-20,-24,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-23,-30,-23,-24,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-24,-30,-20,-30,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-23,-27,-20,-27,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-24,-24,-20,-24,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-20,-30,-20,-27,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-20,-27,-20,-24,QPen(Qt::darkBlue,1)));
// T
Lines.append(new Line(-18,-30,-14,-30,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-16,-30,-16,-24,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-18,-30,-14,-30,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-16,-30,-16,-24,QPen(Qt::darkBlue,1)));
Ports.append(new Port( 0,-30)); // collector
Ports.append(new Port(-30, 0)); // base

View File

@ -177,14 +177,14 @@ Element * MESFET::info(QString& Name, char * &BitmapFile, bool getNewOne)
void MESFET::createSymbol()
{
// put in here symbol drawing code and terminal definitions
Lines.append(new Line(-10,-15,-10, 15,QPen(QPen::darkBlue,3)));
Lines.append(new Line(-30, 0,-10, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-10,-10, 0,-10,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0,-10, 0,-30,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-10, 10, 0, 10,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0, 10, 0, 30,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-10,-15,-10, 15,QPen(Qt::darkBlue,3)));
Lines.append(new Line(-30, 0,-10, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-10,-10, 0,-10,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0,-10, 0,-30,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-10, 10, 0, 10,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0, 10, 0, 30,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -4, 24, 4, 20,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -4, 24, 4, 20,QPen(Qt::darkBlue,2)));
Ports.append(new Port( 0,-30));
Ports.append(new Port(-30, 0));

View File

@ -14,7 +14,7 @@
* (at your option) any later version. *
* *
***************************************************************************/
#include <QtGui>
#include "ac_sim.h"
#include "main.h"
@ -32,9 +32,9 @@ AC_Sim::AC_Sim()
if (a < 8 || s.length() - b < 8) b = -1;
if (b != -1) s[b] = '\n';
Texts.append(new Text(0, 0, s.left(b), QPen::darkBlue, QucsSettings.largeFontSize));
Texts.append(new Text(0, 0, s.left(b), Qt::darkBlue, QucsSettings.largeFontSize));
if (b != -1)
Texts.append(new Text(0, 0, s.mid(b+1), QPen::darkBlue, QucsSettings.largeFontSize));
Texts.append(new Text(0, 0, s.mid(b+1), Qt::darkBlue, QucsSettings.largeFontSize));
x1 = -10; y1 = -9;
x2 = x1+128; y2 = y1+41;

View File

@ -22,18 +22,18 @@ AM_Modulator::AM_Modulator()
{
Description = QObject::tr("ac voltage source with amplitude modulator");
Arcs.append(new Arc(-12,-12, 24, 24, 0, 16*360,QPen(QPen::darkBlue,2)));
Arcs.append(new Arc( -7, -4, 7, 7, 0, 16*180,QPen(QPen::darkBlue,2)));
Arcs.append(new Arc( 0, -4, 7, 7,16*180, 16*180,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0, 30, 0, 12,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0,-30, 0,-12,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 5,-18, 11,-18,QPen(QPen::red,1)));
Lines.append(new Line( 8,-21, 8,-15,QPen(QPen::red,1)));
Lines.append(new Line( 5, 18, 11, 18,QPen(QPen::black,1)));
Arcs.append(new Arc(-12,-12, 24, 24, 0, 16*360,QPen(Qt::darkBlue,2)));
Arcs.append(new Arc( -7, -4, 7, 7, 0, 16*180,QPen(Qt::darkBlue,2)));
Arcs.append(new Arc( 0, -4, 7, 7,16*180, 16*180,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0, 30, 0, 12,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0,-30, 0,-12,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 5,-18, 11,-18,QPen(Qt::red,1)));
Lines.append(new Line( 8,-21, 8,-15,QPen(Qt::red,1)));
Lines.append(new Line( 5, 18, 11, 18,QPen(Qt::black,1)));
Lines.append(new Line(-12, 0,-30, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-12, 0,-17, 5,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-12, 0,-17, -5,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-12, 0,-30, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-12, 0,-17, 5,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-12, 0,-17, -5,QPen(Qt::darkBlue,2)));
Texts.append(new Text(-30,-22, QObject::tr("AM"), Qt::black, 10.0,1.0,0.0));
Ports.append(new Port( 0,-30));

View File

@ -22,14 +22,14 @@ Ampere_ac::Ampere_ac()
{
Description = QObject::tr("ideal ac current source");
Arcs.append(new Arc(-12,-12, 24, 24, 0, 16*360,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 0,-12, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 30, 0, 12, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -7, 0, 7, 0,QPen(QPen::darkBlue,3)));
Lines.append(new Line( 6, 0, 0, -4,QPen(QPen::darkBlue,3)));
Lines.append(new Line( 6, 0, 0, 4,QPen(QPen::darkBlue,3)));
Arcs.append(new Arc( 12, 5, 6, 6,16*270, 16*180,QPen(QPen::darkBlue,2)));
Arcs.append(new Arc( 12, 11, 6, 6, 16*90, 16*180,QPen(QPen::darkBlue,2)));
Arcs.append(new Arc(-12,-12, 24, 24, 0, 16*360,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30, 0,-12, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 30, 0, 12, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -7, 0, 7, 0,QPen(Qt::darkBlue,3)));
Lines.append(new Line( 6, 0, 0, -4,QPen(Qt::darkBlue,3)));
Lines.append(new Line( 6, 0, 0, 4,QPen(Qt::darkBlue,3)));
Arcs.append(new Arc( 12, 5, 6, 6,16*270, 16*180,QPen(Qt::darkBlue,2)));
Arcs.append(new Arc( 12, 11, 6, 6, 16*90, 16*180,QPen(Qt::darkBlue,2)));
Ports.append(new Port( 30, 0));
Ports.append(new Port(-30, 0));

View File

@ -22,12 +22,12 @@ Ampere_dc::Ampere_dc()
{
Description = QObject::tr("ideal dc current source");
Arcs.append(new Arc(-12,-12, 24, 24, 0, 16*360,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 0,-12, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 30, 0, 12, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -7, 0, 7, 0,QPen(QPen::darkBlue,3)));
Lines.append(new Line( 6, 0, 0, -4,QPen(QPen::darkBlue,3)));
Lines.append(new Line( 6, 0, 0, 4,QPen(QPen::darkBlue,3)));
Arcs.append(new Arc(-12,-12, 24, 24, 0, 16*360,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30, 0,-12, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 30, 0, 12, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -7, 0, 7, 0,QPen(Qt::darkBlue,3)));
Lines.append(new Line( 6, 0, 0, -4,QPen(Qt::darkBlue,3)));
Lines.append(new Line( 6, 0, 0, 4,QPen(Qt::darkBlue,3)));
Ports.append(new Port( 30, 0));
Ports.append(new Port(-30, 0));

View File

@ -22,19 +22,19 @@ Ampere_noise::Ampere_noise()
{
Description = QObject::tr("noise current source");
Arcs.append(new Arc(-12,-12, 24, 24, 0, 16*360,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 0,-12, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 30, 0, 12, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -7, 0, 7, 0,QPen(QPen::darkBlue,3)));
Lines.append(new Line( 6, 0, 0, -4,QPen(QPen::darkBlue,3)));
Lines.append(new Line( 6, 0, 0, 4,QPen(QPen::darkBlue,3)));
Arcs.append(new Arc(-12,-12, 24, 24, 0, 16*360,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30, 0,-12, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 30, 0, 12, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -7, 0, 7, 0,QPen(Qt::darkBlue,3)));
Lines.append(new Line( 6, 0, 0, -4,QPen(Qt::darkBlue,3)));
Lines.append(new Line( 6, 0, 0, 4,QPen(Qt::darkBlue,3)));
Lines.append(new Line(-12, 1, 1,-12,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-10, 6, -7, 3,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 3, -7, 6,-10,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -7, 10, -2, 5,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 7, -4, 10, -7,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -1, 12, 12, -1,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-12, 1, 1,-12,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-10, 6, -7, 3,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 3, -7, 6,-10,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -7, 10, -2, 5,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 7, -4, 10, -7,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -1, 12, 12, -1,QPen(Qt::darkBlue,2)));
Ports.append(new Port( 30, 0));
Ports.append(new Port(-30, 0));

View File

@ -22,12 +22,12 @@ Amplifier::Amplifier()
{
Description = QObject::tr("ideal amplifier");
Lines.append(new Line(-16,-20,-16, 20,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-16,-20, 16, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-16, 20, 16, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-16,-20,-16, 20,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-16,-20, 16, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-16, 20, 16, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30, 0,-16, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 16, 0, 30, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 0,-16, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 16, 0, 30, 0,QPen(Qt::darkBlue,2)));
Ports.append(new Port(-30, 0));
Ports.append(new Port( 30, 0));

View File

@ -15,7 +15,7 @@
* any later version.
*
*/
#include <QtGui>
#include "andor4x2.h"
#include "node.h"
#include "main.h"
@ -57,36 +57,36 @@ Element * andor4x2::info(QString& Name, char * &BitmapFile, bool getNewOne)
void andor4x2::createSymbol()
{
Lines.append(new Line(-30, -60, 30,-60,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 30, -60, 30, 60,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 30, 60,-30, 60,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 60,-30,-60,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, -60, 30,-60,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 30, -60, 30, 60,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 30, 60,-30, 60,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30, 60,-30,-60,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30, -30, 0,-30,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 0, 0, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 30, 0, 30,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0, -60, 0, 60,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, -30, 0,-30,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30, 0, 0, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30, 30, 0, 30,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0, -60, 0, 60,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-50,-50,-30,-50,QPen(QPen::darkBlue,2))); //A11
Lines.append(new Line(-50,-40,-30,-40,QPen(QPen::darkBlue,2))); //A12
Lines.append(new Line(-50,-20,-30,-20,QPen(QPen::darkBlue,2))); //A21
Lines.append(new Line(-50,-10,-30,-10,QPen(QPen::darkBlue,2))); //A22
Lines.append(new Line(-50,-50,-30,-50,QPen(Qt::darkBlue,2))); //A11
Lines.append(new Line(-50,-40,-30,-40,QPen(Qt::darkBlue,2))); //A12
Lines.append(new Line(-50,-20,-30,-20,QPen(Qt::darkBlue,2))); //A21
Lines.append(new Line(-50,-10,-30,-10,QPen(Qt::darkBlue,2))); //A22
Lines.append(new Line(-50, 10, -30, 10,QPen(QPen::darkBlue,2))); //A31
Lines.append(new Line(-50, 20, -30, 20,QPen(QPen::darkBlue,2))); //A32
Lines.append(new Line(-50, 40, -30, 40,QPen(QPen::darkBlue,2))); //A41
Lines.append(new Line(-50, 50, -30, 50,QPen(QPen::darkBlue,2))); //A42
Lines.append(new Line( 30, 0, 50, 0,QPen(QPen::darkBlue,2))); //Y
Lines.append(new Line(-50, 10, -30, 10,QPen(Qt::darkBlue,2))); //A31
Lines.append(new Line(-50, 20, -30, 20,QPen(Qt::darkBlue,2))); //A32
Lines.append(new Line(-50, 40, -30, 40,QPen(Qt::darkBlue,2))); //A41
Lines.append(new Line(-50, 50, -30, 50,QPen(Qt::darkBlue,2))); //A42
Lines.append(new Line( 30, 0, 50, 0,QPen(Qt::darkBlue,2))); //Y
Texts.append(new Text( -20, -60, "&", QPen::darkBlue, 12.0));
Texts.append(new Text( -20, -30, "&", QPen::darkBlue, 12.0));
Texts.append(new Text( -20, 0, "&", QPen::darkBlue, 12.0));
Texts.append(new Text( -20, 30, "&", QPen::darkBlue, 12.0));
Texts.append(new Text( -20, -60, "&", Qt::darkBlue, 12.0));
Texts.append(new Text( -20, -30, "&", Qt::darkBlue, 12.0));
Texts.append(new Text( -20, 0, "&", Qt::darkBlue, 12.0));
Texts.append(new Text( -20, 30, "&", Qt::darkBlue, 12.0));
Lines.append(new Line( 7, -45, 17, -40,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 7, -35, 17, -40,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 7, -30, 17, -35,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 22, -30, 22, -45,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 7, -45, 17, -40,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 7, -35, 17, -40,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 7, -30, 17, -35,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 22, -30, 22, -45,QPen(Qt::darkBlue,2)));
Ports.append(new Port(-50,-50)); // A11

View File

@ -15,7 +15,7 @@
* any later version.
*
*/
#include <QtGui>
#include "andor4x3.h"
#include "node.h"
#include "main.h"
@ -57,43 +57,43 @@ Element * andor4x3::info(QString& Name, char * &BitmapFile, bool getNewOne)
void andor4x3::createSymbol()
{
Lines.append(new Line(-30, -60, 30,-60,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 30, -60, 30, 100,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 30, 100,-30,100,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 100,-30,-60,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, -60, 30,-60,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 30, -60, 30, 100,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 30, 100,-30,100,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30, 100,-30,-60,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30, -20, 0,-20,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 20, 0, 20,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 60, 0, 60,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0, -60, 0,100,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, -20, 0,-20,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30, 20, 0, 20,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30, 60, 0, 60,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0, -60, 0,100,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-50,-50,-30,-50,QPen(QPen::darkBlue,2))); //A11
Lines.append(new Line(-50,-40,-30,-40,QPen(QPen::darkBlue,2))); //A12
Lines.append(new Line(-50,-30,-30,-30,QPen(QPen::darkBlue,2))); //A13
Lines.append(new Line(-50,-50,-30,-50,QPen(Qt::darkBlue,2))); //A11
Lines.append(new Line(-50,-40,-30,-40,QPen(Qt::darkBlue,2))); //A12
Lines.append(new Line(-50,-30,-30,-30,QPen(Qt::darkBlue,2))); //A13
Lines.append(new Line(-50,-10,-30,-10,QPen(QPen::darkBlue,2))); //A21
Lines.append(new Line(-50, 0,-30, 0,QPen(QPen::darkBlue,2))); //A22
Lines.append(new Line(-50, 10,-30, 10,QPen(QPen::darkBlue,2))); //A23
Lines.append(new Line(-50,-10,-30,-10,QPen(Qt::darkBlue,2))); //A21
Lines.append(new Line(-50, 0,-30, 0,QPen(Qt::darkBlue,2))); //A22
Lines.append(new Line(-50, 10,-30, 10,QPen(Qt::darkBlue,2))); //A23
Lines.append(new Line(-50, 30, -30, 30,QPen(QPen::darkBlue,2))); //A31
Lines.append(new Line(-50, 40, -30, 40,QPen(QPen::darkBlue,2))); //A32
Lines.append(new Line(-50, 50,-30, 50,QPen(QPen::darkBlue,2))); //A33
Lines.append(new Line(-50, 30, -30, 30,QPen(Qt::darkBlue,2))); //A31
Lines.append(new Line(-50, 40, -30, 40,QPen(Qt::darkBlue,2))); //A32
Lines.append(new Line(-50, 50,-30, 50,QPen(Qt::darkBlue,2))); //A33
Lines.append(new Line(-50, 70, -30, 70,QPen(QPen::darkBlue,2))); //A41
Lines.append(new Line(-50, 80, -30, 80,QPen(QPen::darkBlue,2))); //A42
Lines.append(new Line(-50, 90,-30, 90,QPen(QPen::darkBlue,2))); //A43
Lines.append(new Line(-50, 70, -30, 70,QPen(Qt::darkBlue,2))); //A41
Lines.append(new Line(-50, 80, -30, 80,QPen(Qt::darkBlue,2))); //A42
Lines.append(new Line(-50, 90,-30, 90,QPen(Qt::darkBlue,2))); //A43
Lines.append(new Line( 30, 20, 50, 20,QPen(QPen::darkBlue,2))); //Y
Lines.append(new Line( 30, 20, 50, 20,QPen(Qt::darkBlue,2))); //Y
Texts.append(new Text( -20, -60, "&", QPen::darkBlue, 12.0));
Texts.append(new Text( -20, -20, "&", QPen::darkBlue, 12.0));
Texts.append(new Text( -20, 20, "&", QPen::darkBlue, 12.0));
Texts.append(new Text( -20, 60, "&", QPen::darkBlue, 12.0));
Texts.append(new Text( -20, -60, "&", Qt::darkBlue, 12.0));
Texts.append(new Text( -20, -20, "&", Qt::darkBlue, 12.0));
Texts.append(new Text( -20, 20, "&", Qt::darkBlue, 12.0));
Texts.append(new Text( -20, 60, "&", Qt::darkBlue, 12.0));
Lines.append(new Line( 7, -45, 17, -40,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 7, -35, 17, -40,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 7, -30, 17, -35,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 22, -30, 22, -45,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 7, -45, 17, -40,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 7, -35, 17, -40,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 7, -30, 17, -35,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 22, -30, 22, -45,QPen(Qt::darkBlue,2)));
Ports.append(new Port(-50,-50)); // A11
Ports.append(new Port(-50,-40)); // A12

View File

@ -15,7 +15,7 @@
* any later version.
*
*/
#include <QtGui>
#include "andor4x4.h"
#include "node.h"
#include "main.h"
@ -57,47 +57,47 @@ Element * andor4x4::info(QString& Name, char * &BitmapFile, bool getNewOne)
void andor4x4::createSymbol()
{
Lines.append(new Line(-30, -60, 30,-60,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 30, -60, 30, 140,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 30, 140,-30,140,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 140,-30,-60,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, -60, 30,-60,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 30, -60, 30, 140,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 30, 140,-30,140,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30, 140,-30,-60,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30, -10, 0,-10,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 40, 0, 40,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 90, 0, 90,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0, -60, 0,140,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, -10, 0,-10,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30, 40, 0, 40,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30, 90, 0, 90,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0, -60, 0,140,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-50,-50,-30,-50,QPen(QPen::darkBlue,2))); //A11
Lines.append(new Line(-50,-40,-30,-40,QPen(QPen::darkBlue,2))); //A12
Lines.append(new Line(-50,-30,-30,-30,QPen(QPen::darkBlue,2))); //A13
Lines.append(new Line(-50,-20,-30,-20,QPen(QPen::darkBlue,2))); //A14
Lines.append(new Line(-50,-50,-30,-50,QPen(Qt::darkBlue,2))); //A11
Lines.append(new Line(-50,-40,-30,-40,QPen(Qt::darkBlue,2))); //A12
Lines.append(new Line(-50,-30,-30,-30,QPen(Qt::darkBlue,2))); //A13
Lines.append(new Line(-50,-20,-30,-20,QPen(Qt::darkBlue,2))); //A14
Lines.append(new Line(-50, 0,-30, 0,QPen(QPen::darkBlue,2))); //A21
Lines.append(new Line(-50, 10,-30, 10,QPen(QPen::darkBlue,2))); //A22
Lines.append(new Line(-50, 20,-30, 20,QPen(QPen::darkBlue,2))); //A23
Lines.append(new Line(-50, 30,-30, 30,QPen(QPen::darkBlue,2))); //A24
Lines.append(new Line(-50, 0,-30, 0,QPen(Qt::darkBlue,2))); //A21
Lines.append(new Line(-50, 10,-30, 10,QPen(Qt::darkBlue,2))); //A22
Lines.append(new Line(-50, 20,-30, 20,QPen(Qt::darkBlue,2))); //A23
Lines.append(new Line(-50, 30,-30, 30,QPen(Qt::darkBlue,2))); //A24
Lines.append(new Line(-50, 50, -30, 50,QPen(QPen::darkBlue,2))); //A31
Lines.append(new Line(-50, 60, -30, 60,QPen(QPen::darkBlue,2))); //A32
Lines.append(new Line(-50, 70,-30, 70,QPen(QPen::darkBlue,2))); //A33
Lines.append(new Line(-50, 80, -30, 80,QPen(QPen::darkBlue,2))); //A34
Lines.append(new Line(-50, 50, -30, 50,QPen(Qt::darkBlue,2))); //A31
Lines.append(new Line(-50, 60, -30, 60,QPen(Qt::darkBlue,2))); //A32
Lines.append(new Line(-50, 70,-30, 70,QPen(Qt::darkBlue,2))); //A33
Lines.append(new Line(-50, 80, -30, 80,QPen(Qt::darkBlue,2))); //A34
Lines.append(new Line(-50, 100,-30,100,QPen(QPen::darkBlue,2))); //A41
Lines.append(new Line(-50, 110,-30,110,QPen(QPen::darkBlue,2))); //A42
Lines.append(new Line(-50, 120,-30,120,QPen(QPen::darkBlue,2))); //A43
Lines.append(new Line(-50, 130,-30,130,QPen(QPen::darkBlue,2))); //A44
Lines.append(new Line(-50, 100,-30,100,QPen(Qt::darkBlue,2))); //A41
Lines.append(new Line(-50, 110,-30,110,QPen(Qt::darkBlue,2))); //A42
Lines.append(new Line(-50, 120,-30,120,QPen(Qt::darkBlue,2))); //A43
Lines.append(new Line(-50, 130,-30,130,QPen(Qt::darkBlue,2))); //A44
Lines.append(new Line( 30, 40, 50, 40,QPen(QPen::darkBlue,2))); //Y
Lines.append(new Line( 30, 40, 50, 40,QPen(Qt::darkBlue,2))); //Y
Texts.append(new Text( -20, -60, "&", QPen::darkBlue, 12.0));
Texts.append(new Text( -20, -10, "&", QPen::darkBlue, 12.0));
Texts.append(new Text( -20, 40, "&", QPen::darkBlue, 12.0));
Texts.append(new Text( -20, 90, "&", QPen::darkBlue, 12.0));
Texts.append(new Text( -20, -60, "&", Qt::darkBlue, 12.0));
Texts.append(new Text( -20, -10, "&", Qt::darkBlue, 12.0));
Texts.append(new Text( -20, 40, "&", Qt::darkBlue, 12.0));
Texts.append(new Text( -20, 90, "&", Qt::darkBlue, 12.0));
Lines.append(new Line( 7, -45, 17, -40,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 7, -35, 17, -40,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 7, -30, 17, -35,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 22, -30, 22, -45,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 7, -45, 17, -40,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 7, -35, 17, -40,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 7, -30, 17, -35,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 22, -30, 22, -45,QPen(Qt::darkBlue,2)));
Ports.append(new Port(-50,-50)); // A11
Ports.append(new Port(-50,-40)); // A12

View File

@ -22,20 +22,20 @@ Attenuator::Attenuator()
{
Description = QObject::tr("attenuator");
Lines.append(new Line( -4, -6, -4, 6,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -4, -6, 4, -6,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 4, -6, 4, 6,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -4, 6, 4, 6,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0,-11, 0, -6,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0, 6, 0, 11,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -4, -6, -4, 6,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -4, -6, 4, -6,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 4, -6, 4, 6,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -4, 6, 4, 6,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0,-11, 0, -6,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0, 6, 0, 11,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-14,-14, 14,-14,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-14, 14, 14, 14,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-14,-14,-14, 14,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 14,-14, 14, 14,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-14,-14, 14,-14,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-14, 14, 14, 14,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-14,-14,-14, 14,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 14,-14, 14, 14,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30, 0,-14, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 14, 0, 30, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 0,-14, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 14, 0, 30, 0,QPen(Qt::darkBlue,2)));
Ports.append(new Port(-30, 0));
Ports.append(new Port( 30, 0));

View File

@ -22,23 +22,23 @@ BiasT::BiasT()
{
Description = QObject::tr("bias t");
Arcs.append(new Arc( -3, 2, 6, 6, 16*270, 16*180,QPen(QPen::darkBlue,1)));
Arcs.append(new Arc( -3, 8, 6, 6, 16*270, 16*180,QPen(QPen::darkBlue,1)));
Arcs.append(new Arc( -3, 14, 6, 6, 16*270, 16*180,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-22,-10, 22,-10,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-22,-10,-22, 22,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-22, 22, 22, 22,QPen(QPen::darkBlue,1)));
Lines.append(new Line( 22,-10, 22, 22,QPen(QPen::darkBlue,1)));
Arcs.append(new Arc( -3, 2, 6, 6, 16*270, 16*180,QPen(Qt::darkBlue,1)));
Arcs.append(new Arc( -3, 8, 6, 6, 16*270, 16*180,QPen(Qt::darkBlue,1)));
Arcs.append(new Arc( -3, 14, 6, 6, 16*270, 16*180,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-22,-10, 22,-10,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-22,-10,-22, 22,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-22, 22, 22, 22,QPen(Qt::darkBlue,1)));
Lines.append(new Line( 22,-10, 22, 22,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-13, -6,-13, 7,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -9, -6, -9, 7,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -9, 0, 22, 0,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-22, 0,-13, 0,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-30, 0,-22, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 22, 0, 30, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0, 0, 0, 2,QPen(QPen::darkBlue,1)));
Lines.append(new Line( 0, 20, 0, 22,QPen(QPen::darkBlue,1)));
Lines.append(new Line( 0, 22, 0, 30,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-13, -6,-13, 7,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -9, -6, -9, 7,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -9, 0, 22, 0,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-22, 0,-13, 0,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-30, 0,-22, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 22, 0, 30, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0, 0, 0, 2,QPen(Qt::darkBlue,1)));
Lines.append(new Line( 0, 20, 0, 22,QPen(Qt::darkBlue,1)));
Lines.append(new Line( 0, 22, 0, 30,QPen(Qt::darkBlue,2)));
Ports.append(new Port(-30, 0));
Ports.append(new Port( 30, 0));

View File

@ -15,7 +15,7 @@
* any later version.
*
*/
#include <QtGui>
#include "binarytogrey4bit.h"
#include "node.h"
#include "main.h"
@ -57,34 +57,34 @@ Element * binarytogrey4bit::info(QString& Name, char * &BitmapFile, bool getNewO
void binarytogrey4bit::createSymbol()
{
Lines.append(new Line(-30, -60, 30,-60,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 30, -60, 30, 40,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 30, 40,-30, 40,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 40,-30, -60,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, -60, 30,-60,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 30, -60, 30, 40,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 30, 40,-30, 40,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30, 40,-30, -60,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-50,-30,-30,-30,QPen(QPen::darkBlue,2))); // B0
Lines.append(new Line(-50,-10,-30,-10,QPen(QPen::darkBlue,2))); // B1
Lines.append(new Line(-50, 10,-30, 10,QPen(QPen::darkBlue,2))); // B2
Lines.append(new Line(-50, 30,-30, 30,QPen(QPen::darkBlue,2))); // B3
Lines.append(new Line(-50,-30,-30,-30,QPen(Qt::darkBlue,2))); // B0
Lines.append(new Line(-50,-10,-30,-10,QPen(Qt::darkBlue,2))); // B1
Lines.append(new Line(-50, 10,-30, 10,QPen(Qt::darkBlue,2))); // B2
Lines.append(new Line(-50, 30,-30, 30,QPen(Qt::darkBlue,2))); // B3
Lines.append(new Line( 30, 30, 50, 30,QPen(QPen::darkBlue,2))); // G3
Lines.append(new Line( 30, 10, 50, 10,QPen(QPen::darkBlue,2))); // G2
Lines.append(new Line( 30,-10, 50,-10,QPen(QPen::darkBlue,2))); // G1
Lines.append(new Line( 30,-30, 50,-30,QPen(QPen::darkBlue,2))); // G0
Lines.append(new Line( 30, 30, 50, 30,QPen(Qt::darkBlue,2))); // G3
Lines.append(new Line( 30, 10, 50, 10,QPen(Qt::darkBlue,2))); // G2
Lines.append(new Line( 30,-10, 50,-10,QPen(Qt::darkBlue,2))); // G1
Lines.append(new Line( 30,-30, 50,-30,QPen(Qt::darkBlue,2))); // G0
Texts.append(new Text(-16,-59, "B", QPen::darkBlue, 12.0));
Texts.append(new Text( -2,-59, "/", QPen::darkBlue, 12.0));
Texts.append(new Text( 5,-59, "G", QPen::darkBlue, 12.0));
Texts.append(new Text(-16,-59, "B", Qt::darkBlue, 12.0));
Texts.append(new Text( -2,-59, "/", Qt::darkBlue, 12.0));
Texts.append(new Text( 5,-59, "G", Qt::darkBlue, 12.0));
Texts.append(new Text(-25,-43, "0", QPen::darkBlue, 12.0));
Texts.append(new Text(-25,-23, "1", QPen::darkBlue, 12.0));
Texts.append(new Text(-25, -3, "2", QPen::darkBlue, 12.0));
Texts.append(new Text(-25, 17, "3", QPen::darkBlue, 12.0));
Texts.append(new Text(-25,-43, "0", Qt::darkBlue, 12.0));
Texts.append(new Text(-25,-23, "1", Qt::darkBlue, 12.0));
Texts.append(new Text(-25, -3, "2", Qt::darkBlue, 12.0));
Texts.append(new Text(-25, 17, "3", Qt::darkBlue, 12.0));
Texts.append(new Text( 15,-43, "0", QPen::darkBlue, 12.0));
Texts.append(new Text( 15,-23, "1", QPen::darkBlue, 12.0));
Texts.append(new Text( 15, -3, "2", QPen::darkBlue, 12.0));
Texts.append(new Text( 15, 17, "3", QPen::darkBlue, 12.0));
Texts.append(new Text( 15,-43, "0", Qt::darkBlue, 12.0));
Texts.append(new Text( 15,-23, "1", Qt::darkBlue, 12.0));
Texts.append(new Text( 15, -3, "2", Qt::darkBlue, 12.0));
Texts.append(new Text( 15, 17, "3", Qt::darkBlue, 12.0));
Ports.append(new Port(-50,-30)); // B0
Ports.append(new Port(-50,-10)); // B1

View File

@ -66,20 +66,20 @@ Element* BJT::info_pnp(QString& Name, char* &BitmapFile, bool getNewOne)
// -------------------------------------------------------
void BJT::createSymbol()
{
Lines.append(new Line(-10,-15,-10, 15,QPen(QPen::darkBlue,3)));
Lines.append(new Line(-30, 0,-10, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-10, -5, 0,-15,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0,-15, 0,-30,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-10, 5, 0, 15,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0, 15, 0, 30,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-10,-15,-10, 15,QPen(Qt::darkBlue,3)));
Lines.append(new Line(-30, 0,-10, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-10, -5, 0,-15,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0,-15, 0,-30,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-10, 5, 0, 15,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0, 15, 0, 30,QPen(Qt::darkBlue,2)));
if(Props.getFirst()->Value == "npn") {
Lines.append(new Line( -6, 15, 0, 15,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0, 9, 0, 15,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -6, 15, 0, 15,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0, 9, 0, 15,QPen(Qt::darkBlue,2)));
}
else {
Lines.append(new Line( -5, 10, -5, 16,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -5, 10, 1, 10,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -5, 10, -5, 16,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -5, 10, 1, 10,QPen(Qt::darkBlue,2)));
}
Ports.append(new Port(-30, 0));

View File

@ -167,23 +167,23 @@ Element* BJTsub::info_pnp(QString& Name, char* &BitmapFile, bool getNewOne)
// -------------------------------------------------------
void BJTsub::createSymbol()
{
Lines.append(new Line(-10,-15,-10, 15,QPen(QPen::darkBlue,3)));
Lines.append(new Line(-30, 0,-10, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-10, -5, 0,-15,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0,-15, 0,-30,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-10, 5, 0, 15,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0, 15, 0, 30,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-10,-15,-10, 15,QPen(Qt::darkBlue,3)));
Lines.append(new Line(-30, 0,-10, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-10, -5, 0,-15,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0,-15, 0,-30,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-10, 5, 0, 15,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0, 15, 0, 30,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 9, 0, 30, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 9, -7, 9, 7,QPen(QPen::darkBlue,3)));
Lines.append(new Line( 9, 0, 30, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 9, -7, 9, 7,QPen(Qt::darkBlue,3)));
if(Props.getFirst()->Value == "npn") {
Lines.append(new Line( -6, 15, 0, 15,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0, 9, 0, 15,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -6, 15, 0, 15,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0, 9, 0, 15,QPen(Qt::darkBlue,2)));
}
else {
Lines.append(new Line( -5, 10, -5, 16,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -5, 10, 1, 10,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -5, 10, -5, 16,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -5, 10, 1, 10,QPen(Qt::darkBlue,2)));
}
Ports.append(new Port(-30, 0));

View File

@ -22,12 +22,12 @@ BondWire::BondWire()
{
Description = QObject::tr("bond wire");
Lines.append(new Line(-30, 0,-8, 0,QPen(QPen::darkBlue,3)));
Lines.append(new Line( 30, 0, 8, 0,QPen(QPen::darkBlue,3)));
Lines.append(new Line(-30, 0,-8, 0,QPen(Qt::darkBlue,3)));
Lines.append(new Line( 30, 0, 8, 0,QPen(Qt::darkBlue,3)));
Arcs.append(new Arc(-11,-10, 22, 26, 16*30,16*120,QPen(QPen::darkBlue,1)));
Arcs.append(new Arc(-19,-13, 10, 13,16*205,16*130,QPen(QPen::darkBlue,1)));
Arcs.append(new Arc( 9,-13, 10, 13,16*205,16*130,QPen(QPen::darkBlue,1)));
Arcs.append(new Arc(-11,-10, 22, 26, 16*30,16*120,QPen(Qt::darkBlue,1)));
Arcs.append(new Arc(-19,-13, 10, 13,16*205,16*130,QPen(Qt::darkBlue,1)));
Arcs.append(new Arc( 9,-13, 10, 13,16*205,16*130,QPen(Qt::darkBlue,1)));
Ports.append(new Port(-30, 0));
Ports.append(new Port( 30, 0));

View File

@ -53,18 +53,18 @@ Element* Capacitor::info(QString& Name, char* &BitmapFile, bool getNewOne)
void Capacitor::createSymbol()
{
if(Props.getLast()->Value.at(0) == 'n') {
Lines.append(new Line( -4,-11, -4, 11,QPen(QPen::darkBlue,4)));
Lines.append(new Line( 4,-11, 4, 11,QPen(QPen::darkBlue,4)));
Lines.append(new Line( -4,-11, -4, 11,QPen(Qt::darkBlue,4)));
Lines.append(new Line( 4,-11, 4, 11,QPen(Qt::darkBlue,4)));
}
else {
Lines.append(new Line(-11, -5,-11,-11,QPen(QPen::red,1)));
Lines.append(new Line(-14, -8, -8, -8,QPen(QPen::red,1)));
Lines.append(new Line( -4,-11, -4, 11,QPen(QPen::darkBlue,3)));
Arcs.append(new Arc(4,-12, 20, 24, 16*122, 16*116,QPen(QPen::darkBlue,3)));
Lines.append(new Line(-11, -5,-11,-11,QPen(Qt::red,1)));
Lines.append(new Line(-14, -8, -8, -8,QPen(Qt::red,1)));
Lines.append(new Line( -4,-11, -4, 11,QPen(Qt::darkBlue,3)));
Arcs.append(new Arc(4,-12, 20, 24, 16*122, 16*116,QPen(Qt::darkBlue,3)));
}
Lines.append(new Line(-30, 0, -4, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 4, 0, 30, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 0, -4, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 4, 0, 30, 0,QPen(Qt::darkBlue,2)));
Ports.append(new Port(-30, 0));
Ports.append(new Port( 30, 0));

View File

@ -22,27 +22,27 @@ CCCS::CCCS()
{
Description = QObject::tr("current controlled current source");
Arcs.append(new Arc(0,-11, 22, 22, 0, 16*360,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 11, -7, 11, 7,QPen(QPen::darkBlue,3)));
Lines.append(new Line( 11, 6, 15, 1,QPen(QPen::darkBlue,3)));
Lines.append(new Line( 11, 6, 7, 1,QPen(QPen::darkBlue,3)));
Arcs.append(new Arc(0,-11, 22, 22, 0, 16*360,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 11, -7, 11, 7,QPen(Qt::darkBlue,3)));
Lines.append(new Line( 11, 6, 15, 1,QPen(Qt::darkBlue,3)));
Lines.append(new Line( 11, 6, 7, 1,QPen(Qt::darkBlue,3)));
Lines.append(new Line(-30,-30,-12,-30,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 30,-12, 30,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 11,-30, 30,-30,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 11, 30, 30, 30,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30,-30,-12,-30,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30, 30,-12, 30,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 11,-30, 30,-30,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 11, 30, 30, 30,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-12,-30,-12, 30,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 11,-30, 11,-11,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 11, 30, 11, 11,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-12,-30,-12, 30,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 11,-30, 11,-11,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 11, 30, 11, 11,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-12, 20,-17, 11,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-12, 20, -8, 11,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-12, 20,-17, 11,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-12, 20, -8, 11,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-25,-27, 25,-27,QPen(QPen::darkGray,1)));
Lines.append(new Line( 25,-27, 25, 27,QPen(QPen::darkGray,1)));
Lines.append(new Line( 25, 27,-25, 27,QPen(QPen::darkGray,1)));
Lines.append(new Line(-25, 27,-25,-27,QPen(QPen::darkGray,1)));
Lines.append(new Line(-25,-27, 25,-27,QPen(Qt::darkGray,1)));
Lines.append(new Line( 25,-27, 25, 27,QPen(Qt::darkGray,1)));
Lines.append(new Line( 25, 27,-25, 27,QPen(Qt::darkGray,1)));
Lines.append(new Line(-25, 27,-25,-27,QPen(Qt::darkGray,1)));
Ports.append(new Port(-30,-30));
Ports.append(new Port( 30,-30));

View File

@ -22,28 +22,28 @@ CCVS::CCVS()
{
Description = QObject::tr("current controlled voltage source");
Arcs.append(new Arc(0,-11, 22, 22, 0, 16*360,QPen(QPen::darkBlue,2)));
Arcs.append(new Arc(0,-11, 22, 22, 0, 16*360,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30,-30,-12,-30,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 30,-12, 30,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 11,-30, 30,-30,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 11, 30, 30, 30,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30,-30,-12,-30,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30, 30,-12, 30,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 11,-30, 30,-30,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 11, 30, 30, 30,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-12,-30,-12, 30,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 11,-30, 11,-11,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 11, 30, 11, 11,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-12,-30,-12, 30,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 11,-30, 11,-11,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 11, 30, 11, 11,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-12, 20,-17, 11,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-12, 20, -8, 11,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-12, 20,-17, 11,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-12, 20, -8, 11,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 19,-21, 19,-15,QPen(QPen::red,1)));
Lines.append(new Line( 16,-18, 22,-18,QPen(QPen::red,1)));
Lines.append(new Line( 16, 18, 22, 18,QPen(QPen::black,1)));
Lines.append(new Line( 19,-21, 19,-15,QPen(Qt::red,1)));
Lines.append(new Line( 16,-18, 22,-18,QPen(Qt::red,1)));
Lines.append(new Line( 16, 18, 22, 18,QPen(Qt::black,1)));
Lines.append(new Line(-25,-27, 25,-27,QPen(QPen::darkGray,1)));
Lines.append(new Line( 25,-27, 25, 27,QPen(QPen::darkGray,1)));
Lines.append(new Line( 25, 27,-25, 27,QPen(QPen::darkGray,1)));
Lines.append(new Line(-25, 27,-25,-27,QPen(QPen::darkGray,1)));
Lines.append(new Line(-25,-27, 25,-27,QPen(Qt::darkGray,1)));
Lines.append(new Line( 25,-27, 25, 27,QPen(Qt::darkGray,1)));
Lines.append(new Line( 25, 27,-25, 27,QPen(Qt::darkGray,1)));
Lines.append(new Line(-25, 27,-25,-27,QPen(Qt::darkGray,1)));
Ports.append(new Port(-30,-30));
Ports.append(new Port( 30,-30));

View File

@ -14,7 +14,7 @@
* (at your option) any later version. *
* *
***************************************************************************/
#include <QtGui>
#include "circulator.h"
#include "main.h"
@ -23,16 +23,16 @@ Circulator::Circulator()
{
Description = QObject::tr("circulator");
Arcs.append(new Arc(-14,-14, 28, 28, 0,16*360,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 0,-14, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 30, 0, 14, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0, 14, 0, 30,QPen(QPen::darkBlue,2)));
Arcs.append(new Arc(-14,-14, 28, 28, 0,16*360,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30, 0,-14, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 30, 0, 14, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0, 14, 0, 30,QPen(Qt::darkBlue,2)));
Arcs.append(new Arc( -8, -6, 16, 16,16*20,16*150,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 8, 0, 9, -7,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 8, 0, 2, -1,QPen(QPen::darkBlue,2)));
Arcs.append(new Arc( -8, -6, 16, 16,16*20,16*150,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 8, 0, 9, -7,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 8, 0, 2, -1,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-22, -4,-26, 4,QPen(QPen::darkBlue,2))); // marks port 1
Lines.append(new Line(-22, -4,-26, 4,QPen(Qt::darkBlue,2))); // marks port 1
Ports.append(new Port(-30, 0));
Ports.append(new Port( 30, 0));

View File

@ -22,13 +22,13 @@ CoaxialLine::CoaxialLine()
{
Description = QObject::tr("coaxial transmission line");
Arcs.append(new Arc(-20, -9, 8, 18, 0, 16*360,QPen(QPen::darkBlue,2)));
Arcs.append(new Arc( 11, -9, 8, 18,16*270, 16*180,QPen(QPen::darkBlue,2)));
Arcs.append(new Arc(-20, -9, 8, 18, 0, 16*360,QPen(Qt::darkBlue,2)));
Arcs.append(new Arc( 11, -9, 8, 18,16*270, 16*180,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30, 0,-16, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 19, 0, 30, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-16, -9, 16, -9,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-16, 9, 16, 9,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 0,-16, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 19, 0, 30, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-16, -9, 16, -9,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-16, 9, 16, 9,QPen(Qt::darkBlue,2)));
Ports.append(new Port(-30, 0));
Ports.append(new Port( 30, 0));

View File

@ -15,7 +15,7 @@
* any later version.
*
*/
#include <QtGui>
#include "comp_1bit.h"
#include "node.h"
#include "main.h"
@ -57,24 +57,24 @@ Element * comp_1bit::info(QString& Name, char * &BitmapFile, bool getNewOne)
void comp_1bit::createSymbol()
{
Lines.append(new Line(-30, -60, 30,-60,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 30, -60, 30, 30,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 30, 30,-30, 30,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 30,-30, -60,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, -60, 30,-60,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 30, -60, 30, 30,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 30, 30,-30, 30,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30, 30,-30, -60,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-50,-10,-30,-10,QPen(QPen::darkBlue,2))); // X
Lines.append(new Line(-50, 10,-30, 10,QPen(QPen::darkBlue,2))); // Y
Lines.append(new Line( 30, 20, 50, 20,QPen(QPen::darkBlue,2))); // L
Lines.append(new Line( 30, 0, 50, 0,QPen(QPen::darkBlue,2))); // G
Lines.append(new Line( 30,-20, 50,-20,QPen(QPen::darkBlue,2))); // E
Lines.append(new Line(-50,-10,-30,-10,QPen(Qt::darkBlue,2))); // X
Lines.append(new Line(-50, 10,-30, 10,QPen(Qt::darkBlue,2))); // Y
Lines.append(new Line( 30, 20, 50, 20,QPen(Qt::darkBlue,2))); // L
Lines.append(new Line( 30, 0, 50, 0,QPen(Qt::darkBlue,2))); // G
Lines.append(new Line( 30,-20, 50,-20,QPen(Qt::darkBlue,2))); // E
Texts.append(new Text(-25,-55, "COMP", QPen::darkBlue, 12.0));
Texts.append(new Text(-25,-55, "COMP", Qt::darkBlue, 12.0));
Texts.append(new Text(-25,-23, "X", QPen::darkBlue, 12.0));
Texts.append(new Text(-25, -3, "Y", QPen::darkBlue, 12.0));
Texts.append(new Text( -5, 7, "X<Y", QPen::darkBlue, 12.0));
Texts.append(new Text( -5,-13, "X>Y", QPen::darkBlue, 12.0));
Texts.append(new Text( -5,-33, "X=Y", QPen::darkBlue, 12.0));
Texts.append(new Text(-25,-23, "X", Qt::darkBlue, 12.0));
Texts.append(new Text(-25, -3, "Y", Qt::darkBlue, 12.0));
Texts.append(new Text( -5, 7, "X<Y", Qt::darkBlue, 12.0));
Texts.append(new Text( -5,-13, "X>Y", Qt::darkBlue, 12.0));
Texts.append(new Text( -5,-33, "X=Y", Qt::darkBlue, 12.0));
Ports.append(new Port(-50,-10)); // X
Ports.append(new Port(-50, 10)); // Y

View File

@ -15,7 +15,7 @@
* any later version.
*
*/
#include <QtGui>
#include "comp_2bit.h"
#include "node.h"
#include "main.h"
@ -57,32 +57,32 @@ Element * comp_2bit::info(QString& Name, char * &BitmapFile, bool getNewOne)
void comp_2bit::createSymbol()
{
Lines.append(new Line(-40, -50, 40,-50,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 40, -50, 40, 60,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 40, 60,-40, 60,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-40, 60,-40, -50,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-40, -50, 40,-50,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 40, -50, 40, 60,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 40, 60,-40, 60,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-40, 60,-40, -50,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-60,-10,-40,-10,QPen(QPen::darkBlue,2))); // X0
Lines.append(new Line(-60, 10,-40, 10,QPen(QPen::darkBlue,2))); // X1
Lines.append(new Line(-60, 30,-40, 30,QPen(QPen::darkBlue,2))); // Y0
Lines.append(new Line(-60, 50,-40, 50,QPen(QPen::darkBlue,2))); // Y1
Lines.append(new Line( 40, 30, 60, 30,QPen(QPen::darkBlue,2))); // L
Lines.append(new Line( 40, 10, 60, 10,QPen(QPen::darkBlue,2))); // G
Lines.append(new Line( 40,-10, 60,-10,QPen(QPen::darkBlue,2))); // E
Lines.append(new Line(-60,-10,-40,-10,QPen(Qt::darkBlue,2))); // X0
Lines.append(new Line(-60, 10,-40, 10,QPen(Qt::darkBlue,2))); // X1
Lines.append(new Line(-60, 30,-40, 30,QPen(Qt::darkBlue,2))); // Y0
Lines.append(new Line(-60, 50,-40, 50,QPen(Qt::darkBlue,2))); // Y1
Lines.append(new Line( 40, 30, 60, 30,QPen(Qt::darkBlue,2))); // L
Lines.append(new Line( 40, 10, 60, 10,QPen(Qt::darkBlue,2))); // G
Lines.append(new Line( 40,-10, 60,-10,QPen(Qt::darkBlue,2))); // E
Texts.append(new Text(-25,-45, "COMP", QPen::darkBlue, 12.0));
Texts.append(new Text(-25,-45, "COMP", Qt::darkBlue, 12.0));
Texts.append(new Text(-25,-20, "{", QPen::darkBlue, 16.0));
Texts.append(new Text(-15,-15, "X", QPen::darkBlue, 12.0));
Texts.append(new Text(-35,-23, "0", QPen::darkBlue, 12.0));
Texts.append(new Text(-35, -3, "1", QPen::darkBlue, 12.0));
Texts.append(new Text(-25, 22, "{", QPen::darkBlue, 16.0));
Texts.append(new Text(-15, 27, "Y", QPen::darkBlue, 12.0));
Texts.append(new Text(-35, 17, "0", QPen::darkBlue, 12.0));
Texts.append(new Text(-35, 37, "1", QPen::darkBlue, 12.0));
Texts.append(new Text( 5, 17, "X<Y", QPen::darkBlue, 12.0));
Texts.append(new Text( 5, -3, "X>Y", QPen::darkBlue, 12.0));
Texts.append(new Text( 5,-23, "X=Y", QPen::darkBlue, 12.0));
Texts.append(new Text(-25,-20, "{", Qt::darkBlue, 16.0));
Texts.append(new Text(-15,-15, "X", Qt::darkBlue, 12.0));
Texts.append(new Text(-35,-23, "0", Qt::darkBlue, 12.0));
Texts.append(new Text(-35, -3, "1", Qt::darkBlue, 12.0));
Texts.append(new Text(-25, 22, "{", Qt::darkBlue, 16.0));
Texts.append(new Text(-15, 27, "Y", Qt::darkBlue, 12.0));
Texts.append(new Text(-35, 17, "0", Qt::darkBlue, 12.0));
Texts.append(new Text(-35, 37, "1", Qt::darkBlue, 12.0));
Texts.append(new Text( 5, 17, "X<Y", Qt::darkBlue, 12.0));
Texts.append(new Text( 5, -3, "X>Y", Qt::darkBlue, 12.0));
Texts.append(new Text( 5,-23, "X=Y", Qt::darkBlue, 12.0));
Ports.append(new Port(-60,-10)); // X0
Ports.append(new Port(-60, 10)); // X1

View File

@ -15,7 +15,7 @@
* any later version.
*
*/
#include <QtGui>
#include "comp_4bit.h"
#include "node.h"
#include "main.h"
@ -57,40 +57,40 @@ Element * comp_4bit::info(QString& Name, char * &BitmapFile, bool getNewOne)
void comp_4bit::createSymbol()
{
Lines.append(new Line(-40, -90, 40,-90,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 40, -90, 40,100,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 40, 100,-40,100,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-40, 100,-40,-90,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-40, -90, 40,-90,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 40, -90, 40,100,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 40, 100,-40,100,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-40, 100,-40,-90,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-60,-50,-40,-50,QPen(QPen::darkBlue,2))); // X0
Lines.append(new Line(-60,-30,-40,-30,QPen(QPen::darkBlue,2))); // X1
Lines.append(new Line(-60,-10,-40,-10,QPen(QPen::darkBlue,2))); // X2
Lines.append(new Line(-60, 10,-40, 10,QPen(QPen::darkBlue,2))); // X3
Lines.append(new Line(-60, 30,-40, 30,QPen(QPen::darkBlue,2))); // Y0
Lines.append(new Line(-60, 50,-40, 50,QPen(QPen::darkBlue,2))); // Y1
Lines.append(new Line(-60, 70,-40, 70,QPen(QPen::darkBlue,2))); // Y2
Lines.append(new Line(-60, 90,-40, 90,QPen(QPen::darkBlue,2))); // Y3
Lines.append(new Line( 40, 30, 60, 30,QPen(QPen::darkBlue,2))); // L
Lines.append(new Line( 40, 10, 60, 10,QPen(QPen::darkBlue,2))); // G
Lines.append(new Line( 40,-10, 60,-10,QPen(QPen::darkBlue,2))); // E
Lines.append(new Line(-60,-50,-40,-50,QPen(Qt::darkBlue,2))); // X0
Lines.append(new Line(-60,-30,-40,-30,QPen(Qt::darkBlue,2))); // X1
Lines.append(new Line(-60,-10,-40,-10,QPen(Qt::darkBlue,2))); // X2
Lines.append(new Line(-60, 10,-40, 10,QPen(Qt::darkBlue,2))); // X3
Lines.append(new Line(-60, 30,-40, 30,QPen(Qt::darkBlue,2))); // Y0
Lines.append(new Line(-60, 50,-40, 50,QPen(Qt::darkBlue,2))); // Y1
Lines.append(new Line(-60, 70,-40, 70,QPen(Qt::darkBlue,2))); // Y2
Lines.append(new Line(-60, 90,-40, 90,QPen(Qt::darkBlue,2))); // Y3
Lines.append(new Line( 40, 30, 60, 30,QPen(Qt::darkBlue,2))); // L
Lines.append(new Line( 40, 10, 60, 10,QPen(Qt::darkBlue,2))); // G
Lines.append(new Line( 40,-10, 60,-10,QPen(Qt::darkBlue,2))); // E
Texts.append(new Text(-25,-85, "COMP", QPen::darkBlue, 12.0));
Texts.append(new Text(-25,-85, "COMP", Qt::darkBlue, 12.0));
Texts.append(new Text(-25,-40, "{", QPen::darkBlue, 16.0));
Texts.append(new Text(-15,-35, "X", QPen::darkBlue, 12.0));
Texts.append(new Text(-35,-63, "0", QPen::darkBlue, 12.0));
Texts.append(new Text(-35,-43, "1", QPen::darkBlue, 12.0));
Texts.append(new Text(-35,-23, "2", QPen::darkBlue, 12.0));
Texts.append(new Text(-35, -3, "3", QPen::darkBlue, 12.0));
Texts.append(new Text(-25, 42, "{", QPen::darkBlue, 16.0));
Texts.append(new Text(-15, 47, "Y", QPen::darkBlue, 12.0));
Texts.append(new Text(-35, 17, "0", QPen::darkBlue, 12.0));
Texts.append(new Text(-35, 37, "1", QPen::darkBlue, 12.0));
Texts.append(new Text(-35, 57, "2", QPen::darkBlue, 12.0));
Texts.append(new Text(-35, 77, "3", QPen::darkBlue, 12.0));
Texts.append(new Text( 5, 17, "X<Y", QPen::darkBlue, 12.0));
Texts.append(new Text( 5, -3, "X>Y", QPen::darkBlue, 12.0));
Texts.append(new Text( 5,-23, "X=Y", QPen::darkBlue, 12.0));
Texts.append(new Text(-25,-40, "{", Qt::darkBlue, 16.0));
Texts.append(new Text(-15,-35, "X", Qt::darkBlue, 12.0));
Texts.append(new Text(-35,-63, "0", Qt::darkBlue, 12.0));
Texts.append(new Text(-35,-43, "1", Qt::darkBlue, 12.0));
Texts.append(new Text(-35,-23, "2", Qt::darkBlue, 12.0));
Texts.append(new Text(-35, -3, "3", Qt::darkBlue, 12.0));
Texts.append(new Text(-25, 42, "{", Qt::darkBlue, 16.0));
Texts.append(new Text(-15, 47, "Y", Qt::darkBlue, 12.0));
Texts.append(new Text(-35, 17, "0", Qt::darkBlue, 12.0));
Texts.append(new Text(-35, 37, "1", Qt::darkBlue, 12.0));
Texts.append(new Text(-35, 57, "2", Qt::darkBlue, 12.0));
Texts.append(new Text(-35, 77, "3", Qt::darkBlue, 12.0));
Texts.append(new Text( 5, 17, "X<Y", Qt::darkBlue, 12.0));
Texts.append(new Text( 5, -3, "X>Y", Qt::darkBlue, 12.0));
Texts.append(new Text( 5,-23, "X=Y", Qt::darkBlue, 12.0));
Ports.append(new Port(-60,-50)); // X0
Ports.append(new Port(-60,-30)); // X1

View File

@ -14,7 +14,7 @@
* (at your option) any later version. *
* *
***************************************************************************/
#include <QtGui>
#include <stdlib.h>
#include <qdir.h>
@ -25,7 +25,7 @@
#include <qtabwidget.h>
#include <qmessagebox.h>
#include <qdom.h>
#include <qdict.h>
#include <q3dict.h>
#include "components.h"
#include "node.h"
@ -195,12 +195,12 @@ void Component::paint(ViewPainter *p)
p->Painter->setFont(newFont);
p->map(cx, cy, x, y);
p->Painter->setPen(QPen(QPen::darkBlue,2));
p->Painter->setPen(QPen(Qt::darkBlue,2));
a = b = 0;
QRect r, t;
for(pt = Texts.first(); pt != 0; pt = Texts.next()) {
t.setRect(x, y+b, 0, 0);
p->Painter->drawText(t, Qt::AlignLeft|Qt::DontClip, pt->s, -1, &r);
p->Painter->drawText(t, Qt::AlignLeft|Qt::TextDontClip, pt->s, -1, &r);
b += r.height();
if(a < r.width()) a = r.width();
}
@ -247,14 +247,14 @@ void Component::paint(ViewPainter *p)
p->Painter->setBrush(pa->Brush);
p->drawEllipse(cx+pa->x, cy+pa->y, pa->w, pa->h);
}
p->Painter->setBrush(QBrush::NoBrush);
p->Painter->setBrush(Qt::NoBrush);
newFont.setWeight(QFont::Light);
QWMatrix wm = p->Painter->worldMatrix();
QMatrix wm = p->Painter->worldMatrix();
// write all text
for(pt = Texts.first(); pt != 0; pt = Texts.next()) {
p->Painter->setWorldMatrix(
QWMatrix(pt->mCos, -pt->mSin, pt->mSin, pt->mCos,
QMatrix(pt->mCos, -pt->mSin, pt->mSin, pt->mCos,
p->DX + float(cx+pt->x) * p->Scale,
p->DY + float(cy+pt->y) * p->Scale));
newFont.setPointSizeFloat(p->Scale * pt->Size);
@ -263,7 +263,7 @@ void Component::paint(ViewPainter *p)
p->Painter->setFont(newFont);
p->Painter->setPen(pt->Color);
if (0) {
p->Painter->drawText(0, 0, 0, 0, Qt::AlignLeft|Qt::DontClip, pt->s);
p->Painter->drawText(0, 0, 0, 0, Qt::AlignLeft|Qt::TextDontClip, pt->s);
} else {
int w, h;
w = p->drawTextMapped (pt->s, 0, 0, &h);
@ -276,23 +276,23 @@ void Component::paint(ViewPainter *p)
// restore old font
p->Painter->setFont(f);
p->Painter->setPen(QPen(QPen::black,1));
p->Painter->setPen(QPen(Qt::black,1));
p->map(cx+tx, cy+ty, x, y);
if(showName) {
p->Painter->drawText(x, y, 0, 0, Qt::DontClip, Name);
p->Painter->drawText(x, y, 0, 0, Qt::TextDontClip, Name);
y += p->LineSpacing;
}
// write all properties
for(Property *p4 = Props.first(); p4 != 0; p4 = Props.next())
if(p4->display) {
p->Painter->drawText(x, y, 0, 0, Qt::DontClip, p4->Name+"="+p4->Value);
p->Painter->drawText(x, y, 0, 0, Qt::TextDontClip, p4->Name+"="+p4->Value);
y += p->LineSpacing;
}
if(isActive == COMP_IS_OPEN)
p->Painter->setPen(QPen(QPen::red,0));
p->Painter->setPen(QPen(Qt::red,0));
else if(isActive & COMP_IS_SHORTEN)
p->Painter->setPen(QPen(QPen::darkGreen,0));
p->Painter->setPen(QPen(Qt::darkGreen,0));
if(isActive != COMP_IS_ACTIVE) {
p->drawRect(cx+x1, cy+y1, x2-x1+1, y2-y1+1);
p->drawLine(cx+x1, cy+y1, cx+x2, cy+y2);
@ -300,7 +300,7 @@ void Component::paint(ViewPainter *p)
}
if(isSelected) {
p->Painter->setPen(QPen(QPen::darkGray,3));
p->Painter->setPen(QPen(Qt::darkGray,3));
p->drawRoundRect(cx+x1, cy+y1, x2-x1, y2-y1);
}
}
@ -792,7 +792,7 @@ bool Component::load(const QString& _s)
tx = ttx; ty = tty; // restore text position (was changed by rotate/mirror)
unsigned int z=0, counts = s.contains('"');
unsigned int z=0, counts = s.count('"');
if(Model == "Sub")
tmp = 2; // first property (File) already exists
else if(Model == "Lib")
@ -1180,7 +1180,7 @@ bool Component::getBrush(const QString& s, QBrush& Brush, int i)
i++;
n = s.section(' ',i,i); // filled
if(n.toInt(&ok) == 0) Brush.setStyle(QBrush::NoBrush);
if(n.toInt(&ok) == 0) Brush.setStyle(Qt::NoBrush);
if(!ok) return false;
return true;
@ -1432,29 +1432,29 @@ void GateComponent::createSymbol()
if(Props.getLast()->Value.at(0) == 'D') { // DIN symbol
xl = -15;
xr = 15;
Lines.append(new Line( 15,-y, 15, y,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-15,-y, 15,-y,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-15, y, 15, y,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-15,-y,-15, y,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 15, 0, 30, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 15,-y, 15, y,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-15,-y, 15,-y,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-15, y, 15, y,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-15,-y,-15, y,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 15, 0, 30, 0,QPen(Qt::darkBlue,2)));
if(Model.at(z) == 'O') {
Lines.append(new Line(-11, 6-y,-6, 9-y,QPen(QPen::darkBlue,0)));
Lines.append(new Line(-11,12-y,-6, 9-y,QPen(QPen::darkBlue,0)));
Lines.append(new Line(-11,14-y,-6,14-y,QPen(QPen::darkBlue,0)));
Lines.append(new Line(-11,16-y,-6,16-y,QPen(QPen::darkBlue,0)));
Texts.append(new Text( -4, 3-y, "1", QPen::darkBlue, 15.0));
Lines.append(new Line(-11, 6-y,-6, 9-y,QPen(Qt::darkBlue,0)));
Lines.append(new Line(-11,12-y,-6, 9-y,QPen(Qt::darkBlue,0)));
Lines.append(new Line(-11,14-y,-6,14-y,QPen(Qt::darkBlue,0)));
Lines.append(new Line(-11,16-y,-6,16-y,QPen(Qt::darkBlue,0)));
Texts.append(new Text( -4, 3-y, "1", Qt::darkBlue, 15.0));
}
else if(Model.at(z) == 'A')
Texts.append(new Text( -10, 3-y, "&", QPen::darkBlue, 15.0));
Texts.append(new Text( -10, 3-y, "&", Qt::darkBlue, 15.0));
else if(Model.at(0) == 'X') {
if(Model.at(1) == 'N') {
Ellips.append(new Area(xr,-4, 8, 8,
QPen(QPen::darkBlue,0), QBrush(QPen::darkBlue)));
Texts.append(new Text( -11, 3-y, "=1", QPen::darkBlue, 15.0));
QPen(Qt::darkBlue,0), QBrush(Qt::darkBlue)));
Texts.append(new Text( -11, 3-y, "=1", Qt::darkBlue, 15.0));
}
else
Texts.append(new Text( -11, 3-y, "=1", QPen::darkBlue, 15.0));
Texts.append(new Text( -11, 3-y, "=1", Qt::darkBlue, 15.0));
}
}
else { // old symbol
@ -1462,28 +1462,28 @@ void GateComponent::createSymbol()
if(Model.at(z) == 'O') xl = 10;
else xl = -10;
xr = 10;
Lines.append(new Line(-10,-y,-10, y,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 10, 0, 30, 0,QPen(QPen::darkBlue,2)));
Arcs.append(new Arc(-30,-y, 40, 30, 0, 16*90,QPen(QPen::darkBlue,2)));
Arcs.append(new Arc(-30,y-30, 40, 30, 0,-16*90,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 10,15-y, 10, y-15,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-10,-y,-10, y,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 10, 0, 30, 0,QPen(Qt::darkBlue,2)));
Arcs.append(new Arc(-30,-y, 40, 30, 0, 16*90,QPen(Qt::darkBlue,2)));
Arcs.append(new Arc(-30,y-30, 40, 30, 0,-16*90,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 10,15-y, 10, y-15,QPen(Qt::darkBlue,2)));
if(Model.at(0) == 'X') {
Lines.append(new Line(-5, 0, 5, 0,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-5, 0, 5, 0,QPen(Qt::darkBlue,1)));
if(Model.at(1) == 'N') {
Lines.append(new Line(-5,-3, 5,-3,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-5, 3, 5, 3,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-5,-3, 5,-3,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-5, 3, 5, 3,QPen(Qt::darkBlue,1)));
}
else {
Arcs.append(new Arc(-5,-5, 10, 10, 0, 16*360,QPen(QPen::darkBlue,1)));
Lines.append(new Line( 0,-5, 0, 5,QPen(QPen::darkBlue,1)));
Arcs.append(new Arc(-5,-5, 10, 10, 0, 16*360,QPen(Qt::darkBlue,1)));
Lines.append(new Line( 0,-5, 0, 5,QPen(Qt::darkBlue,1)));
}
}
}
if(Model.at(0) == 'N')
Ellips.append(new Area(xr,-4, 8, 8,
QPen(QPen::darkBlue,0), QBrush(QPen::darkBlue)));
QPen(Qt::darkBlue,0), QBrush(Qt::darkBlue)));
Ports.append(new Port( 30, 0));
y += 10;
@ -1491,10 +1491,10 @@ void GateComponent::createSymbol()
y -= 20;
Ports.append(new Port(-30, y));
if(xl == 10) if((z == 0) || (z == Num-1)) {
Lines.append(new Line(-30, y, 9, y,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, y, 9, y,QPen(Qt::darkBlue,2)));
continue;
}
Lines.append(new Line(-30, y, xl, y,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, y, xl, y,QPen(Qt::darkBlue,2)));
}
}

View File

@ -18,7 +18,7 @@
#ifndef COMPONENT_H
#define COMPONENT_H
#include <qptrlist.h>
#include <q3ptrlist.h>
#include <qpen.h>
#include <qpoint.h>
#include <qwidget.h>
@ -62,12 +62,12 @@ public:
virtual QString getSubcircuitFile() { return ""; }
QPtrList<Line> Lines;
QPtrList<struct Arc> Arcs;
QPtrList<Area> Rects, Ellips;
QPtrList<Port> Ports;
QPtrList<Text> Texts;
QPtrList<Property> Props;
Q3PtrList<Line> Lines;
Q3PtrList<struct Arc> Arcs;
Q3PtrList<Area> Rects, Ellips;
Q3PtrList<Port> Ports;
Q3PtrList<Text> Texts;
Q3PtrList<Property> Props;
#define COMP_IS_OPEN 0
#define COMP_IS_ACTIVE 1

View File

@ -14,19 +14,24 @@
* (at your option) any later version. *
* *
***************************************************************************/
#include <QtGui>
#include "componentdialog.h"
#include "main.h"
#include "qucs.h"
//Added by qt3to4:
#include <q3button.h>
#include <QLabel>
#include <Q3GridLayout>
#include <Q3VBoxLayout>
#include "schematic.h"
#include <qhbox.h>
#include <qvbox.h>
#include <q3hbox.h>
#include <q3vbox.h>
#include <qlayout.h>
#include <qhgroupbox.h>
#include <q3hgroupbox.h>
#include <qvalidator.h>
#include <qtabwidget.h>
#include <qfiledialog.h>
#include <q3filedialog.h>
#include <math.h>
@ -40,8 +45,8 @@ ComponentDialog::ComponentDialog(Component *c, Schematic *d)
Doc = d;
QString s;
all = new QVBoxLayout(this); // to provide neccessary size
QGridLayout *gp1;
all = new Q3VBoxLayout(this); // to provide neccessary size
Q3GridLayout *gp1;
QWidget *myParent = this;
ValInteger = new QIntValidator(1, 1000000, this);
@ -66,7 +71,7 @@ ComponentDialog::ComponentDialog(Component *c, Schematic *d)
QWidget *Tab1 = new QWidget(t);
t->addTab(Tab1, tr("Sweep"));
QGridLayout *gp = new QGridLayout(Tab1, 9,3,5,5);
Q3GridLayout *gp = new Q3GridLayout(Tab1, 9,3,5,5);
gp->addMultiCellWidget(new QLabel(Comp->Description, Tab1), 0,0,0,1);
@ -228,11 +233,11 @@ ComponentDialog::ComponentDialog(Component *c, Schematic *d)
QWidget *Tab2 = new QWidget(t);
t->addTab(Tab2, tr("Properties"));
gp1 = new QGridLayout(Tab2, 9,2,5,5);
gp1 = new Q3GridLayout(Tab2, 9,2,5,5);
myParent = Tab2;
}
else { // no simulation component
gp1 = new QGridLayout(0, 9,2,5,5);
gp1 = new Q3GridLayout(0, 9,2,5,5);
all->addLayout(gp1);
}
@ -240,7 +245,7 @@ ComponentDialog::ComponentDialog(Component *c, Schematic *d)
// ...........................................................
gp1->addMultiCellWidget(new QLabel(Comp->Description, myParent), 0,0,0,1);
QHBox *h5 = new QHBox(myParent);
Q3HBox *h5 = new Q3HBox(myParent);
h5->setSpacing(5);
gp1->addWidget(h5, 1,0);
new QLabel(tr("Name:"), h5);
@ -251,10 +256,10 @@ ComponentDialog::ComponentDialog(Component *c, Schematic *d)
showName = new QCheckBox(tr("display in schematic"), myParent);
gp1->addWidget(showName, 1,1);
QHGroupBox *PropertyBox = new QHGroupBox(tr("Properties"), myParent);
Q3HGroupBox *PropertyBox = new Q3HGroupBox(tr("Properties"), myParent);
gp1->addMultiCellWidget(PropertyBox, 2,2,0,1);
prop = new QListView(PropertyBox);
prop = new Q3ListView(PropertyBox);
prop->setMinimumSize(200, 150);
prop->addColumn(tr("Name"));
prop->addColumn(tr("Value"));
@ -262,7 +267,7 @@ ComponentDialog::ComponentDialog(Component *c, Schematic *d)
prop->addColumn(tr("Description"));
prop->setSorting(-1); // no sorting
QVBox *v1 = new QVBox(PropertyBox);
Q3VBox *v1 = new Q3VBox(PropertyBox);
v1->setSpacing(3);
Name = new QLabel(v1);
@ -286,7 +291,7 @@ ComponentDialog::ComponentDialog(Component *c, Schematic *d)
connect(ComboEdit, SIGNAL(activated(const QString&)),
SLOT(slotApplyChange(const QString&)));
QHBox *h3 = new QHBox(v1);
Q3HBox *h3 = new Q3HBox(v1);
h3->setStretchFactor(new QWidget(h3),5); // stretchable placeholder
EditButt = new QPushButton(tr("Edit"),h3);
EditButt->setEnabled(false);
@ -302,7 +307,7 @@ ComponentDialog::ComponentDialog(Component *c, Schematic *d)
v1->setStretchFactor(new QWidget(v1),5); // stretchable placeholder
QHBox *h4 = new QHBox(v1);
Q3HBox *h4 = new Q3HBox(v1);
h4->setSpacing(5);
ButtAdd = new QPushButton(tr("Add"),h4);
ButtAdd->setEnabled(false);
@ -312,7 +317,7 @@ ComponentDialog::ComponentDialog(Component *c, Schematic *d)
connect(ButtRem, SIGNAL(clicked()), SLOT(slotButtRem()));
// ...........................................................
QHBox *h2 = new QHBox(this);
Q3HBox *h2 = new Q3HBox(this);
h2->setSpacing(5);
all->addWidget(h2);
connect(new QPushButton(tr("OK"),h2), SIGNAL(clicked()),
@ -338,7 +343,7 @@ ComponentDialog::ComponentDialog(Component *c, Schematic *d)
if(p == pp) break; // do not insert if already on first tab
if(p->display) s = tr("yes");
else s = tr("no");
new QListViewItem(prop, p->Name, p->Value, s, p->Description);
new Q3ListViewItem(prop, p->Name, p->Value, s, p->Description);
}
if(prop->childCount() > 0) {
@ -346,8 +351,8 @@ ComponentDialog::ComponentDialog(Component *c, Schematic *d)
slotSelectProperty(prop->firstChild());
}
connect(prop, SIGNAL(clicked(QListViewItem*)),
SLOT(slotSelectProperty(QListViewItem*)));
connect(prop, SIGNAL(clicked(Q3ListViewItem*)),
SLOT(slotSelectProperty(Q3ListViewItem*)));
}
ComponentDialog::~ComponentDialog()
@ -362,7 +367,7 @@ ComponentDialog::~ComponentDialog()
// -------------------------------------------------------------------------
// Is called if a property is selected. It transfers the values to the right
// side for editing.
void ComponentDialog::slotSelectProperty(QListViewItem *item)
void ComponentDialog::slotSelectProperty(Q3ListViewItem *item)
{
if(item == 0) return;
item->setSelected(true); // if called from elsewhere, this was not yet done
@ -454,7 +459,7 @@ void ComponentDialog::slotApplyChange(const QString& Text)
prop->currentItem()->setText(1, Text); // apply edit line
ComboEdit->setFocus();
QListViewItem *item = prop->currentItem()->itemBelow();
Q3ListViewItem *item = prop->currentItem()->itemBelow();
if(item == 0) return;
prop->setSelected(item, true);
@ -465,7 +470,7 @@ void ComponentDialog::slotApplyChange(const QString& Text)
// Is called if the "RETURN"-button is pressed in the "edit" Widget.
void ComponentDialog::slotApplyProperty()
{
QListViewItem *item = prop->currentItem();
Q3ListViewItem *item = prop->currentItem();
if(!item) return;
if(ComboEdit->isShown()) // take text from ComboBox ?
@ -497,7 +502,7 @@ void ComponentDialog::slotApplyProperty()
// Is called if the "RETURN"-button is pressed in the "NameEdit" Widget.
void ComponentDialog::slotApplyPropName()
{
QListViewItem *item = prop->currentItem();
Q3ListViewItem *item = prop->currentItem();
if(item->text(0) != NameEdit->text()) {
// if(NameEdit->text() == "Export") {
// item->setText(0, "Export_"); // name must not be "Export" !!!
@ -513,11 +518,11 @@ void ComponentDialog::slotApplyPropName()
// Is called if the checkbox is pressed (changed).
void ComponentDialog::slotApplyState(int State)
{
QListViewItem *item = prop->currentItem();
Q3ListViewItem *item = prop->currentItem();
if(item == 0) return;
QString ButtonState;
if(State == QButton::On) ButtonState = tr("yes");
if(State) ButtonState = tr("yes");
else ButtonState = tr("no");
if(item->text(2) != ButtonState) {
@ -681,7 +686,7 @@ void ComponentDialog::slotApplyInput()
}
QListViewItem *item = prop->firstChild();
Q3ListViewItem *item = prop->firstChild();
if(item != 0) {
item = prop->currentItem();
@ -746,7 +751,7 @@ void ComponentDialog::slotApplyInput()
// -------------------------------------------------------------------------
void ComponentDialog::slotBrowseFile()
{
QString s = QFileDialog::getOpenFileName(QucsWorkDir.path(),
QString s = Q3FileDialog::getOpenFileName(QucsWorkDir.path(),
tr("All Files")+" (*.*);;"+tr("Touchstone files")+" (*.s?p);;"+
tr("CSV files")+" (*.csv);;"+
tr("SPICE files")+" (*.cir *.spi);;"+
@ -774,7 +779,7 @@ void ComponentDialog::slotEditFile()
// properties.
void ComponentDialog::slotButtAdd()
{
QListViewItem *item;
Q3ListViewItem *item;
// Search if property with this name already exist.
for(item = prop->firstChild(); item != 0; item = item->itemBelow())
if(item->text(0) == NameEdit->text()) {
@ -789,7 +794,7 @@ void ComponentDialog::slotButtAdd()
QString s = tr("no");
if(disp->isChecked()) s = tr("yes");
prop->setSelected(new QListViewItem(prop, item,
prop->setSelected(new Q3ListViewItem(prop, item,
NameEdit->text(), edit->text(), s), true);
}
@ -799,10 +804,10 @@ void ComponentDialog::slotButtAdd()
void ComponentDialog::slotButtRem()
{
if(prop->childCount() < 3) return; // the last property cannot be removed
QListViewItem *item = prop->selectedItem();
Q3ListViewItem *item = prop->selectedItem();
if(item == 0) return;
QListViewItem *next_item = item->itemBelow();
Q3ListViewItem *next_item = item->itemBelow();
if(next_item == 0) next_item = item->itemAbove();
prop->takeItem(item); // remove from ListView
delete item; // delete item

View File

@ -17,24 +17,26 @@
#ifndef COMPONENTDIALOG_H
#define COMPONENTDIALOG_H
#include <QtGui>
#include "component.h"
#include <qlabel.h>
#include <qdialog.h>
#include <qlistview.h>
#include <q3listview.h>
#include <qlineedit.h>
#include <qcheckbox.h>
#include <qregexp.h>
#include <qcombobox.h>
#include <qpushbutton.h>
#include <qptrlist.h>
#include <q3ptrlist.h>
#include <qdir.h>
//Added by qt3to4:
#include <Q3GridLayout>
#include <Q3VBoxLayout>
class Schematic;
class QGridLayout;
class Q3GridLayout;
class QValidator;
class QVBoxLayout;
class Q3VBoxLayout;
class QIntValidator;
class QRegExpValidator;
@ -50,7 +52,7 @@ public:
private slots:
void slotButtOK();
void slotButtCancel();
void slotSelectProperty(QListViewItem *item);
void slotSelectProperty(Q3ListViewItem *item);
void slotApplyInput();
void slotApplyState(int State);
void slotBrowseFile();
@ -78,11 +80,11 @@ protected slots:
void reject();
private:
QVBoxLayout *all; // the mother of all widgets
Q3VBoxLayout *all; // the mother of all widgets
QValidator *Validator, *ValRestrict, *Validator2;
QRegExp Expr;
QIntValidator *ValInteger;
QListView *prop;
Q3ListView *prop;
QLineEdit *edit, *NameEdit, *CompNameEdit;
QComboBox *ComboEdit;
QLabel *Name, *Description;

View File

@ -22,28 +22,28 @@ Coplanar::Coplanar()
{
Description = QObject::tr("coplanar line");
Lines.append(new Line(-30, 0,-18, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 18, 0, 30, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-13, -8, 23, -8,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-23, 8, 13, 8,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-13, -8,-23, 8,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 23, -8, 13, 8,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 0,-18, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 18, 0, 30, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-13, -8, 23, -8,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-23, 8, 13, 8,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-13, -8,-23, 8,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 23, -8, 13, 8,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-25,-13, 25,-13,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 16,-21, 24,-13,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 8,-21, 16,-13,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0,-21, 8,-13,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -8,-21, 0,-13,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-16,-21, -8,-13,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-24,-21,-16,-13,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-25,-13, 25,-13,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 16,-21, 24,-13,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 8,-21, 16,-13,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0,-21, 8,-13,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -8,-21, 0,-13,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-16,-21, -8,-13,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-24,-21,-16,-13,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-25, 13, 25, 13,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-24, 13,-16, 21,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-16, 13, -8, 21,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -8, 13, 0, 21,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0, 13, 8, 21,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 8, 13, 16, 21,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 16, 13, 24, 21,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-25, 13, 25, 13,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-24, 13,-16, 21,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-16, 13, -8, 21,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -8, 13, 0, 21,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0, 13, 8, 21,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 8, 13, 16, 21,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 16, 13, 24, 21,QPen(Qt::darkBlue,2)));
Ports.append(new Port(-30, 0));
Ports.append(new Port( 30, 0));

View File

@ -22,29 +22,29 @@ Coupler::Coupler()
{
Description = QObject::tr("ideal coupler");
Lines.append(new Line(-23,-24, 23,-24,QPen(QPen::darkGray,1)));
Lines.append(new Line( 23,-24, 23, 24,QPen(QPen::darkGray,1)));
Lines.append(new Line( 23, 24,-23, 24,QPen(QPen::darkGray,1)));
Lines.append(new Line(-23, 24,-23,-24,QPen(QPen::darkGray,1)));
Lines.append(new Line(-23,-24, 23,-24,QPen(Qt::darkGray,1)));
Lines.append(new Line( 23,-24, 23, 24,QPen(Qt::darkGray,1)));
Lines.append(new Line( 23, 24,-23, 24,QPen(Qt::darkGray,1)));
Lines.append(new Line(-23, 24,-23,-24,QPen(Qt::darkGray,1)));
Lines.append(new Line(-30,-20,-20,-20,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 30,-20, 20,-20,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-20,-20, 20,-20,QPen(QPen::darkBlue,4)));
Lines.append(new Line(-30, 20,-20, 20,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 30, 20, 20, 20,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-20, 20, 20, 20,QPen(QPen::darkBlue,4)));
Lines.append(new Line(-30,-20,-20,-20,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 30,-20, 20,-20,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-20,-20, 20,-20,QPen(Qt::darkBlue,4)));
Lines.append(new Line(-30, 20,-20, 20,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 30, 20, 20, 20,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-20, 20, 20, 20,QPen(Qt::darkBlue,4)));
Lines.append(new Line( 14, 14,-14,-14,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-14,-14, -9,-14,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-14,-14,-14, -9,QPen(QPen::darkBlue,1)));
Lines.append(new Line( 9, 14, 14, 14,QPen(QPen::darkBlue,1)));
Lines.append(new Line( 14, 9, 14, 14,QPen(QPen::darkBlue,1)));
Lines.append(new Line( 14, 14,-14,-14,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-14,-14, -9,-14,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-14,-14,-14, -9,QPen(Qt::darkBlue,1)));
Lines.append(new Line( 9, 14, 14, 14,QPen(Qt::darkBlue,1)));
Lines.append(new Line( 14, 9, 14, 14,QPen(Qt::darkBlue,1)));
Lines.append(new Line( 14,-14,-14, 14,QPen(QPen::darkBlue,1)));
Lines.append(new Line( 14,-14, 9,-14,QPen(QPen::darkBlue,1)));
Lines.append(new Line( 14,-14, 14, -9,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-14, 14, -9, 14,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-14, 14,-14, 9,QPen(QPen::darkBlue,1)));
Lines.append(new Line( 14,-14,-14, 14,QPen(Qt::darkBlue,1)));
Lines.append(new Line( 14,-14, 9,-14,QPen(Qt::darkBlue,1)));
Lines.append(new Line( 14,-14, 14, -9,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-14, 14, -9, 14,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-14, 14,-14, 9,QPen(Qt::darkBlue,1)));
Ports.append(new Port(-30,-20));
Ports.append(new Port( 30,-20));

View File

@ -22,32 +22,32 @@ CPWgap::CPWgap()
{
Description = QObject::tr("coplanar gap");
Lines.append(new Line(-30, 0,-18, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 18, 0, 30, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-13, -8, 2, -8,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 8, -8, 23, -8,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-23, 8, -8, 8,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -2, 8, 13, 8,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-13, -8,-23, 8,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 2, -8, -8, 8,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 8, -8, -2, 8,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 23, -8, 13, 8,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 0,-18, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 18, 0, 30, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-13, -8, 2, -8,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 8, -8, 23, -8,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-23, 8, -8, 8,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -2, 8, 13, 8,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-13, -8,-23, 8,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 2, -8, -8, 8,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 8, -8, -2, 8,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 23, -8, 13, 8,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-25,-13, 25,-13,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 16,-21, 24,-13,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 8,-21, 16,-13,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0,-21, 8,-13,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -8,-21, 0,-13,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-16,-21, -8,-13,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-24,-21,-16,-13,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-25,-13, 25,-13,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 16,-21, 24,-13,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 8,-21, 16,-13,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0,-21, 8,-13,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -8,-21, 0,-13,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-16,-21, -8,-13,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-24,-21,-16,-13,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-25, 13, 25, 13,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-24, 13,-16, 21,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-16, 13, -8, 21,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -8, 13, 0, 21,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0, 13, 8, 21,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 8, 13, 16, 21,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 16, 13, 24, 21,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-25, 13, 25, 13,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-24, 13,-16, 21,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-16, 13, -8, 21,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -8, 13, 0, 21,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0, 13, 8, 21,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 8, 13, 16, 21,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 16, 13, 24, 21,QPen(Qt::darkBlue,2)));
Ports.append(new Port(-30, 0));
Ports.append(new Port( 30, 0));

View File

@ -22,32 +22,32 @@ CPWopen::CPWopen()
{
Description = QObject::tr("coplanar open");
Lines.append(new Line(-30, 0,-18, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-13, -8, 0, -8,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-23, 8,-10, 8,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-13, -8,-23, 8,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0, -8,-10, 8,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 0,-18, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-13, -8, 0, -8,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-23, 8,-10, 8,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-13, -8,-23, 8,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0, -8,-10, 8,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-25,-13, 11,-13,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-25, 13, -5, 13,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 11,-13, -5, 13,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-25,-13, 11,-13,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-25, 13, -5, 13,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 11,-13, -5, 13,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-24,-21,-16,-13,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-16,-21, -8,-13,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -8,-21, 0,-13,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0,-21, 8,-13,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 8,-21, 15,-14,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-24,-21,-16,-13,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-16,-21, -8,-13,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -8,-21, 0,-13,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0,-21, 8,-13,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 8,-21, 15,-14,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 10,-11, 15, -6,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 7, -6, 15, 2,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 4, -1, 15, 10,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 1, 4, 15, 18,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 10,-11, 15, -6,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 7, -6, 15, 2,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 4, -1, 15, 10,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 1, 4, 15, 18,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-25, 18,-22, 21,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-22, 13,-14, 21,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-14, 13, -6, 21,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -6, 13, 2, 21,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -2, 9, 10, 21,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-25, 18,-22, 21,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-22, 13,-14, 21,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-14, 13, -6, 21,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -6, 13, 2, 21,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -2, 9, 10, 21,QPen(Qt::darkBlue,2)));
Ports.append(new Port(-30, 0));

View File

@ -22,31 +22,31 @@ CPWshort::CPWshort()
{
Description = QObject::tr("coplanar short");
Lines.append(new Line(-30, 0,-18, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-13, -8, 3, -8,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-23, 8, -7, 8,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-13, -8,-23, 8,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 0,-18, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-13, -8, 3, -8,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-23, 8, -7, 8,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-13, -8,-23, 8,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-25,-13, 6,-13,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-25, 13,-10, 13,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 6,-13, 3, -8,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -7, 8,-10, 13,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-25,-13, 6,-13,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-25, 13,-10, 13,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 6,-13, 3, -8,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -7, 8,-10, 13,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-24,-21,-16,-13,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-16,-21, -8,-13,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -8,-21, 0,-13,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0,-21, 12, -9,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 8,-21, 12,-17,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-24,-21,-16,-13,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-16,-21, -8,-13,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -8,-21, 0,-13,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0,-21, 12, -9,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 8,-21, 12,-17,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 4, -9, 12, -1,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 1, -4, 12, 7,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -2, 1, 12, 15,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 4, -9, 12, -1,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 1, -4, 12, 7,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -2, 1, 12, 15,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-25, 18,-22, 21,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-22, 13,-14, 21,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-14, 13, -6, 21,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -8, 11, 2, 21,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -5, 6, 10, 21,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-25, 18,-22, 21,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-22, 13,-14, 21,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-14, 13, -6, 21,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -8, 11, 2, 21,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -5, 6, 10, 21,QPen(Qt::darkBlue,2)));
Ports.append(new Port(-30, 0));

View File

@ -22,34 +22,34 @@ CPWstep::CPWstep()
{
Description = QObject::tr("coplanar step");
Lines.append(new Line(-30, 0,-18, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 18, 0, 30, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 6,-10, 24,-10,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -6, 10, 12, 10,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-14, -6, 4, -6,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-22, 6, -4, 6,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 6,-10, 4, -6,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -6, 10, -4, 6,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-14, -6,-22, 6,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 24,-10, 12, 10,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 0,-18, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 18, 0, 30, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 6,-10, 24,-10,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -6, 10, 12, 10,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-14, -6, 4, -6,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-22, 6, -4, 6,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 6,-10, 4, -6,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -6, 10, -4, 6,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-14, -6,-22, 6,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 24,-10, 12, 10,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-25,-13, 25,-13,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 16,-21, 24,-13,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 8,-21, 16,-13,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0,-21, 8,-13,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -8,-21, 0,-13,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-16,-21, -8,-13,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-24,-21,-16,-13,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-25,-13, 25,-13,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 16,-21, 24,-13,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 8,-21, 16,-13,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0,-21, 8,-13,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -8,-21, 0,-13,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-16,-21, -8,-13,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-24,-21,-16,-13,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-25, 13, 25, 13,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-24, 13,-16, 21,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-16, 13, -8, 21,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -8, 13, 0, 21,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0, 13, 8, 21,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 8, 13, 16, 21,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 16, 13, 24, 21,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-25, 13, 25, 13,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-24, 13,-16, 21,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-16, 13, -8, 21,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -8, 13, 0, 21,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0, 13, 8, 21,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 8, 13, 16, 21,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 16, 13, 24, 21,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-22, -4,-26, 4,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-22, -4,-26, 4,QPen(Qt::darkBlue,2)));
Ports.append(new Port(-30, 0));
Ports.append(new Port( 30, 0));

View File

@ -14,7 +14,7 @@
* (at your option) any later version. *
* *
***************************************************************************/
#include <QtGui>
#include "d_flipflop.h"
#include "node.h"
#include "main.h"
@ -26,21 +26,21 @@ D_FlipFlop::D_FlipFlop()
Props.append(new Property("t", "0", false, QObject::tr("delay time")));
Lines.append(new Line(-20,-20, 20,-20,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-20, 20, 20, 20,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-20,-20,-20, 20,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 20,-20, 20, 20,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-20,-20, 20,-20,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-20, 20, 20, 20,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-20,-20,-20, 20,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 20,-20, 20, 20,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30,-10,-20,-10,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 10,-20, 10,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 30,-10, 20,-10,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0, 20, 0, 30,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30,-10,-20,-10,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30, 10,-20, 10,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 30,-10, 20,-10,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0, 20, 0, 30,QPen(Qt::darkBlue,2)));
Texts.append(new Text(-18,-21, "D", QPen::darkBlue, 12.0));
Texts.append(new Text( 6,-21, "Q", QPen::darkBlue, 12.0));
Texts.append(new Text( -4, 4, "R", QPen::darkBlue, 9.0));
Lines.append(new Line(-20, 6,-12, 10,QPen(QPen::darkBlue,0)));
Lines.append(new Line(-20, 14,-12, 10,QPen(QPen::darkBlue,0)));
Texts.append(new Text(-18,-21, "D", Qt::darkBlue, 12.0));
Texts.append(new Text( 6,-21, "Q", Qt::darkBlue, 12.0));
Texts.append(new Text( -4, 4, "R", Qt::darkBlue, 9.0));
Lines.append(new Line(-20, 6,-12, 10,QPen(Qt::darkBlue,0)));
Lines.append(new Line(-20, 14,-12, 10,QPen(Qt::darkBlue,0)));
Ports.append(new Port(-30,-10)); // D
Ports.append(new Port(-30, 10)); // Clock

View File

@ -14,7 +14,7 @@
* (at your option) any later version. *
* *
***************************************************************************/
#include <QtGui>
#include "dc_sim.h"
#include "main.h"
@ -32,9 +32,9 @@ DC_Sim::DC_Sim()
if (a < 8 || s.length() - b < 8) b = -1;
if (b != -1) s[b] = '\n';
Texts.append(new Text(0, 0, s.left(b), QPen::darkBlue, QucsSettings.largeFontSize));
Texts.append(new Text(0, 0, s.left(b), Qt::darkBlue, QucsSettings.largeFontSize));
if (b != -1)
Texts.append(new Text(0, 0, s.mid(b+1), QPen::darkBlue, QucsSettings.largeFontSize));
Texts.append(new Text(0, 0, s.mid(b+1), Qt::darkBlue, QucsSettings.largeFontSize));
x1 = -10; y1 = -9;
x2 = x1+128; y2 = y1+41;

View File

@ -21,15 +21,15 @@ dcBlock::dcBlock()
{
Description = QObject::tr("dc block");
Lines.append(new Line(- 4,-11, -4, 11,QPen(QPen::darkBlue,4)));
Lines.append(new Line( 4,-11, 4, 11,QPen(QPen::darkBlue,4)));
Lines.append(new Line(-30, 0, -4, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 4, 0, 30, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line(- 4,-11, -4, 11,QPen(Qt::darkBlue,4)));
Lines.append(new Line( 4,-11, 4, 11,QPen(Qt::darkBlue,4)));
Lines.append(new Line(-30, 0, -4, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 4, 0, 30, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-23,-14, 23,-14,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-23, 14, 23, 14,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-23,-14,-23, 14,QPen(QPen::darkBlue,1)));
Lines.append(new Line( 23,-14, 23, 14,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-23,-14, 23,-14,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-23, 14, 23, 14,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-23,-14,-23, 14,QPen(Qt::darkBlue,1)));
Lines.append(new Line( 23,-14, 23, 14,QPen(Qt::darkBlue,1)));
Ports.append(new Port(-30, 0));
Ports.append(new Port( 30, 0));

View File

@ -22,16 +22,16 @@ dcFeed::dcFeed()
{
Description = QObject::tr("dc feed");
Arcs.append(new Arc(-17, -6, 12, 12, 0, 16*180,QPen(QPen::darkBlue,2)));
Arcs.append(new Arc( -6, -6, 12, 12, 0, 16*180,QPen(QPen::darkBlue,2)));
Arcs.append(new Arc( 5, -6, 12, 12, 0, 16*180,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 0,-17, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 17, 0, 30, 0,QPen(QPen::darkBlue,2)));
Arcs.append(new Arc(-17, -6, 12, 12, 0, 16*180,QPen(Qt::darkBlue,2)));
Arcs.append(new Arc( -6, -6, 12, 12, 0, 16*180,QPen(Qt::darkBlue,2)));
Arcs.append(new Arc( 5, -6, 12, 12, 0, 16*180,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30, 0,-17, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 17, 0, 30, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-23,-13, 23,-13,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-23, 13, 23, 13,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-23,-13,-23, 13,QPen(QPen::darkBlue,1)));
Lines.append(new Line( 23,-13, 23, 13,QPen(QPen::darkBlue,1)));
Lines.append(new Line(-23,-13, 23,-13,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-23, 13, 23, 13,QPen(Qt::darkBlue,1)));
Lines.append(new Line(-23,-13,-23, 13,QPen(Qt::darkBlue,1)));
Lines.append(new Line( 23,-13, 23, 13,QPen(Qt::darkBlue,1)));
Ports.append(new Port(-30, 0));
Ports.append(new Port( 30, 0));

View File

@ -15,7 +15,7 @@
* any later version.
*
*/
#include <QtGui>
#include "dff_SR.h"
#include "node.h"
#include "main.h"
@ -60,31 +60,31 @@ Element * dff_SR::info(QString& Name, char * &BitmapFile, bool getNewOne)
void dff_SR::createSymbol()
{
// put in here symbol drawing code and terminal definitions
Lines.append(new Line(-30,-40, 30,-40,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 30,-40, 30, 40,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 30, 40,-30, 40,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 40,-30,-40,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30,-40, 30,-40,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 30,-40, 30, 40,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 30, 40,-30, 40,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30, 40,-30,-40,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-50,-20,-30,-20,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-50, 20,-30, 20,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 30, 20, 50, 20,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 30,-20, 50,-20,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-50,-20,-30,-20,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-50, 20,-30, 20,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 30, 20, 50, 20,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 30,-20, 50,-20,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -30, 10,-20, 20,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -30, 30,-20, 20,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -30, 10,-20, 20,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -30, 30,-20, 20,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0, -50, 0, -60,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0, 50, 0, 60,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 0, -50, 0, -60,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 0, 50, 0, 60,QPen(Qt::darkBlue,2)));
Arcs.append(new Arc( -5,-50, 10, 10, 0, 16*360, QPen(QPen::darkBlue,2)));
Arcs.append(new Arc( -5, 40, 10, 10, 0, 16*360, QPen(QPen::darkBlue,2)));
Arcs.append(new Arc( -5,-50, 10, 10, 0, 16*360, QPen(Qt::darkBlue,2)));
Arcs.append(new Arc( -5, 40, 10, 10, 0, 16*360, QPen(Qt::darkBlue,2)));
Texts.append(new Text(-25,-32, "D", QPen::darkBlue, 12.0));
Texts.append(new Text( 11,-32, "Q", QPen::darkBlue, 12.0));
Texts.append(new Text( -5,-39, "S", QPen::darkBlue, 12.0));
Texts.append(new Text( 11, 7, "Q", QPen::darkBlue, 12.0));
Texts.append(new Text(-25,-32, "D", Qt::darkBlue, 12.0));
Texts.append(new Text( 11,-32, "Q", Qt::darkBlue, 12.0));
Texts.append(new Text( -5,-39, "S", Qt::darkBlue, 12.0));
Texts.append(new Text( 11, 7, "Q", Qt::darkBlue, 12.0));
Texts.current()->over=true;
Texts.append(new Text( -5, 17, "R", QPen::darkBlue, 12.0));
Texts.append(new Text( -5, 17, "R", Qt::darkBlue, 12.0));
Ports.append(new Port(0, -60)); // S
Ports.append(new Port(-50,-20)); // D

View File

@ -14,7 +14,7 @@
* (at your option) any later version. *
* *
***************************************************************************/
#include <QtGui>
#include "digi_sim.h"
#include "main.h"
@ -28,9 +28,9 @@ Digi_Sim::Digi_Sim()
int a = s.find(" ");
if (a != -1) s[a] = '\n'; // break line before the word "simulation"
Texts.append(new Text(0, 0, s.left(a), QPen::darkBlue, QucsSettings.largeFontSize));
Texts.append(new Text(0, 0, s.left(a), Qt::darkBlue, QucsSettings.largeFontSize));
if (a != -1)
Texts.append(new Text(0, 0, s.mid(a+1), QPen::darkBlue, QucsSettings.largeFontSize));
Texts.append(new Text(0, 0, s.mid(a+1), Qt::darkBlue, QucsSettings.largeFontSize));
x1 = -10; y1 = -9;
x2 = x1+120; y2 = y1+59;

View File

@ -14,7 +14,7 @@
* (at your option) any later version. *
* *
***************************************************************************/
#include <QtGui>
#include "digi_source.h"
#include "main.h"
#include "node.h"
@ -25,18 +25,18 @@ Digi_Source::Digi_Source()
Type = isComponent; // both analog and digital
Description = QObject::tr("digital source");
Lines.append(new Line(-10, 0, 0, 0,QPen(QPen::darkGreen,2)));
Lines.append(new Line(-20,-10,-10, 0,QPen(QPen::darkGreen,2)));
Lines.append(new Line(-20, 10,-10, 0,QPen(QPen::darkGreen,2)));
Lines.append(new Line(-35,-10,-20,-10,QPen(QPen::darkGreen,2)));
Lines.append(new Line(-35, 10,-20, 10,QPen(QPen::darkGreen,2)));
Lines.append(new Line(-35,-10,-35, 10,QPen(QPen::darkGreen,2)));
Lines.append(new Line(-10, 0, 0, 0,QPen(Qt::darkGreen,2)));
Lines.append(new Line(-20,-10,-10, 0,QPen(Qt::darkGreen,2)));
Lines.append(new Line(-20, 10,-10, 0,QPen(Qt::darkGreen,2)));
Lines.append(new Line(-35,-10,-20,-10,QPen(Qt::darkGreen,2)));
Lines.append(new Line(-35, 10,-20, 10,QPen(Qt::darkGreen,2)));
Lines.append(new Line(-35,-10,-35, 10,QPen(Qt::darkGreen,2)));
Lines.append(new Line(-32, 5,-28, 5,QPen(QPen::darkGreen,2)));
Lines.append(new Line(-28,-5,-24,-5,QPen(QPen::darkGreen,2)));
Lines.append(new Line(-24, 5,-20, 5,QPen(QPen::darkGreen,2)));
Lines.append(new Line(-28,-5,-28, 5,QPen(QPen::darkGreen,2)));
Lines.append(new Line(-24,-5,-24, 5,QPen(QPen::darkGreen,2)));
Lines.append(new Line(-32, 5,-28, 5,QPen(Qt::darkGreen,2)));
Lines.append(new Line(-28,-5,-24,-5,QPen(Qt::darkGreen,2)));
Lines.append(new Line(-24, 5,-20, 5,QPen(Qt::darkGreen,2)));
Lines.append(new Line(-28,-5,-28, 5,QPen(Qt::darkGreen,2)));
Lines.append(new Line(-24,-5,-24, 5,QPen(Qt::darkGreen,2)));
Ports.append(new Port( 0, 0));

View File

@ -106,28 +106,28 @@ Element* Diode::info(QString& Name, char* &BitmapFile, bool getNewOne)
void Diode::createSymbol()
{
if(Props.getLast()->Value.at(0) == 'V') {
Lines.append(new Line(-30, 0, -9, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -6, 0, 30, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -9, -9, -9, 9,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 0, -9, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -6, 0, 30, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -9, -9, -9, 9,QPen(Qt::darkBlue,2)));
}
else if(Props.getLast()->Value.at(0) == 'U') {
Lines.append(new Line(-30, 0, -6, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 6, 0, 30, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 0, -6, 0,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 6, 0, 30, 0,QPen(Qt::darkBlue,2)));
}
else {
Lines.append(new Line(-30, 0, 30, 0,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 0, 30, 0,QPen(Qt::darkBlue,2)));
}
Lines.append(new Line( -6, -9, -6, 9,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 6, -9, 6, 9,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -6, 0, 6, -9,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -6, 0, 6, 9,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -6, -9, -6, 9,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 6, -9, 6, 9,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -6, 0, 6, -9,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -6, 0, 6, 9,QPen(Qt::darkBlue,2)));
if(Props.getLast()->Value.at(0) == 'S') {
Lines.append(new Line( -6, -9,-12,-12,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -6, 9, 0, 12,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -6, -9,-12,-12,QPen(Qt::darkBlue,2)));
Lines.append(new Line( -6, 9, 0, 12,QPen(Qt::darkBlue,2)));
}
else if(Props.getLast()->Value.at(0) == 'Z') {
Lines.append(new Line( -6, 9, -1, 9,QPen(QPen::darkBlue,2)));
Lines.append(new Line( -6, 9, -1, 9,QPen(Qt::darkBlue,2)));
}
Ports.append(new Port(-30, 0));

View File

@ -15,7 +15,7 @@
* any later version.
*
*/
#include <QtGui>
#include "dmux2to4.h"
#include "node.h"
#include "main.h"
@ -57,38 +57,38 @@ Element * dmux2to4::info(QString& Name, char * &BitmapFile, bool getNewOne)
void dmux2to4::createSymbol()
{
Lines.append(new Line(-30, -90, 30,-90,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 30, -90, 30, 20,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 30, 20,-30, 20,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 20,-30,-90,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, -90, 30,-90,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 30, -90, 30, 20,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 30, 20,-30, 20,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30, 20,-30,-90,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-50,-50,-40,-50,QPen(QPen::darkBlue,2))); // EN
Lines.append(new Line(-50,-30,-30,-30,QPen(QPen::darkBlue,2))); // A
Lines.append(new Line(-50,-10,-30,-10,QPen(QPen::darkBlue,2))); // B
Lines.append(new Line( 30, 10, 50, 10,QPen(QPen::darkBlue,2))); // Y3
Lines.append(new Line( 30,-10, 50,-10,QPen(QPen::darkBlue,2))); // Y2
Lines.append(new Line( 30,-30, 50,-30,QPen(QPen::darkBlue,2))); // Y1
Lines.append(new Line( 30,-50, 50,-50,QPen(QPen::darkBlue,2))); // Y0
Lines.append(new Line(-50,-50,-40,-50,QPen(Qt::darkBlue,2))); // EN
Lines.append(new Line(-50,-30,-30,-30,QPen(Qt::darkBlue,2))); // A
Lines.append(new Line(-50,-10,-30,-10,QPen(Qt::darkBlue,2))); // B
Lines.append(new Line( 30, 10, 50, 10,QPen(Qt::darkBlue,2))); // Y3
Lines.append(new Line( 30,-10, 50,-10,QPen(Qt::darkBlue,2))); // Y2
Lines.append(new Line( 30,-30, 50,-30,QPen(Qt::darkBlue,2))); // Y1
Lines.append(new Line( 30,-50, 50,-50,QPen(Qt::darkBlue,2))); // Y0
Arcs.append(new Arc( -40, -55, 10, 10, 0, 16*360, QPen(QPen::darkBlue,2)));
Arcs.append(new Arc( -40, -55, 10, 10, 0, 16*360, QPen(Qt::darkBlue,2)));
Texts.append(new Text(-25,-85, "DMUX", QPen::darkBlue, 12.0));
Texts.append(new Text(-25,-85, "DMUX", Qt::darkBlue, 12.0));
Texts.append(new Text(-28,-63, "En",QPen::darkBlue, 12.0));
Texts.append(new Text(-20,-33, "G", QPen::darkBlue, 12.0));
Texts.append(new Text(-8, -38, "}", QPen::darkBlue, 16.0));
Texts.append(new Text( 2, -40, "0", QPen::darkBlue, 12.0));
Texts.append(new Text( 2, -20, "3", QPen::darkBlue, 12.0));
Texts.append(new Text(-28,-63, "En",Qt::darkBlue, 12.0));
Texts.append(new Text(-20,-33, "G", Qt::darkBlue, 12.0));
Texts.append(new Text(-8, -38, "}", Qt::darkBlue, 16.0));
Texts.append(new Text( 2, -40, "0", Qt::darkBlue, 12.0));
Texts.append(new Text( 2, -20, "3", Qt::darkBlue, 12.0));
Texts.append(new Text(-28,-43, "0", QPen::darkBlue, 12.0));
Texts.append(new Text(-28,-23, "1", QPen::darkBlue, 12.0));
Texts.append(new Text(-28,-43, "0", Qt::darkBlue, 12.0));
Texts.append(new Text(-28,-23, "1", Qt::darkBlue, 12.0));
Texts.append(new Text( 15,-63, "0", QPen::darkBlue, 12.0));
Texts.append(new Text( 15,-43, "1", QPen::darkBlue, 12.0));
Texts.append(new Text( 15,-23, "2", QPen::darkBlue, 12.0));
Texts.append(new Text( 15, -3, "3", QPen::darkBlue, 12.0));
Texts.append(new Text( 15,-63, "0", Qt::darkBlue, 12.0));
Texts.append(new Text( 15,-43, "1", Qt::darkBlue, 12.0));
Texts.append(new Text( 15,-23, "2", Qt::darkBlue, 12.0));
Texts.append(new Text( 15, -3, "3", Qt::darkBlue, 12.0));
Lines.append(new Line(0, -18, 12, -18, QPen(QPen::darkBlue,2)));
Lines.append(new Line(0, -18, 12, -18, QPen(Qt::darkBlue,2)));
Ports.append(new Port(-50,-50)); // En
Ports.append(new Port(-50,-30)); // A

View File

@ -15,7 +15,7 @@
* any later version.
*
*/
#include <QtGui>
#include "dmux3to8.h"
#include "node.h"
#include "main.h"
@ -58,48 +58,48 @@ Element * dmux3to8::info(QString& Name, char * &BitmapFile, bool getNewOne)
void dmux3to8::createSymbol()
{
Lines.append(new Line(-30, -90, 30,-90,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 30, -90, 30, 100,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 30, 100,-30, 100,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 100,-30, -90,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, -90, 30,-90,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 30, -90, 30, 100,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 30, 100,-30, 100,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30, 100,-30, -90,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-50,-50,-40,-50,QPen(QPen::darkBlue,2))); // EN
Lines.append(new Line(-50,-30,-30,-30,QPen(QPen::darkBlue,2))); // A
Lines.append(new Line(-50,-10,-30,-10,QPen(QPen::darkBlue,2))); // B
Lines.append(new Line(-50, 10,-30, 10,QPen(QPen::darkBlue,2))); // C
Lines.append(new Line(-50,-50,-40,-50,QPen(Qt::darkBlue,2))); // EN
Lines.append(new Line(-50,-30,-30,-30,QPen(Qt::darkBlue,2))); // A
Lines.append(new Line(-50,-10,-30,-10,QPen(Qt::darkBlue,2))); // B
Lines.append(new Line(-50, 10,-30, 10,QPen(Qt::darkBlue,2))); // C
Lines.append(new Line( 30, 90, 50, 90,QPen(QPen::darkBlue,2))); // Y7
Lines.append(new Line( 30, 70, 50, 70,QPen(QPen::darkBlue,2))); // Y6
Lines.append(new Line( 30, 50, 50, 50,QPen(QPen::darkBlue,2))); // Y5
Lines.append(new Line( 30, 30, 50, 30,QPen(QPen::darkBlue,2))); // Y4
Lines.append(new Line( 30, 10, 50, 10,QPen(QPen::darkBlue,2))); // Y3
Lines.append(new Line( 30,-10, 50,-10,QPen(QPen::darkBlue,2))); // Y2
Lines.append(new Line( 30,-30, 50,-30,QPen(QPen::darkBlue,2))); // Y1
Lines.append(new Line( 30,-50, 50,-50,QPen(QPen::darkBlue,2))); // Y0
Lines.append(new Line( 30, 90, 50, 90,QPen(Qt::darkBlue,2))); // Y7
Lines.append(new Line( 30, 70, 50, 70,QPen(Qt::darkBlue,2))); // Y6
Lines.append(new Line( 30, 50, 50, 50,QPen(Qt::darkBlue,2))); // Y5
Lines.append(new Line( 30, 30, 50, 30,QPen(Qt::darkBlue,2))); // Y4
Lines.append(new Line( 30, 10, 50, 10,QPen(Qt::darkBlue,2))); // Y3
Lines.append(new Line( 30,-10, 50,-10,QPen(Qt::darkBlue,2))); // Y2
Lines.append(new Line( 30,-30, 50,-30,QPen(Qt::darkBlue,2))); // Y1
Lines.append(new Line( 30,-50, 50,-50,QPen(Qt::darkBlue,2))); // Y0
Arcs.append(new Arc( -40, -55, 10, 10, 0, 16*360, QPen(QPen::darkBlue,2)));
Arcs.append(new Arc( -40, -55, 10, 10, 0, 16*360, QPen(Qt::darkBlue,2)));
Texts.append(new Text(-25,-85, "DMUX", QPen::darkBlue, 12.0));
Texts.append(new Text(-25,-85, "DMUX", Qt::darkBlue, 12.0));
Texts.append(new Text(-25,-63, "En", QPen::darkBlue, 12.0));
Texts.append(new Text(-20,-25, "G", QPen::darkBlue, 12.0));
Texts.append(new Text(-8, -30, "}", QPen::darkBlue, 16.0));
Texts.append(new Text( 2, -32, "0", QPen::darkBlue, 12.0));
Texts.append(new Text( 2, -13, "7", QPen::darkBlue, 12.0));
Texts.append(new Text(-25,-63, "En", Qt::darkBlue, 12.0));
Texts.append(new Text(-20,-25, "G", Qt::darkBlue, 12.0));
Texts.append(new Text(-8, -30, "}", Qt::darkBlue, 16.0));
Texts.append(new Text( 2, -32, "0", Qt::darkBlue, 12.0));
Texts.append(new Text( 2, -13, "7", Qt::darkBlue, 12.0));
Texts.append(new Text(-25,-43, "0", QPen::darkBlue, 12.0));
Texts.append(new Text(-25, -3, "2", QPen::darkBlue, 12.0));
Texts.append(new Text(-25,-43, "0", Qt::darkBlue, 12.0));
Texts.append(new Text(-25, -3, "2", Qt::darkBlue, 12.0));
Texts.append(new Text( 15,-63, "0", QPen::darkBlue, 12.0));
Texts.append(new Text( 15,-43, "1", QPen::darkBlue, 12.0));
Texts.append(new Text( 15,-23, "2", QPen::darkBlue, 12.0));
Texts.append(new Text( 15, -3, "3", QPen::darkBlue, 12.0));
Texts.append(new Text( 15, 17, "4", QPen::darkBlue, 12.0));
Texts.append(new Text( 15, 37, "5", QPen::darkBlue, 12.0));
Texts.append(new Text( 15, 57, "6", QPen::darkBlue, 12.0));
Texts.append(new Text( 15, 77, "7", QPen::darkBlue, 12.0));
Texts.append(new Text( 15,-63, "0", Qt::darkBlue, 12.0));
Texts.append(new Text( 15,-43, "1", Qt::darkBlue, 12.0));
Texts.append(new Text( 15,-23, "2", Qt::darkBlue, 12.0));
Texts.append(new Text( 15, -3, "3", Qt::darkBlue, 12.0));
Texts.append(new Text( 15, 17, "4", Qt::darkBlue, 12.0));
Texts.append(new Text( 15, 37, "5", Qt::darkBlue, 12.0));
Texts.append(new Text( 15, 57, "6", Qt::darkBlue, 12.0));
Texts.append(new Text( 15, 77, "7", Qt::darkBlue, 12.0));
Lines.append(new Line(0, -11, 12, -11, QPen(QPen::darkBlue,2)));
Lines.append(new Line(0, -11, 12, -11, QPen(Qt::darkBlue,2)));
Ports.append(new Port(-50,-50)); // En
Ports.append(new Port(-50,-30)); // A

View File

@ -15,7 +15,7 @@
* any later version.
*
*/
#include <QtGui>
#include "dmux4to16.h"
#include "node.h"
#include "main.h"
@ -57,65 +57,65 @@ Element * dmux4to16::info(QString& Name, char * &BitmapFile, bool getNewOne)
void dmux4to16::createSymbol()
{
Lines.append(new Line(-30, -90, 30,-90,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 30, -90, 30, 110,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 30, 110,-30, 110,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, 110,-30, -90,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, -90, 30,-90,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 30, -90, 30, 110,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 30, 110,-30, 110,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-30, 110,-30, -90,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-50,-50,-40,-50,QPen(QPen::darkBlue,2))); // EN
Lines.append(new Line(-50,-30,-30,-30,QPen(QPen::darkBlue,2))); // A
Lines.append(new Line(-50,-10,-30,-10,QPen(QPen::darkBlue,2))); // B
Lines.append(new Line(-50, 10,-30, 10,QPen(QPen::darkBlue,2))); // C
Lines.append(new Line(-50, 30,-30, 30,QPen(QPen::darkBlue,2))); // D
Lines.append(new Line(-50,-50,-40,-50,QPen(Qt::darkBlue,2))); // EN
Lines.append(new Line(-50,-30,-30,-30,QPen(Qt::darkBlue,2))); // A
Lines.append(new Line(-50,-10,-30,-10,QPen(Qt::darkBlue,2))); // B
Lines.append(new Line(-50, 10,-30, 10,QPen(Qt::darkBlue,2))); // C
Lines.append(new Line(-50, 30,-30, 30,QPen(Qt::darkBlue,2))); // D
Lines.append(new Line( 30, 100, 50,100,QPen(QPen::darkBlue,2))); // Y15
Lines.append(new Line( 30, 90, 50, 90,QPen(QPen::darkBlue,2))); // Y14
Lines.append(new Line( 30, 80, 50, 80,QPen(QPen::darkBlue,2))); // Y13
Lines.append(new Line( 30, 70, 50, 70,QPen(QPen::darkBlue,2))); // Y12
Lines.append(new Line( 30, 60, 50, 60,QPen(QPen::darkBlue,2))); // Y11
Lines.append(new Line( 30, 50, 50, 50,QPen(QPen::darkBlue,2))); // Y10
Lines.append(new Line( 30, 40, 50, 40,QPen(QPen::darkBlue,2))); // Y9
Lines.append(new Line( 30, 30, 50, 30,QPen(QPen::darkBlue,2))); // Y8
Lines.append(new Line( 30, 20, 50, 20,QPen(QPen::darkBlue,2))); // Y7
Lines.append(new Line( 30, 10, 50, 10,QPen(QPen::darkBlue,2))); // Y6
Lines.append(new Line( 30, 0, 50, 0,QPen(QPen::darkBlue,2))); // Y5
Lines.append(new Line( 30, -10, 50,-10,QPen(QPen::darkBlue,2))); // Y4
Lines.append(new Line( 30, -20, 50,-20,QPen(QPen::darkBlue,2))); // Y3
Lines.append(new Line( 30, -30, 50,-30,QPen(QPen::darkBlue,2))); // Y2
Lines.append(new Line( 30, -40, 50,-40,QPen(QPen::darkBlue,2))); // Y1
Lines.append(new Line( 30, -50, 50,-50,QPen(QPen::darkBlue,2))); // Y0
Lines.append(new Line( 30, 100, 50,100,QPen(Qt::darkBlue,2))); // Y15
Lines.append(new Line( 30, 90, 50, 90,QPen(Qt::darkBlue,2))); // Y14
Lines.append(new Line( 30, 80, 50, 80,QPen(Qt::darkBlue,2))); // Y13
Lines.append(new Line( 30, 70, 50, 70,QPen(Qt::darkBlue,2))); // Y12
Lines.append(new Line( 30, 60, 50, 60,QPen(Qt::darkBlue,2))); // Y11
Lines.append(new Line( 30, 50, 50, 50,QPen(Qt::darkBlue,2))); // Y10
Lines.append(new Line( 30, 40, 50, 40,QPen(Qt::darkBlue,2))); // Y9
Lines.append(new Line( 30, 30, 50, 30,QPen(Qt::darkBlue,2))); // Y8
Lines.append(new Line( 30, 20, 50, 20,QPen(Qt::darkBlue,2))); // Y7
Lines.append(new Line( 30, 10, 50, 10,QPen(Qt::darkBlue,2))); // Y6
Lines.append(new Line( 30, 0, 50, 0,QPen(Qt::darkBlue,2))); // Y5
Lines.append(new Line( 30, -10, 50,-10,QPen(Qt::darkBlue,2))); // Y4
Lines.append(new Line( 30, -20, 50,-20,QPen(Qt::darkBlue,2))); // Y3
Lines.append(new Line( 30, -30, 50,-30,QPen(Qt::darkBlue,2))); // Y2
Lines.append(new Line( 30, -40, 50,-40,QPen(Qt::darkBlue,2))); // Y1
Lines.append(new Line( 30, -50, 50,-50,QPen(Qt::darkBlue,2))); // Y0
Arcs.append(new Arc( -40, -55, 10, 10, 0, 16*360, QPen(QPen::darkBlue,2)));
Arcs.append(new Arc( -40, -55, 10, 10, 0, 16*360, QPen(Qt::darkBlue,2)));
Texts.append(new Text(-25,-85, "DMUX", QPen::darkBlue, 12.0));
Texts.append(new Text(-25,-85, "DMUX", Qt::darkBlue, 12.0));
Texts.append(new Text(-25,-63, "En", QPen::darkBlue, 12.0));
Texts.append(new Text(-26,-15, "G", QPen::darkBlue, 12.0));
Texts.append(new Text(-13,-20, "}", QPen::darkBlue, 16.0));
Texts.append(new Text( -5,-20, "0", QPen::darkBlue, 12.0));
Texts.append(new Text( -8, 0, "15", QPen::darkBlue, 12.0));
Texts.append(new Text(-25,-63, "En", Qt::darkBlue, 12.0));
Texts.append(new Text(-26,-15, "G", Qt::darkBlue, 12.0));
Texts.append(new Text(-13,-20, "}", Qt::darkBlue, 16.0));
Texts.append(new Text( -5,-20, "0", Qt::darkBlue, 12.0));
Texts.append(new Text( -8, 0, "15", Qt::darkBlue, 12.0));
Texts.append(new Text(-25,-43, "0", QPen::darkBlue, 12.0));
Texts.append(new Text(-25, 17, "3", QPen::darkBlue, 12.0));
Texts.append(new Text(-25,-43, "0", Qt::darkBlue, 12.0));
Texts.append(new Text(-25, 17, "3", Qt::darkBlue, 12.0));
Texts.append(new Text( 15,-59, "0", QPen::darkBlue, 9.0));
Texts.append(new Text( 15,-49, "1", QPen::darkBlue, 9.0));
Texts.append(new Text( 15,-39, "2", QPen::darkBlue, 9.0));
Texts.append(new Text( 15,-29, "3", QPen::darkBlue, 9.0));
Texts.append(new Text( 15,-19, "4", QPen::darkBlue, 9.0));
Texts.append(new Text( 15, -9, "5", QPen::darkBlue, 9.0));
Texts.append(new Text( 15, 1, "6", QPen::darkBlue, 9.0));
Texts.append(new Text( 15, 11, "7", QPen::darkBlue, 9.0));
Texts.append(new Text( 15, 21, "8", QPen::darkBlue, 9.0));
Texts.append(new Text( 15, 31, "9", QPen::darkBlue, 9.0));
Texts.append(new Text( 8, 41, "10", QPen::darkBlue, 9.0));
Texts.append(new Text( 8, 51, "11", QPen::darkBlue, 9.0));
Texts.append(new Text( 8, 61, "12", QPen::darkBlue, 9.0));
Texts.append(new Text( 8, 71, "13", QPen::darkBlue, 9.0));
Texts.append(new Text( 8, 81, "14", QPen::darkBlue, 9.0));
Texts.append(new Text( 8, 91, "15", QPen::darkBlue, 9.0));
Texts.append(new Text( 15,-59, "0", Qt::darkBlue, 9.0));
Texts.append(new Text( 15,-49, "1", Qt::darkBlue, 9.0));
Texts.append(new Text( 15,-39, "2", Qt::darkBlue, 9.0));
Texts.append(new Text( 15,-29, "3", Qt::darkBlue, 9.0));
Texts.append(new Text( 15,-19, "4", Qt::darkBlue, 9.0));
Texts.append(new Text( 15, -9, "5", Qt::darkBlue, 9.0));
Texts.append(new Text( 15, 1, "6", Qt::darkBlue, 9.0));
Texts.append(new Text( 15, 11, "7", Qt::darkBlue, 9.0));
Texts.append(new Text( 15, 21, "8", Qt::darkBlue, 9.0));
Texts.append(new Text( 15, 31, "9", Qt::darkBlue, 9.0));
Texts.append(new Text( 8, 41, "10", Qt::darkBlue, 9.0));
Texts.append(new Text( 8, 51, "11", Qt::darkBlue, 9.0));
Texts.append(new Text( 8, 61, "12", Qt::darkBlue, 9.0));
Texts.append(new Text( 8, 71, "13", Qt::darkBlue, 9.0));
Texts.append(new Text( 8, 81, "14", Qt::darkBlue, 9.0));
Texts.append(new Text( 8, 91, "15", Qt::darkBlue, 9.0));
Lines.append(new Line(-6, 2, 9, 2, QPen(QPen::darkBlue,2)));
Lines.append(new Line(-6, 2, 9, 2, QPen(Qt::darkBlue,2)));
Ports.append(new Port(-50,-50)); // En
Ports.append(new Port(-50,-30)); // A

View File

@ -14,7 +14,7 @@
* (at your option) any later version. *
* *
***************************************************************************/
#include <QtGui>
#include "eqndefined.h"
#include "main.h"
#include "schematic.h"
@ -135,29 +135,29 @@ void EqnDefined::createSymbol()
// draw symbol
int h = (PortDistance/2)*((Num-1)) + PortDistance/2;
Lines.append(new Line(-15, -h, 15, -h,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 15, -h, 15, h,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-15, h, 15, h,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-15, -h,-15, h,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-15, -h, 15, -h,QPen(Qt::darkBlue,2)));
Lines.append(new Line( 15, -h, 15, h,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-15, h, 15, h,QPen(Qt::darkBlue,2)));
Lines.append(new Line(-15, -h,-15, h,QPen(Qt::darkBlue,2)));
i=0;
int y = PortDistance/2-h, yh;
while(i<Num) {
i++;
Lines.append(new Line(-30, y,-15, y,QPen(QPen::darkBlue,2)));
Lines.append(new Line(-30, y,-15, y,QPen(Qt::darkBlue,2)));
Ports.append(new Port(-30, y));
Lines.append(new Line( 7,y-3, 10, y,QPen(QPen::black,1)));
Lines.append(new Line( 7,y+3, 10, y,QPen(QPen::black,1)));
Lines.append(new Line(-10, y, 10, y,QPen(QPen::black,1)));
Lines.append(new Line( 7,y-3, 10, y,QPen(Qt::black,1)));
Lines.append(new Line( 7,y+3, 10, y,QPen(Qt::black,1)));
Lines.append(new Line(-10, y, 10, y,QPen(Qt::black,1)));
if (i > 1) {
yh = y-PortDistance/2;
Lines.append(new Line(-15, yh, 15, yh, QPen(QPen::darkBlue,2)));
Lines.append(new Line(-15, yh, 15, yh, QPen(Qt::darkBlue,2)));
}
Lines.append(new Line( 15, y, 30, y,QPen(QPen::darkBlue,2)));
Lines.append(new Line( 15, y, 30, y,QPen(Qt::darkBlue,2)));
Ports.append(new Port( 30, y));
Texts.append(new Text( 19,y-14,QString::number(i)));
y += PortDistance;

Some files were not shown because too many files have changed in this diff Show More