qucs_s/qucs/textdoc.h

71 lines
2.1 KiB
C
Raw Normal View History

2006-03-28 06:10:52 +00:00
/***************************************************************************
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>
2006-03-28 06:10:52 +00:00
#include "qucsdoc.h"
2006-04-21 05:58:21 +00:00
class SyntaxHighlighter;
2006-03-28 06:10:52 +00:00
extern const char *smallsave_xpm[];// icon for unsaved files (diskette)
extern const char *empty_xpm[]; // provides same height than "smallsave_xpm"
class TextDoc : public QTextEdit, public QucsDoc {
Q_OBJECT
public:
TextDoc(QucsApp*, const QString&);
~TextDoc();
2006-04-10 06:12:35 +00:00
void setName(const QString&);
bool load();
int save();
2006-07-24 06:12:23 +00:00
void print(QPrinter*, QPainter*, bool, bool);
2006-11-06 06:58:05 +00:00
float zoomBy(float);
2006-04-18 06:03:52 +00:00
void showAll();
void showNoZoom();
2006-04-10 06:12:35 +00:00
void becomeCurrent(bool);
bool loadSimulationTime(QString&);
void outcommmentSelected();
void setLanguage(int);
QFont TextFont;
2006-03-28 06:10:52 +00:00
bool simulation; // simulation or module
QString Library; // library this document belongs to
QString Libraries; // libraries to be linked with
bool SetChanged;
bool loadSettings(void);
bool saveSettings(void);
QPopupMenu *createPopupMenu( const QPoint & );
2006-03-28 06:10:52 +00:00
public slots:
2006-04-18 06:03:52 +00:00
void slotCursorPosChanged(int, int);
2006-03-28 06:10:52 +00:00
void slotSetChanged();
private:
int language;
2006-04-10 06:12:35 +00:00
SyntaxHighlighter *syntaxHighlight;
2006-03-28 06:10:52 +00:00
};
#endif