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::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::~TextEdit ( )

destructor

Member Function Documentation

◆ addAction() [1/2]

void TextEdit::addAction ( QAction *  aAction)
private

method for adding editing action to designated area

◆ addAction() [2/2]

void TextEdit::addAction ( QWidget *  aAction,
bool  aLower = true 
)
private

◆ alignmentChanged()

void TextEdit::alignmentChanged ( Qt::Alignment  a)
private

◆ clipboardDataChanged

void TextEdit::clipboardDataChanged ( )
privateslot

◆ closeEvent()

virtual void TextEdit::closeEvent ( QCloseEvent *  e)
protectedvirtual

◆ colorChanged()

void TextEdit::colorChanged ( const QColor &  c)
private

◆ currentCharFormatChanged

void TextEdit::currentCharFormatChanged ( const QTextCharFormat &  format)
privateslot

◆ cursorPositionChanged

void TextEdit::cursorPositionChanged ( )
privateslot

◆ fileNew

void TextEdit::fileNew ( )
privateslot

◆ fileOpen

void TextEdit::fileOpen ( )
privateslot

◆ filePrint

void TextEdit::filePrint ( )
privateslot

◆ filePrintPdf

void TextEdit::filePrintPdf ( )
privateslot

◆ filePrintPreview

void TextEdit::filePrintPreview ( )
privateslot

◆ fileSave

bool TextEdit::fileSave ( )
privateslot

◆ fileSaveAs

bool TextEdit::fileSaveAs ( )
privateslot

◆ fontChanged()

void TextEdit::fontChanged ( const QFont &  f)
private

◆ initializeTextEditor()

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.

◆ insertImageSelected

void TextEdit::insertImageSelected ( )
privateslot

user says he wants embed an image

◆ insertLinkSelected

void TextEdit::insertLinkSelected ( )
privateslot

user says he wants insert a link

◆ linkReady

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

◆ load()

bool TextEdit::load ( const QString &  f)
private

◆ maybeSave()

bool TextEdit::maybeSave ( )
private

◆ menuBar()

QMenuBar* TextEdit::menuBar ( )
inlineprivate

returns dialog menu bar

◆ mergeFormatOnWordOrSelection()

void TextEdit::mergeFormatOnWordOrSelection ( const QTextCharFormat &  format)
private

◆ printPreview

void TextEdit::printPreview ( QPrinter *  )
privateslot

◆ setCurrentFileName()

void TextEdit::setCurrentFileName ( const QString &  fileName)
private

◆ setupEditActions()

void TextEdit::setupEditActions ( )
private

◆ setupFileActions()

void TextEdit::setupFileActions ( )
private

◆ setupTextActions()

void TextEdit::setupTextActions ( )
private

◆ textAlign

void TextEdit::textAlign ( QAction *  a)
privateslot

◆ textBold

void TextEdit::textBold ( )
privateslot

◆ textColor

void TextEdit::textColor ( )
privateslot

◆ textFamily

void TextEdit::textFamily ( const QString &  f)
privateslot

◆ textItalic

void TextEdit::textItalic ( )
privateslot

◆ textSize

void TextEdit::textSize ( const QString &  p)
privateslot

◆ textStyle

void TextEdit::textStyle ( int  styleIndex)
privateslot

◆ textUnderline

void TextEdit::textUnderline ( )
privateslot

Member Data Documentation

◆ actionAlignCenter

QAction * TextEdit::actionAlignCenter
private

◆ actionAlignJustify

QAction * TextEdit::actionAlignJustify
private

◆ actionAlignLeft

QAction * TextEdit::actionAlignLeft
private

◆ actionAlignRight

QAction * TextEdit::actionAlignRight
private

◆ actionCopy

QAction * TextEdit::actionCopy
private

◆ actionCut

QAction * TextEdit::actionCut
private

◆ actionInsertImage

QAction * TextEdit::actionInsertImage
private

◆ actionInsertLink

QAction * TextEdit::actionInsertLink
private

◆ actionPaste

QAction * TextEdit::actionPaste
private

◆ actionRedo

QAction * TextEdit::actionRedo
private

◆ actionSave

QAction* TextEdit::actionSave
private

◆ actionTextBold

QAction * TextEdit::actionTextBold
private

◆ actionTextColor

QAction * TextEdit::actionTextColor
private

◆ actionTextItalic

QAction * TextEdit::actionTextItalic
private

◆ actionTextUnderline

QAction * TextEdit::actionTextUnderline
private

◆ actionUndo

QAction * TextEdit::actionUndo
private

◆ comboFont

QFontComboBox* TextEdit::comboFont
private

◆ comboSize

QComboBox* TextEdit::comboSize
private

◆ comboStyle

QComboBox* TextEdit::comboStyle
private

◆ fileName

QString TextEdit::fileName
private

◆ iDialogMenuBar

QMenuBar* TextEdit::iDialogMenuBar
private

◆ iWidgetForActionsLower

QLayout* TextEdit::iWidgetForActionsLower
private

◆ iWidgetForActionsUpper

QLayout* TextEdit::iWidgetForActionsUpper
private

◆ tb

QToolBar* TextEdit::tb
private

◆ textEdit

QTextEdit* TextEdit::textEdit
protected

holds the text being edited


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