texteditor.h
changeset 366 e95081c21da2
parent 190 68c49789ec0b
child 388 3a58c9ef4a18
     1.1 --- a/texteditor.h	Tue Sep 05 09:47:13 2006 +0000
     1.2 +++ b/texteditor.h	Tue Sep 05 09:47:14 2006 +0000
     1.3 @@ -1,12 +1,11 @@
     1.4 -/* emacs: -*- Mode: C; c-style: "bsd"; c-basic-offset: 4; c-recognize-knr-p: nil; -*- */
     1.5  #ifndef TEXTEDITOR_H 
     1.6  #define TEXTEDITOR_H
     1.7  
     1.8 -#include <qmainwindow.h>
     1.9 -#include <qtextedit.h>
    1.10 -#include <qaction.h>
    1.11 -#include <qfontdatabase.h>
    1.12 -#include <qcombobox.h>
    1.13 +#include <QtGui>
    1.14 +#include <QTextEdit>
    1.15 +#include <QFontDatabase>
    1.16 +#include <QComboBox>
    1.17 +#include <QCloseEvent>
    1.18  
    1.19  
    1.20  enum EditorState {inactiveEditor,emptyEditor,filledEditor};
    1.21 @@ -29,7 +28,7 @@
    1.22  	QString getFilename ();
    1.23  	void setFilenameHint (const QString&);
    1.24  	QString getFilenameHint ();
    1.25 -	bool findText(const QString &, const bool &); // find Text 
    1.26 +	bool findText(const QString &, const QTextDocument::FindFlags &); // find Text 
    1.27  
    1.28  protected:
    1.29  	void setupFileActions();
    1.30 @@ -79,6 +78,7 @@
    1.31      void verticalAlignmentChanged(int a);
    1.32  	void enableActions();
    1.33  	void disableActions();
    1.34 +	void setState (EditorState);
    1.35  
    1.36  private:
    1.37      QPrinter *printer;
    1.38 @@ -127,7 +127,7 @@
    1.39  	*actionAlignSuperScript;
    1.40  };
    1.41  
    1.42 -/* Wraps currentVerticalAlignmentChanged(VerticalAlignment)
    1.43 +/* FIXME Wraps currentVerticalAlignmentChanged(VerticalAlignment)
    1.44   * to currentVerticalAlignmentChanged(int) 
    1.45   * this way the signal can be used without use of the internal 
    1.46   * VerticalAlignment enum of QTextEdit 
    1.47 @@ -139,22 +139,27 @@
    1.48  {
    1.49      Q_OBJECT;
    1.50   public:
    1.51 -    MyTextEdit(QWidget *parent, const char *name) : QTextEdit(parent, name) {
    1.52 -	connect(this, 
    1.53 -		SIGNAL(currentVerticalAlignmentChanged(VerticalAlignment)),
    1.54 -		this, 
    1.55 -		SLOT(verticalAlignmentChanged(VerticalAlignment)));
    1.56 +    MyTextEdit(QWidget *parent, const char *name) : QTextEdit(parent, name) 
    1.57 +	{
    1.58 +	/*
    1.59 +		connect(
    1.60 +			this, SIGNAL(currentVerticalAlignmentChanged(VerticalAlignment)), 
    1.61 +			this, SLOT(verticalAlignmentChanged(VerticalAlignment)));
    1.62 +	*/		
    1.63      }
    1.64 -    int verticalAlignment() const { return m_verticalAlignment; } 
    1.65 +//    int verticalAlignment() const { return m_verticalAlignment; } 
    1.66   signals:
    1.67 -    void currentVerticalAlignmentChanged(int a);
    1.68 +//    void currentVerticalAlignmentChanged(int a);
    1.69   public slots:
    1.70 -    void verticalAlignmentChanged(VerticalAlignment a) {
    1.71 -     m_verticalAlignment = a;
    1.72 -	emit currentVerticalAlignmentChanged((int)a);
    1.73 + /*
    1.74 +    void verticalAlignmentChanged(VerticalAlignment a) 
    1.75 +	{
    1.76 +		m_verticalAlignment = a;
    1.77 +		emit currentVerticalAlignmentChanged((int)a);
    1.78      }
    1.79 +*/	
    1.80   private: 
    1.81 - int m_verticalAlignment;
    1.82 +//	 int m_verticalAlignment;
    1.83  };
    1.84  
    1.85  #endif