From 430373ae38565e0d7f62b8fca0cbad73de73ec7f Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Fri, 5 Aug 2022 10:54:12 +0900 Subject: Format code using uncrustify Signed-off-by: Michele Calgaro --- src/AboutDialog.cpp | 209 +++++++++++++++++++++++++++------------------------- 1 file changed, 108 insertions(+), 101 deletions(-) mode change 100755 => 100644 src/AboutDialog.cpp (limited to 'src/AboutDialog.cpp') diff --git a/src/AboutDialog.cpp b/src/AboutDialog.cpp old mode 100755 new mode 100644 index 7f22ece..3cbdf4f --- a/src/AboutDialog.cpp +++ b/src/AboutDialog.cpp @@ -37,126 +37,133 @@ \brief The constructor calls the setup function for the ui created by uic and adds the GPL text to the text edit. */ -AboutDialog::AboutDialog(TQWidget *parent, TQt::WindowFlags flags) : TQDialog(parent, flags) - , _dialogForm(NULL) - , _timer(NULL) - { - _dialogForm = new Ui::AboutDialog(); - _dialogForm->setupUi(this); - - _dialogForm->authorTextBrowser->setOpenExternalLinks( true ); - _dialogForm->creditsTextBrowser->setOpenExternalLinks( true ); - - TQString versionString = _dialogForm->versionTextBrowser->toHtml(); - versionString = versionString.arg(PROGRAM_VERSION_STRING).arg( UiGuiVersion::getBuildRevision() ).arg( UiGuiVersion::getBuildDate() ); - _dialogForm->versionTextBrowser->setHtml(versionString); - - _dialogForm->creditsTextBrowser->setHtml("" - "
 
" - "

Thanks go out to

" - "

Nelson Tai for Chinese translation, good ideas and always fast answers.


" - "

Sebastian Pipping for helping me bring UiGUI into the Debian repository and other good ideas.


" - "

Oleksandr for Ukrainian and Russian translation.


" - "

Erwan "leg" for French translation and the icon logo.


" - "

The Scintilla project for their great text editing component.


" - "

Riverbank for their Scintilla TQt wrapper TQScintilla.


" - "

The Artistic Style project.


" - "

The BCPP project.


" - "

The Cobol Beautifier project.


" - "

The CSSTidy project.


" - "

The Fortran 90 PPR project.


" - "

The GNU Indent project.


" - "

The GreatCode project.


" - "

The hindent project.


" - "

The HTB project.


" - "

The HTML Tidy project.


" - "

The JsDecoder project.


" - "

The JSPPP project.


" - "

The Perltidy project.


" - "

The PHP_Beautifier project.


" - "

The phpCB project.


" - "

The PHP Stylist project.


" - "

The pindent project.


" - "

The Pl/Sql tidy project.


" - "

The Ruby Beautifier project.


" - "

The Ruby Formatter project.


" - "

The Shell Indent project.


" - "

The Uncrustify project, specially Ben Gardner.


" - "

The VBSBeautifier project.


" - "

The XML Indent project.


" - "

Nirvash for the initial Japanese translation.


" - "

The Tango Project for their icons.


" - "

famfamfam for the flag icons.


" - "

Trolltech for their really great GUI framework .


" - "

My girlfriend (meanwhile also wife) for putting my head right and not sit all the time in front of my computer ;-)

" - ""); - - _scrollDirection = 1; - _scrollSpeed = 100; - _timer = new TQTimer(this); - connect( _timer, SIGNAL(timeout()), this, SLOT(scroll()) ); - connect( this, SIGNAL(accepted()), _timer, SLOT(stop()) ); +AboutDialog::AboutDialog(TQWidget *parent, TQt::WindowFlags flags) : + TQDialog(parent, flags), _dialogForm(NULL), _timer(NULL) +{ + _dialogForm = new Ui::AboutDialog(); + _dialogForm->setupUi(this); + + _dialogForm->authorTextBrowser->setOpenExternalLinks(true); + _dialogForm->creditsTextBrowser->setOpenExternalLinks(true); + + TQString versionString = _dialogForm->versionTextBrowser->toHtml(); + versionString = + versionString.arg(PROGRAM_VERSION_STRING).arg(UiGuiVersion::getBuildRevision()).arg( + UiGuiVersion::getBuildDate()); + _dialogForm->versionTextBrowser->setHtml(versionString); + + _dialogForm->creditsTextBrowser->setHtml("" + "
 
" + "

Thanks go out to

" + "

Nelson Tai for Chinese translation, good ideas and always fast answers.


" + "

Sebastian Pipping for helping me bring UiGUI into the Debian repository and other good ideas.


" + "

Oleksandr for Ukrainian and Russian translation.


" + "

Erwan "leg" for French translation and the icon logo.


" + "

The Scintilla project for their great text editing component.


" + "

Riverbank for their Scintilla TQt wrapper TQScintilla.


" + "

The Artistic Style project.


" + "

The BCPP project.


" + "

The Cobol Beautifier project.


" + "

The CSSTidy project.


" + "

The Fortran 90 PPR project.


" + "

The GNU Indent project.


" + "

The GreatCode project.


" + "

The hindent project.


" + "

The HTB project.


" + "

The HTML Tidy project.


" + "

The JsDecoder project.


" + "

The JSPPP project.


" + "

The Perltidy project.


" + "

The PHP_Beautifier project.


" + "

The phpCB project.


" + "

The PHP Stylist project.


" + "

The pindent project.


" + "

The Pl/Sql tidy project.


" + "

The Ruby Beautifier project.


" + "

The Ruby Formatter project.


" + "

The Shell Indent project.


" + "

The Uncrustify project, specially Ben Gardner.


" + "

The VBSBeautifier project.


" + "

The XML Indent project.


" + "

Nirvash for the initial Japanese translation.


" + "

The Tango Project for their icons.


" + "

famfamfam for the flag icons.


" + "

Trolltech for their really great GUI framework .


" + "

My girlfriend (meanwhile also wife) for putting my head right and not sit all the time in front of my computer ;-)

" + ""); + + _scrollDirection = 1; + _scrollSpeed = 100; + _timer = new TQTimer(this); + connect(_timer, SIGNAL(timeout()), this, SLOT(scroll())); + connect(this, SIGNAL(accepted()), _timer, SLOT(stop())); } - /*! \brief Catches language change events and retranslates all needed widgets. */ -void AboutDialog::changeEvent(TQEvent *event) { - if (event->type() == TQEvent::LanguageChange) { - _dialogForm->retranslateUi(this); - - TQString versionString = _dialogForm->versionTextBrowser->toHtml(); - versionString = versionString.arg(PROGRAM_VERSION_STRING).arg( UiGuiVersion::getBuildRevision() ).arg( UiGuiVersion::getBuildDate() ); - _dialogForm->versionTextBrowser->setHtml(versionString); - } - else { - TQWidget::changeEvent(event); - } +void AboutDialog::changeEvent(TQEvent *event) +{ + if (event->type() == TQEvent::LanguageChange) + { + _dialogForm->retranslateUi(this); + + TQString versionString = _dialogForm->versionTextBrowser->toHtml(); + versionString = + versionString.arg(PROGRAM_VERSION_STRING).arg(UiGuiVersion::getBuildRevision()).arg( + UiGuiVersion::getBuildDate()); + _dialogForm->versionTextBrowser->setHtml(versionString); + } + else + { + TQWidget::changeEvent(event); + } } - /*! \brief Reimplements the dialog execution function to init the credits scroller. */ -int AboutDialog::exec() { - //creditsTextBrowser->verticalScrollBar()->setValue(0); - _timer->start(_scrollSpeed); - return TQDialog::exec(); +int AboutDialog::exec() +{ + //creditsTextBrowser->verticalScrollBar()->setValue(0); + _timer->start(_scrollSpeed); + return TQDialog::exec(); } - /*! \brief This slot is called each _timer timeout to scroll the credits textbrowser. Also changes the scroll direction and speed when reaching the start or end. */ -void AboutDialog::scroll() { - TQScrollBar *scrollBar = _dialogForm->creditsTextBrowser->verticalScrollBar(); - scrollBar->setValue( scrollBar->value()+_scrollDirection ); - - if ( scrollBar->value() == scrollBar->maximum() ) { - // Toggle scroll direction and change scroll speed; - _scrollDirection = -1; - _scrollSpeed = 5; - _timer->stop(); - _timer->start(_scrollSpeed); - } - else if ( scrollBar->value() == scrollBar->minimum() ) { - // Toggle scroll direction and change scroll speed; - _scrollDirection = 1; - _scrollSpeed = 100; - _timer->stop(); - _timer->start(_scrollSpeed); - } - - _dialogForm->creditsTextBrowser->update(); +void AboutDialog::scroll() +{ + TQScrollBar *scrollBar = _dialogForm->creditsTextBrowser->verticalScrollBar(); + scrollBar->setValue(scrollBar->value() + _scrollDirection); + + if (scrollBar->value() == scrollBar->maximum()) + { + // Toggle scroll direction and change scroll speed; + _scrollDirection = -1; + _scrollSpeed = 5; + _timer->stop(); + _timer->start(_scrollSpeed); + } + else if (scrollBar->value() == scrollBar->minimum()) + { + // Toggle scroll direction and change scroll speed; + _scrollDirection = 1; + _scrollSpeed = 100; + _timer->stop(); + _timer->start(_scrollSpeed); + } + + _dialogForm->creditsTextBrowser->update(); } - /*! \brief Shows the about dialog and also starts the credits scroller. */ -void AboutDialog::show() { - _timer->start(_scrollSpeed); - TQDialog::show(); +void AboutDialog::show() +{ + _timer->start(_scrollSpeed); + TQDialog::show(); } -- cgit v1.2.3