Changeset caef58b531 in tspsg for src/mainwindow.cpp


Ignore:
Timestamp:
Oct 20, 2009, 9:38:01 PM (15 years ago)
Author:
Oleksii Serdiuk
Branches:
0.1.3.145-beta1-symbian, 0.1.4.170-beta2-bb10, appveyor, imgbot, master, readme
Children:
85ad815b0b
Parents:
bc1b8837b6
Message:

More code documentation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mainwindow.cpp

    rbc1b8837b6 rcaef58b531  
    2424#include "mainwindow.h"
    2525
     26/*!
     27 * \brief Class constructor.
     28 * \param parent Main Window parent widget.
     29 *
     30 *  Initializes Main Window and creates its layout based on target OS.
     31 *  Loads TSPSG settings and opens a task file if it was specified as a commandline parameter.
     32 */
    2633MainWindow::MainWindow(QWidget *parent)
    2734        : QMainWindow(parent)
     
    484491                output.append("<p>" + trUtf8("<b>WARNING!!!</b><br>This result is a record, but it may not be optimal.<br>Iterations need to be continued to check whether this result is optimal or get an optimal one.") + "</p>");
    485492        }
     493        output.append("<p></p>");
    486494        solutionText->setHtml(output.join(""));
    487495        solutionText->setDocumentTitle(trUtf8("Solution of Variant #%1 task").arg(spinVariant->value()));
     496
     497        // Scrolling to the end of text.
     498QTextCursor cursor(solutionText->textCursor());
     499        cursor.movePosition(QTextCursor::End, QTextCursor::MoveAnchor);
     500        solutionText->setTextCursor(cursor);
     501
    488502        enableSolutionActions();
    489503        tabWidget->setCurrentIndex(1);
     
    493507void MainWindow::actionHelpAboutTriggered()
    494508{
    495         // TODO: Normal about window :-)
     509//! \todo TODO: Normal about window :-)
    496510QString about = QString::fromUtf8("TSPSG: TSP Solver and Generator\n");
    497511        about += QString::fromUtf8("    Version: "BUILD_VERSION"\n");
     
    569583}
    570584
     585/*!
     586 * \brief Handles Main Window close event.
     587 * \param event Close event.
     588 *
     589 *  Checks whether or not a current task was saved and asks for saving if not.
     590 *  Saves TSPSG settings.
     591 */
    571592void MainWindow::closeEvent(QCloseEvent *event)
    572593{
Note: See TracChangeset for help on using the changeset viewer.