mirror of
https://github.com/ra3xdh/qucs_s
synced 2025-03-28 21:13:26 +00:00

* paintings/rectangle.cpp, paintings/portsymbol.cpp, paintings/id_text.cpp, paintings/graphictext.cpp, paintings/graphicline.cpp, paintings/ellipsearc.cpp, paintings/ellipse.cpp, paintings/arrow.cpp (saveCpp): Added support functions for saving drawing as C++ code snippet. * dialogs/vasettingsdialog.cpp (VASettingsDialog): Added new property dialog for Verilog-A files. * textdoc.cpp (getModuleName): Added function to obtain module/entity name of a text file (e.g. Verilog or VHDL). (saveSettings): Saving additional settings for Verilog-A text files. * schematic_file.cpp (saveSymbolCpp): Added code to save C++ symbol drawing code into the dataset of a schematic. (saveDocument): Usin above function to save C++ code of a symbol drawing document associated with a Verilog-A file. * schematic.cpp (adjustPortNumbers): Creating/updating Verilog-A text file's default symbol when switching to symbol page. 2009-10-27 Stefan Jahn <stefan@lkcc.org> * vafile.cpp (VerilogA_File_Info): Added new class parsing ports and module name of a Verilog-A file.
90 lines
2.7 KiB
C++
90 lines
2.7 KiB
C++
/***************************************************************************
|
|
textdoc.h
|
|
-----------
|
|
begin : Sat Mar 11 2006
|
|
copyright : (C) 2006 by Michael Margraf
|
|
email : michael.margraf@alumni.tu-berlin.de
|
|
***************************************************************************/
|
|
|
|
/***************************************************************************
|
|
* *
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
* it under the terms of the GNU General Public License as published by *
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
* (at your option) any later version. *
|
|
* *
|
|
***************************************************************************/
|
|
|
|
#ifndef TEXTDOC_H
|
|
#define TEXTDOC_H
|
|
|
|
#include <qtextedit.h>
|
|
#include <qfont.h>
|
|
|
|
#include "qucsdoc.h"
|
|
|
|
class SyntaxHighlighter;
|
|
|
|
extern const char *smallsave_xpm[];// icon for unsaved files (diskette)
|
|
extern const char *empty_xpm[]; // provides same height than "smallsave_xpm"
|
|
|
|
// device type flags
|
|
#define DEV_BJT 0x0001
|
|
#define DEV_MOS 0x0002
|
|
#define DEV_MASK_DEV 0x00FF
|
|
#define DEV_DIG 0x0100
|
|
#define DEV_ANA 0x0200
|
|
#define DEV_ALL 0x0300
|
|
#define DEV_MASK_TYP 0xFF00
|
|
#define DEV_DEF 0x0200 // default value
|
|
|
|
class TextDoc : public QTextEdit, public QucsDoc {
|
|
Q_OBJECT
|
|
public:
|
|
TextDoc (QucsApp *, const QString&);
|
|
~TextDoc ();
|
|
|
|
void setName (const QString&);
|
|
bool load ();
|
|
int save ();
|
|
void print (QPrinter*, QPainter*, bool, bool);
|
|
float zoomBy (float);
|
|
void showAll ();
|
|
void showNoZoom ();
|
|
void becomeCurrent (bool);
|
|
bool loadSimulationTime (QString&);
|
|
void commentSelected ();
|
|
void insertSkeleton ();
|
|
void setLanguage (int);
|
|
void setLanguage (const QString&);
|
|
QString getModuleName (void);
|
|
|
|
QFont TextFont;
|
|
|
|
bool simulation; // simulation or module
|
|
QString Library; // library this document belongs to
|
|
QString Libraries; // libraries to be linked with
|
|
QString ShortDesc; // icon description
|
|
QString LongDesc; // component description
|
|
QString Icon; // icon file
|
|
bool recreate; // recreate output file
|
|
int devtype; // device type
|
|
|
|
bool SetChanged;
|
|
int language;
|
|
|
|
bool loadSettings (void);
|
|
bool saveSettings (void);
|
|
|
|
QPopupMenu * createPopupMenu (const QPoint&);
|
|
|
|
public slots:
|
|
void slotCursorPosChanged (int, int);
|
|
void slotSetChanged ();
|
|
|
|
private:
|
|
SyntaxHighlighter * syntaxHighlight;
|
|
};
|
|
|
|
#endif
|