texteditor.h
changeset 388 3a58c9ef4a18
parent 366 e95081c21da2
child 390 0e1aeb21cb78
     1.1 --- a/texteditor.h	Thu Sep 14 11:38:17 2006 +0000
     1.2 +++ b/texteditor.h	Thu Sep 14 11:38:18 2006 +0000
     1.3 @@ -56,8 +56,6 @@
     1.4      void textLoad();
     1.5      void textSaveAs();
     1.6      void textSave();
     1.7 -	void textConvertPar();
     1.8 -	void textJoinLines();
     1.9  	void textExportAsASCII();
    1.10      void textPrint();
    1.11  	void textEditUndo();
    1.12 @@ -74,15 +72,16 @@
    1.13  	void textVAlign();
    1.14      void fontChanged( const QFont &f );
    1.15      void colorChanged( const QColor &c );
    1.16 +	void formatChanged (const QTextCharFormat &f);
    1.17      void alignmentChanged( int a );
    1.18 -    void verticalAlignmentChanged(int a);
    1.19 +    void verticalAlignmentChanged(QTextCharFormat::VerticalAlignment);
    1.20  	void enableActions();
    1.21  	void disableActions();
    1.22  	void setState (EditorState);
    1.23  
    1.24  private:
    1.25      QPrinter *printer;
    1.26 -    MyTextEdit *e;
    1.27 +    QTextEdit *e;
    1.28  	QPoint lastPos;			// save last position of window
    1.29      QString filename;
    1.30      QString filenameHint;
    1.31 @@ -95,9 +94,7 @@
    1.32  
    1.33  	QFont varFont;
    1.34  	QFont fixedFont;
    1.35 -    QComboBox
    1.36 -	*comboFont,
    1.37 -	*comboSize;
    1.38 +    QComboBox *comboFont, *comboSize;
    1.39  	
    1.40  	QAction *actionFileLoad,
    1.41  	*actionFileSave,
    1.42 @@ -109,8 +106,6 @@
    1.43  	*actionEditCut,
    1.44  	*actionEditPaste,
    1.45  	*actionEditDeleteAll,
    1.46 -	*actionEditConvertPar,
    1.47 -	*actionEditJoinLines,
    1.48  	*actionFormatUseFixedFont,
    1.49  	*actionSettingsVarFont,
    1.50  	*actionSettingsFixedFont,
    1.51 @@ -119,47 +114,12 @@
    1.52  	*actionTextUnderline,
    1.53  	*actionTextItalic,
    1.54  	*actionTextColor,
    1.55 +	*actionAlignSubScript,
    1.56 +	*actionAlignSuperScript,
    1.57  	*actionAlignLeft,
    1.58  	*actionAlignCenter,
    1.59  	*actionAlignRight,
    1.60 -	*actionAlignJustify,
    1.61 -	*actionAlignSubScript,
    1.62 -	*actionAlignSuperScript;
    1.63 -};
    1.64 -
    1.65 -/* FIXME Wraps currentVerticalAlignmentChanged(VerticalAlignment)
    1.66 - * to currentVerticalAlignmentChanged(int) 
    1.67 - * this way the signal can be used without use of the internal 
    1.68 - * VerticalAlignment enum of QTextEdit 
    1.69 - * If VerticalAlignment has been a global like the normal alignment there
    1.70 - * have been no problems!
    1.71 - */
    1.72 - 
    1.73 -class MyTextEdit : public QTextEdit 
    1.74 -{
    1.75 -    Q_OBJECT;
    1.76 - public:
    1.77 -    MyTextEdit(QWidget *parent, const char *name) : QTextEdit(parent, name) 
    1.78 -	{
    1.79 -	/*
    1.80 -		connect(
    1.81 -			this, SIGNAL(currentVerticalAlignmentChanged(VerticalAlignment)), 
    1.82 -			this, SLOT(verticalAlignmentChanged(VerticalAlignment)));
    1.83 -	*/		
    1.84 -    }
    1.85 -//    int verticalAlignment() const { return m_verticalAlignment; } 
    1.86 - signals:
    1.87 -//    void currentVerticalAlignmentChanged(int a);
    1.88 - public slots:
    1.89 - /*
    1.90 -    void verticalAlignmentChanged(VerticalAlignment a) 
    1.91 -	{
    1.92 -		m_verticalAlignment = a;
    1.93 -		emit currentVerticalAlignmentChanged((int)a);
    1.94 -    }
    1.95 -*/	
    1.96 - private: 
    1.97 -//	 int m_verticalAlignment;
    1.98 +	*actionAlignJustify;
    1.99  };
   1.100  
   1.101  #endif