From 0204f596eb83c452ae7ffeefc728668b414b1f16 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Fri, 6 Sep 2024 09:43:11 +0900 Subject: Finish off About dialog code Signed-off-by: Michele Calgaro --- src/AboutDialog.cpp | 127 +++------------------------------------------------- 1 file changed, 7 insertions(+), 120 deletions(-) (limited to 'src/AboutDialog.cpp') diff --git a/src/AboutDialog.cpp b/src/AboutDialog.cpp index ba70156..0af0152 100644 --- a/src/AboutDialog.cpp +++ b/src/AboutDialog.cpp @@ -20,92 +20,24 @@ #include "config.h" #include "AboutDialog.h" -//----#include "UiGuiVersion.h" - -//----#include -//----#include //----#include #include #include -#include -#include -#include +#include -/* - \class AboutDialog - \brief Displays a dialog window with information about UniversalIndentGUI -*/ -/* - \brief The constructor calls the setup function for the ui created by uic and adds - the GPL text to the text edit. - */ +// Displays a dialog window with information about UniversalIndentGUI AboutDialog::AboutDialog(TQWidget *parent, WFlags flags) : - AboutDialogBase(parent, NULL, FALSE, flags), m_timer(NULL) + AboutDialogBase(parent, NULL, FALSE, flags) { - // For icon setup - const TQString ICONS_PATH(APP_ICONS_PATH); - - bannerLabel->setPixmap(TQPixmap(ICONS_PATH + "banner.png")); -//---- _dialogForm->authorTextBrowser->setOpenExternalLinks(true); -//---- _dialogForm->creditsTextBrowser->setOpenExternalLinks(true); -//---- -//---- TQString versionString = _dialogForm->versionTextBrowser->toHtml(); -//---- versionString = -//---- versionString.arg(PROGRAM_VERSION_STRING); -//---- _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 ;-)

" -//---- ""); -//---- - m_scrollDirection = 1; - m_scrollSpeed = 100; - m_timer = new TQTimer(this); + TQFont titleFont = titleLabel->font(); + titleFont.setPointSize(20); + titleLabel->setFont(titleFont); - connect(m_timer, TQ_SIGNAL(timeout()), this, TQ_SLOT(scroll())); connect(okButton, TQ_SIGNAL(clicked()), this, TQ_SLOT(accept())); } -/* - \brief Catches language change events and retranslates all needed widgets. - */ +// Catches language change events and retranslates all needed widgets. void AboutDialog::changeEvent(TQEvent *event) { //---- if (event->type() == TQEvent::LanguageChange) @@ -123,49 +55,4 @@ void AboutDialog::changeEvent(TQEvent *event) //---- } } -/* - \brief Reimplements the dialog execution function to init the credits scroller. - */ -void AboutDialog::show() -{ -//---- //creditsTextBrowser->verticalScrollBar()->setValue(0); - m_timer->start(m_scrollSpeed); - AboutDialogBase::show(); -} - -/* - \brief This slot is called each m_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() + m_scrollDirection); -//---- -//---- if (scrollBar->value() == scrollBar->maximum()) -//---- { -//---- // Toggle scroll direction and change scroll speed; -//---- m_scrollDirection = -1; -//---- m_scrollSpeed = 5; -//---- m_timer->stop(); -//---- m_timer->start(m_scrollSpeed); -//---- } -//---- else if (scrollBar->value() == scrollBar->minimum()) -//---- { -//---- // Toggle scroll direction and change scroll speed; -//---- m_scrollDirection = 1; -//---- m_scrollSpeed = 100; -//---- m_timer->stop(); -//---- m_timer->start(m_scrollSpeed); -//---- } -//---- -//---- _dialogForm->creditsTextBrowser->update(); -} - -void AboutDialog::accept() -{ - m_timer->stop(); - TQDialog::accept(); -} - #include "AboutDialog.moc" -- cgit v1.2.1