summaryrefslogtreecommitdiffstats
path: root/tqtinterface/qt4/tools/designer/examples/richedit/richedit.ui.h
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2019-04-21 23:28:33 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2019-04-21 23:28:33 +0900
commit1df632a0e6e550a5a100247c6b4713078e78f413 (patch)
treee8577c3d310285ebb4c8beea37998f408286bda3 /tqtinterface/qt4/tools/designer/examples/richedit/richedit.ui.h
parent012b00740f33c01949c88d7ea97e2dee81fabb41 (diff)
downloadexperimental-r14.0.7.tar.gz
experimental-r14.0.7.zip
Removed unnecessary and/or TDE-unrelated code.r14.0.7
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'tqtinterface/qt4/tools/designer/examples/richedit/richedit.ui.h')
-rw-r--r--tqtinterface/qt4/tools/designer/examples/richedit/richedit.ui.h120
1 files changed, 0 insertions, 120 deletions
diff --git a/tqtinterface/qt4/tools/designer/examples/richedit/richedit.ui.h b/tqtinterface/qt4/tools/designer/examples/richedit/richedit.ui.h
deleted file mode 100644
index e99a3ab..0000000
--- a/tqtinterface/qt4/tools/designer/examples/richedit/richedit.ui.h
+++ /dev/null
@@ -1,120 +0,0 @@
-void EditorForm::init()
-{
- textEdit->setFocus();
-
- TQFontDatabase fonts;
- fontComboBox->insertStringList( fonts.families() );
- TQString font = textEdit->family();
- font = font.lower();
- for ( int i = 0 ; i < fontComboBox->count(); i++ ) {
- if ( font == fontComboBox->text( i ) ) {
- fontComboBox->setCurrentItem( i );
- break;
- }
- }
-}
-
-void EditorForm::fileExit()
-{
- if ( saveAndContinue( "Exit" ) )
- tqApp->exit();
-}
-
-void EditorForm::fileNew()
-{
- if ( saveAndContinue( "New" ) )
- textEdit->clear();
-}
-
-void EditorForm::fileOpen()
-{
- if ( saveAndContinue( "Open" ) ) {
- TQString fn( TQFileDialog::getOpenFileName(
- TQString(),
- "Rich Text Files (*.htm*)", this ) );
- if ( !fn.isEmpty() ) {
- fileName = fn;
- TQFile file( fileName );
- if ( file.open( IO_ReadOnly ) ) {
- TQTextStream ts( &file );
- textEdit->setText( ts.read() );
- }
- }
- }
-}
-
-void EditorForm::fileSave()
-{
- if ( fileName.isEmpty() ) {
- fileSaveAs();
- } else {
- TQFile f( fileName );
- if ( f.open( IO_WriteOnly ) ) {
- TQTextStream ts( &f );
- ts << textEdit->text();
- textEdit->setModified( FALSE );
- }
- }
-}
-
-void EditorForm::fileSaveAs()
-{
- TQString fn = TQFileDialog::getSaveFileName(
- "", "Rich Text Files (*.htm*)", this );
- if ( !fn.isEmpty() ) {
- fileName = fn;
- fileSave();
- }
-}
-
-void EditorForm::helpAbout()
-{
-
-}
-
-void EditorForm::helpContents()
-{
-
-}
-
-void EditorForm::helpIndex()
-{
-
-}
-
-void EditorForm::changeAlignment(TQAction * align)
-{
- if ( align == leftAlignAction )
- textEdit->tqsetAlignment( TQt::AlignLeft );
- else if ( align == rightAlignAction )
- textEdit->tqsetAlignment( TQt::AlignRight );
- else if ( align == centerAlignAction )
- textEdit->tqsetAlignment( TQt::AlignCenter );
-}
-
-int EditorForm::saveAndContinue(const TQString & action)
-{
- int continueAction = 1;
-
- if ( textEdit->isModified() ) {
- switch( TQMessageBox::information(
- this, "Rich Edit",
- "The document contains unsaved changes.\n"
- "Do you want to save the changes?",
- "&Save", "&Don't Save", "&Cancel " + action,
- 0, // Enter == button 0
- 2 ) ) { // Escape == button 2
- case 0: // Save; continue
- fileSave();
- break;
- case 1: // Do not save; continue
- break;
- case 2: // Cancel
- continueAction = 0;
- break;
- }
- }
-
- return continueAction;
-}
-