Qucs-GUI  0.0.18
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Slots | Public Member Functions | Data Fields | Private Slots | Private Attributes
TextDoc Class Reference

The TextDoc class definition. More...

#include <textdoc.h>

Inheritance diagram for TextDoc:
QucsDoc

Public Slots

void slotCursorPosChanged ()
 TextDoc::slotCursorPosChanged update status bar with line:column. More...
 
void slotSetChanged ()
 TextDoc::slotSetChanged togles tab icon to indicate unsaved changes. More...
 

Public Member Functions

 TextDoc (QucsApp *, const QString &)
 TextDoc::TextDoc Text document constructor. More...
 
 ~TextDoc ()
 TextDoc::~TextDoc Text document destructor. More...
 
void setName (const QString &)
 TextDoc::setName sets the text file name on its tab. More...
 
bool load ()
 TextDoc::load loads a text document. More...
 
int save ()
 TextDoc::save saves the current document and it settings. More...
 
float zoomBy (float)
 TextDoc::zoomBy increases/decreases the text font size. More...
 
void showNoZoom ()
 TextDoc::showNoZoom resets the font scaling. More...
 
void becomeCurrent (bool)
 TextDoc::becomeCurrent sets text document as current. More...
 
bool loadSimulationTime (QString &)
 TextDoc::loadSimulationTime set SimTime member variable. More...
 
void commentSelected ()
 TextDoc::commentSelected toggles the comment of selected text See also QucsApp::slotEditActivate. More...
 
void insertSkeleton ()
 TextDoc::insertSkeleton adds a basic skeleton for type of text file. More...
 
void setLanguage (int)
 TextDoc::setLanguage(int) More...
 
void setLanguage (const QString &)
 TextDoc::setLanguage(const QString&) More...
 
QString getModuleName (void)
 TextDoc::getModuleName parse the module name ou of the text file contents. More...
 
bool loadSettings (void)
 TextDoc::loadSettings loads the text document settings. More...
 
bool saveSettings (void)
 TextDoc::saveSettings saves the text document settings .cfg. More...
 
void refreshLanguage (void)
 
QMenu * createStandardContextMenu (const QPoint &)
 TextDoc::createStandardContextMenu creates the standard context menu. More...
 
- Public Member Functions inherited from QucsDoc
 QucsDoc (QucsApp *, const QString &)
 
virtual ~QucsDoc ()
 
virtual void print (QPrinter *, QPainter *, bool, bool)
 
virtual void showAll ()
 
QString fileSuffix (void)
 
QString fileBase (void)
 

Data Fields

QFont TextFont
 
bool simulation
 
QString Library
 
QString Libraries
 
QString ShortDesc
 
QString LongDesc
 
QString Icon
 
bool recreate
 
int devtype
 
bool SetChanged
 
int language
 
- Data Fields inherited from QucsDoc
QString DocName
 
QString DataSet
 
QString DataDisplay
 
QString Script
 
QString SimTime
 
QDateTime lastSaved
 
float Scale
 
QucsAppApp
 
bool DocChanged
 
bool SimOpenDpl
 
bool SimRunScript
 
int showBias
 
bool GridOn
 
int tmpPosX
 
int tmpPosY
 

Private Slots

void highlightCurrentLine ()
 TextDoc::highlightCurrentLine mark the current line. More...
 

Private Attributes

SyntaxHighlightersyntaxHighlight
 

Additional Inherited Members

- Static Public Member Functions inherited from QucsDoc
static QString fileSuffix (const QString &)
 
static QString fileBase (const QString &)
 

Detailed Description

The TextDoc class definition.

Definition at line 49 of file textdoc.h.

Constructor & Destructor Documentation

TextDoc::TextDoc ( QucsApp App_,
const QString &  Name_ 
)

TextDoc::TextDoc Text document constructor.

Parameters
App_is the parent object
Name_is the initial text document name

Definition at line 42 of file textdoc.cpp.

TextDoc::~TextDoc ( )

TextDoc::~TextDoc Text document destructor.

Definition at line 91 of file textdoc.cpp.

Member Function Documentation

void TextDoc::becomeCurrent ( bool  )
virtual

TextDoc::becomeCurrent sets text document as current.

Make sure the menu options are adjusted.

Reimplemented from QucsDoc.

Definition at line 226 of file textdoc.cpp.

void TextDoc::commentSelected ( )

TextDoc::commentSelected toggles the comment of selected text See also QucsApp::slotEditActivate.

Definition at line 424 of file textdoc.cpp.

QMenu * TextDoc::createStandardContextMenu ( const QPoint &  pos)

TextDoc::createStandardContextMenu creates the standard context menu.

Parameters
pos
Returns
Todo:
is this working?

Definition at line 308 of file textdoc.cpp.

QString TextDoc::getModuleName ( void  )

TextDoc::getModuleName parse the module name ou of the text file contents.

Returns
the module name

Definition at line 496 of file textdoc.cpp.

void TextDoc::highlightCurrentLine ( )
privateslot

TextDoc::highlightCurrentLine mark the current line.

Definition at line 527 of file textdoc.cpp.

void TextDoc::insertSkeleton ( )

TextDoc::insertSkeleton adds a basic skeleton for type of text file.

Definition at line 479 of file textdoc.cpp.

bool TextDoc::load ( )
virtual

TextDoc::load loads a text document.

Returns
true/false if the document was opened with success

Reimplemented from QucsDoc.

Definition at line 322 of file textdoc.cpp.

bool TextDoc::loadSettings ( void  )

TextDoc::loadSettings loads the text document settings.

Returns
true/false if settings file opened with success

Definition at line 162 of file textdoc.cpp.

bool TextDoc::loadSimulationTime ( QString &  Time)

TextDoc::loadSimulationTime set SimTime member variable.

Parameters
Timestring with simulation time
Returns
true if SimTime is set

Definition at line 411 of file textdoc.cpp.

void TextDoc::refreshLanguage ( void  )

Definition at line 546 of file textdoc.cpp.

int TextDoc::save ( )
virtual

TextDoc::save saves the current document and it settings.

Returns
true/false if the document was opened with success

clear highlighted lines on save

See Also
MessageDock::slotCursor()

Reimplemented from QucsDoc.

Definition at line 346 of file textdoc.cpp.

bool TextDoc::saveSettings ( void  )

TextDoc::saveSettings saves the text document settings .cfg.

Returns
true/false if settings file opened with success

Definition at line 134 of file textdoc.cpp.

void TextDoc::setLanguage ( int  lang)

TextDoc::setLanguage(int)

Parameters
langis a language_type Assing value to text document object language variable

Definition at line 125 of file textdoc.cpp.

void TextDoc::setLanguage ( const QString &  FileName)

TextDoc::setLanguage(const QString&)

Parameters
FileNameText document file name Extract the file name suffix and assing a language_type to it.

Definition at line 104 of file textdoc.cpp.

void TextDoc::setName ( const QString &  Name_)
virtual

TextDoc::setName sets the text file name on its tab.

Parameters
Name_text file name to be set

Reimplemented from QucsDoc.

Definition at line 206 of file textdoc.cpp.

void TextDoc::showNoZoom ( )
virtual

TextDoc::showNoZoom resets the font scaling.

Reimplemented from QucsDoc.

Definition at line 397 of file textdoc.cpp.

void TextDoc::slotCursorPosChanged ( )
slot

TextDoc::slotCursorPosChanged update status bar with line:column.

Definition at line 273 of file textdoc.cpp.

void TextDoc::slotSetChanged ( )
slot

TextDoc::slotSetChanged togles tab icon to indicate unsaved changes.

Definition at line 286 of file textdoc.cpp.

float TextDoc::zoomBy ( float  s)
virtual

TextDoc::zoomBy increases/decreases the text font size.

Parameters
sfont size scaling factor
Returns
(required) final scale

is the return value being saved on the saveSettings() ?

Reimplemented from QucsDoc.

Definition at line 379 of file textdoc.cpp.

Field Documentation

int TextDoc::devtype

Definition at line 78 of file textdoc.h.

QString TextDoc::Icon

Definition at line 76 of file textdoc.h.

int TextDoc::language

Definition at line 81 of file textdoc.h.

QString TextDoc::Libraries

Definition at line 73 of file textdoc.h.

QString TextDoc::Library

Definition at line 72 of file textdoc.h.

QString TextDoc::LongDesc

Definition at line 75 of file textdoc.h.

bool TextDoc::recreate

Definition at line 77 of file textdoc.h.

bool TextDoc::SetChanged

Definition at line 80 of file textdoc.h.

QString TextDoc::ShortDesc

Definition at line 74 of file textdoc.h.

bool TextDoc::simulation

Definition at line 71 of file textdoc.h.

SyntaxHighlighter* TextDoc::syntaxHighlight
private

Definition at line 94 of file textdoc.h.

QFont TextDoc::TextFont

Definition at line 69 of file textdoc.h.


The documentation for this class was generated from the following files: