Classified ads
Public Slots | Public Member Functions | Protected Member Functions | Protected Attributes | Private Slots | Private Member Functions | Private Attributes | List of all members
TextEdit Class Reference

text editor class. More...

#include <textedit.h>

Inheritance diagram for TextEdit:
Inheritance graph
[legend]
Collaboration diagram for TextEdit:
Collaboration graph
[legend]

Public Slots

virtual void linkReady (const QString &aLinkAddress, const QString &aLinkLabel)
 

Public Member Functions

 TextEdit (QWidget *aParent, MController *aController, Profile &aSelectedProfile)
 
 ~TextEdit ()
 
void initializeTextEditor (QTextEdit *aTextEdit, QLayout *aLayOutForMenu, QLayout *aWidgetForActionsUpper, QLayout *aWidgetForActionsLower)
 

Protected Member Functions

virtual void closeEvent (QCloseEvent *e)
 
- Protected Member Functions inherited from DialogBase
 DialogBase (QWidget *aParent, MController *aController, Profile &aSelectedProfile)
 
Hash publishBinaryAttachment (const MetadataQueryDialog::MetadataResultSet &aFileMetadata, bool aForceNoEncryption=false, const QList< Hash > *aBinaryRecipientList=NULL)
 

Protected Attributes

QTextEdit * textEdit
 
- Protected Attributes inherited from DialogBase
MControlleriController
 
ProfileiSelectedProfile
 
QList< MetadataQueryDialog::MetadataResultSetiFilesAboutToBeAttached
 
QLabel * iAttachmentListLabel
 

Private Slots

void fileNew ()
 
void fileOpen ()
 
bool fileSave ()
 
bool fileSaveAs ()
 
void filePrint ()
 
void filePrintPreview ()
 
void filePrintPdf ()
 
void textBold ()
 
void textUnderline ()
 
void textItalic ()
 
void textFamily (const QString &f)
 
void textSize (const QString &p)
 
void textStyle (int styleIndex)
 
void textColor ()
 
void textAlign (QAction *a)
 
void currentCharFormatChanged (const QTextCharFormat &format)
 
void cursorPositionChanged ()
 
void clipboardDataChanged ()
 
void printPreview (QPrinter *)
 
void insertLinkSelected ()
 
void insertImageSelected ()
 

Private Member Functions

void setupFileActions ()
 
void setupEditActions ()
 
void setupTextActions ()
 
bool load (const QString &f)
 
bool maybeSave ()
 
void setCurrentFileName (const QString &fileName)
 
void mergeFormatOnWordOrSelection (const QTextCharFormat &format)
 
void fontChanged (const QFont &f)
 
void colorChanged (const QColor &c)
 
void alignmentChanged (Qt::Alignment a)
 
void addAction (QAction *aAction)
 
void addAction (QWidget *aAction, bool aLower=true)
 
QMenuBar * menuBar ()
 

Private Attributes

QAction * actionSave
 
QAction * actionTextBold
 
QAction * actionTextUnderline
 
QAction * actionTextItalic
 
QAction * actionTextColor
 
QAction * actionAlignLeft
 
QAction * actionAlignCenter
 
QAction * actionAlignRight
 
QAction * actionAlignJustify
 
QAction * actionUndo
 
QAction * actionRedo
 
QAction * actionCut
 
QAction * actionCopy
 
QAction * actionPaste
 
QAction * actionInsertLink
 
QAction * actionInsertImage
 
QComboBox * comboStyle
 
QFontComboBox * comboFont
 
QComboBox * comboSize
 
QToolBar * tb
 
QString fileName
 
QLayout * iWidgetForActionsUpper
 
QLayout * iWidgetForActionsLower
 
QMenuBar * iDialogMenuBar
 

Additional Inherited Members

- Signals inherited from DialogBase
void error (MController::CAErrorSituation aError, const QString &aExplanation)
 
- Protected Slots inherited from DialogBase
void attachButtonClicked ()
 

Detailed Description

text editor class.

This is inteneded for inheritance for dialogs that allow editing of content. Implements a very nice rich text editor.

Constructor & Destructor Documentation

TextEdit::TextEdit ( QWidget *  aParent,
MController aController,
Profile aSelectedProfile 
)

Constructor. Does very basic init only, method TextEdit::initializeTextEditor must be called before this class is functional

TextEdit::~TextEdit ( )

destructor

Member Function Documentation

void TextEdit::addAction ( QAction *  aAction)
private

method for adding editing action to designated area

void TextEdit::addAction ( QWidget *  aAction,
bool  aLower = true 
)
private
void TextEdit::alignmentChanged ( Qt::Alignment  a)
private
void TextEdit::clipboardDataChanged ( )
privateslot
virtual void TextEdit::closeEvent ( QCloseEvent *  e)
protectedvirtual
void TextEdit::colorChanged ( const QColor &  c)
private
void TextEdit::currentCharFormatChanged ( const QTextCharFormat &  format)
privateslot
void TextEdit::cursorPositionChanged ( )
privateslot
void TextEdit::fileNew ( )
privateslot
void TextEdit::fileOpen ( )
privateslot
void TextEdit::filePrint ( )
privateslot
void TextEdit::filePrintPdf ( )
privateslot
void TextEdit::filePrintPreview ( )
privateslot
bool TextEdit::fileSave ( )
privateslot
bool TextEdit::fileSaveAs ( )
privateslot
void TextEdit::fontChanged ( const QFont &  f)
private
void TextEdit::initializeTextEditor ( QTextEdit *  aTextEdit,
QLayout *  aLayOutForMenu,
QLayout *  aWidgetForActionsUpper,
QLayout *  aWidgetForActionsLower 
)

Actual initialization of the editor.

Parameters
aTextEditpointer to actual editing area, allocated by inheriting class that has UI-layout. Inheriting class remains responsible to delete the editor after use.
void TextEdit::insertImageSelected ( )
privateslot

user says he wants embed an image

void TextEdit::insertLinkSelected ( )
privateslot

user says he wants insert a link

virtual void TextEdit::linkReady ( const QString &  aLinkAddress,
const QString &  aLinkLabel 
)
virtualslot

this slot is called when user has finished entering a link and it is ready to be included in the document

bool TextEdit::load ( const QString &  f)
private
bool TextEdit::maybeSave ( )
private
QMenuBar* TextEdit::menuBar ( )
inlineprivate

returns dialog menu bar

void TextEdit::mergeFormatOnWordOrSelection ( const QTextCharFormat &  format)
private
void TextEdit::printPreview ( QPrinter *  )
privateslot
void TextEdit::setCurrentFileName ( const QString &  fileName)
private
void TextEdit::setupEditActions ( )
private
void TextEdit::setupFileActions ( )
private
void TextEdit::setupTextActions ( )
private
void TextEdit::textAlign ( QAction *  a)
privateslot
void TextEdit::textBold ( )
privateslot
void TextEdit::textColor ( )
privateslot
void TextEdit::textFamily ( const QString &  f)
privateslot
void TextEdit::textItalic ( )
privateslot
void TextEdit::textSize ( const QString &  p)
privateslot
void TextEdit::textStyle ( int  styleIndex)
privateslot
void TextEdit::textUnderline ( )
privateslot

Member Data Documentation

QAction * TextEdit::actionAlignCenter
private
QAction * TextEdit::actionAlignJustify
private
QAction * TextEdit::actionAlignLeft
private
QAction * TextEdit::actionAlignRight
private
QAction * TextEdit::actionCopy
private
QAction * TextEdit::actionCut
private
QAction * TextEdit::actionInsertImage
private
QAction * TextEdit::actionInsertLink
private
QAction * TextEdit::actionPaste
private
QAction * TextEdit::actionRedo
private
QAction* TextEdit::actionSave
private
QAction * TextEdit::actionTextBold
private
QAction * TextEdit::actionTextColor
private
QAction * TextEdit::actionTextItalic
private
QAction * TextEdit::actionTextUnderline
private
QAction * TextEdit::actionUndo
private
QFontComboBox* TextEdit::comboFont
private
QComboBox* TextEdit::comboSize
private
QComboBox* TextEdit::comboStyle
private
QString TextEdit::fileName
private
QMenuBar* TextEdit::iDialogMenuBar
private
QLayout* TextEdit::iWidgetForActionsLower
private
QLayout* TextEdit::iWidgetForActionsUpper
private
QToolBar* TextEdit::tb
private
QTextEdit* TextEdit::textEdit
protected

holds the text being edited


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