changeset 751:ac165b6ae67e

Done some refactoring: - Moved includes into the cpp files where possible and using class pre-declarations if possible - Made class member variable names begin with an underscore - Made by uic created header files be used as class members instead of inherting them - Renamed some variables to reflect their purpose better - Added some NULL initializations and added some comments - Rearranged some include and declaration code parts to be consistent and better readable - Updated for QScintilla 2.4.5 - Made UiGuiSettings be accessed via a shared pointer only git-svn-id: svn://svn.code.sf.net/p/universalindent/code/trunk@1028 59b1889a-e5ac-428c-b0c7-476e01d41282
author thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
date Thu, 14 Oct 2010 19:52:47 +0000
parents a884b5861e93
children ffca9bf0d378
files src/AboutDialog.cpp src/AboutDialog.h src/AboutDialogGraphicsView.cpp src/AboutDialogGraphicsView.h src/IndentHandler.cpp src/IndentHandler.h src/MainWindow.cpp src/MainWindow.h src/SettingsPaths.cpp src/SettingsPaths.h src/UiGuiErrorMessage.cpp src/UiGuiErrorMessage.h src/UiGuiHighlighter.cpp src/UiGuiHighlighter.h src/UiGuiIndentServer.cpp src/UiGuiIndentServer.h src/UiGuiIniFileParser.cpp src/UiGuiIniFileParser.h src/UiGuiLogger.cpp src/UiGuiLogger.h src/UiGuiSettings.cpp src/UiGuiSettings.h src/UiGuiSettingsDialog.cpp src/UiGuiSettingsDialog.h src/UiGuiSystemInfo.h src/UpdateCheckDialog.cpp src/UpdateCheckDialog.h src/main.cpp
diffstat 28 files changed, 1672 insertions(+), 1528 deletions(-) [+]
line wrap: on
line diff
--- a/src/AboutDialog.cpp	Sat Oct 02 12:48:56 2010 +0000
+++ b/src/AboutDialog.cpp	Thu Oct 14 19:52:47 2010 +0000
@@ -19,14 +19,15 @@
 
 #include "AboutDialog.h"
 #include "ui_AboutDialog.h"
+
 #include "UiGuiVersion.h"
 
 #include <QUrl>
 #include <QDesktopServices>
 #include <QScrollBar>
 #include <QTimer>
+#include <QLocale>
 
-#include <QLocale>
 /*!
     \class AboutDialog
     \brief Displays a dialog window with information about UniversalIndentGUI
@@ -36,19 +37,21 @@
     \brief The constructor calls the setup function for the ui created by uic and adds
     the GPL text to the text edit.
  */
-AboutDialog::AboutDialog(QWidget *parent, Qt::WindowFlags flags) : QDialog(parent, flags) {
-    this->parent = parent;
-    dialogForm = new Ui::AboutDialog();
-    dialogForm->setupUi(this);
+AboutDialog::AboutDialog(QWidget *parent, Qt::WindowFlags flags) : QDialog(parent, flags)
+	, _dialogForm(NULL)
+	, _timer(NULL)
+ {
+    _dialogForm = new Ui::AboutDialog();
+    _dialogForm->setupUi(this);
 
-    dialogForm->authorTextBrowser->setOpenExternalLinks( true );
-    dialogForm->creditsTextBrowser->setOpenExternalLinks( true );
+    _dialogForm->authorTextBrowser->setOpenExternalLinks( true );
+    _dialogForm->creditsTextBrowser->setOpenExternalLinks( true );
 
-    QString versionString = dialogForm->versionTextBrowser->toHtml();
+    QString versionString = _dialogForm->versionTextBrowser->toHtml();
     versionString = versionString.arg(PROGRAM_VERSION_STRING).arg( UiGuiVersion::getBuildRevision() ).arg( UiGuiVersion::getBuildDate() );
-    dialogForm->versionTextBrowser->setHtml(versionString);
+    _dialogForm->versionTextBrowser->setHtml(versionString);
 
-    dialogForm->creditsTextBrowser->setHtml("<html><head></head><body>"
+    _dialogForm->creditsTextBrowser->setHtml("<html><head></head><body>"
         "<pre> </br></pre>"
         "<h3 align='center'>Thanks go out to</h3>"
         "<p align='center'><a href=\"http://www.csie.nctu.edu.tw/~chtai/\"><b>Nelson Tai</b></a> for Chinese translation, good ideas and always fast answers.</p></br>"
@@ -88,11 +91,11 @@
         "<h3 align='center'>My girlfriend (meanwhile also wife) for putting my head right and not sit all the time in front of my computer ;-)</h3>"
         "</body></html>");
 
-    scrollDirection = 1;
-    scrollSpeed = 100;
-    timer = new QTimer(this);
-    connect( timer, SIGNAL(timeout()), this, SLOT(scroll()) );
-    connect( this, SIGNAL(accepted()), timer, SLOT(stop()) );
+    _scrollDirection = 1;
+    _scrollSpeed = 100;
+    _timer = new QTimer(this);
+    connect( _timer, SIGNAL(timeout()), this, SLOT(scroll()) );
+    connect( this, SIGNAL(accepted()), _timer, SLOT(stop()) );
 }
 
 
@@ -101,11 +104,11 @@
  */
 void AboutDialog::changeEvent(QEvent *event) {
     if (event->type() == QEvent::LanguageChange) {
-        dialogForm->retranslateUi(this);
+        _dialogForm->retranslateUi(this);
 
-        QString versionString = dialogForm->versionTextBrowser->toHtml();
+        QString versionString = _dialogForm->versionTextBrowser->toHtml();
         versionString = versionString.arg(PROGRAM_VERSION_STRING).arg( UiGuiVersion::getBuildRevision() ).arg( UiGuiVersion::getBuildDate() );
-        dialogForm->versionTextBrowser->setHtml(versionString);
+        _dialogForm->versionTextBrowser->setHtml(versionString);
     }
     else {
         QWidget::changeEvent(event);
@@ -118,35 +121,35 @@
  */
 int AboutDialog::exec() {
     //creditsTextBrowser->verticalScrollBar()->setValue(0);
-    timer->start(scrollSpeed);
+    _timer->start(_scrollSpeed);
     return QDialog::exec();
 }
 
 
 /*!
-    \brief This slot is called each timer timeout to scroll the credits textbrowser.
+    \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() {
-    QScrollBar *scrollBar = dialogForm->creditsTextBrowser->verticalScrollBar();
-    scrollBar->setValue( scrollBar->value()+scrollDirection );
+    QScrollBar *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);
+        _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);
+        _scrollDirection = 1;
+        _scrollSpeed = 100;
+        _timer->stop();
+        _timer->start(_scrollSpeed);
     }
 
-    dialogForm->creditsTextBrowser->update();
+    _dialogForm->creditsTextBrowser->update();
 }
 
 
@@ -154,6 +157,6 @@
     \brief Shows the about dialog and also starts the credits scroller.
  */
 void AboutDialog::show() {
-    timer->start(scrollSpeed);
+    _timer->start(_scrollSpeed);
     QDialog::show();
 }
--- a/src/AboutDialog.h	Sat Oct 02 12:48:56 2010 +0000
+++ b/src/AboutDialog.h	Thu Oct 14 19:52:47 2010 +0000
@@ -26,12 +26,13 @@
 	class AboutDialog;
 }
 
+
 class AboutDialog : public QDialog
 {
     Q_OBJECT
 
 public:
-    AboutDialog(QWidget *parent = 0, Qt::WindowFlags flags = 0);
+    AboutDialog(QWidget *parent = NULL, Qt::WindowFlags flags = 0);
 
 public slots:
     int exec();
@@ -43,14 +44,10 @@
 private:
     void changeEvent(QEvent *event);
 
-	Ui::AboutDialog* dialogForm;
-
-    QString gplText;
-    QString textBrowserSavedContent;
-    int scrollDirection;
-    int scrollSpeed;
-    QTimer *timer;
-    QWidget *parent;
+	Ui::AboutDialog* _dialogForm;
+    int _scrollDirection;
+    int _scrollSpeed;
+    QTimer *_timer;
 };
 
 #endif // ABOUTDIALOG_H
--- a/src/AboutDialogGraphicsView.cpp	Sat Oct 02 12:48:56 2010 +0000
+++ b/src/AboutDialogGraphicsView.cpp	Thu Oct 14 19:52:47 2010 +0000
@@ -16,8 +16,16 @@
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/
+
+#include "AboutDialogGraphicsView.h"
+
+#include "AboutDialog.h"
+
 #include <QtGui>
-#include "AboutDialogGraphicsView.h"
+#include <QDesktopWidget>
+#include <QDate>
+#include <QTimeLine>
+#include <QSplashScreen>
 
 /*!
     \class AboutDialogGraphicsView
@@ -31,8 +39,14 @@
 /*!
     \brief The constructor initializes everything needed for the 3D animation.
  */
-AboutDialogGraphicsView::AboutDialogGraphicsView(AboutDialog *aboutDialog, QWidget *parent) : QGraphicsView(parent) {
-    this->parent = parent;
+AboutDialogGraphicsView::AboutDialogGraphicsView(AboutDialog *aboutDialog, QWidget *parentWindow) : QGraphicsView(parentWindow)
+	, _aboutDialog(NULL)
+	, _graphicsProxyWidget(NULL)
+	, _parentWindow(NULL)
+	, _timeLine(NULL)
+	, _aboutDialogAsSplashScreen(NULL)
+{
+    _parentWindow = parentWindow;
     setWindowFlags(Qt::SplashScreen);
 
 #ifdef Q_OS_LINUX
@@ -43,17 +57,16 @@
 #endif
     setGeometry( newGeometry );
 
-    this->aboutDialog = aboutDialog;
+    _aboutDialog = aboutDialog;
 
-    windowTitleBarWidth = 0;
-    windowPosOffset = 0;
+    _windowTitleBarWidth = 0;
+    _windowPosOffset = 0;
 
-    scene = new QGraphicsScene(this);
+    QGraphicsScene *scene = new QGraphicsScene(this);
     setSceneRect( newGeometry );
-    aboutDialogAsSplashScreen = new QSplashScreen(this);
-    //aboutDialogAsSplashScreen->setPixmap( QPixmap::grabWidget(aboutDialog) );
-    graphicsProxyWidget = scene->addWidget(aboutDialogAsSplashScreen);
-    graphicsProxyWidget->setWindowFlags( Qt::ToolTip );
+    _aboutDialogAsSplashScreen = new QSplashScreen(this);
+    _graphicsProxyWidget = scene->addWidget(_aboutDialogAsSplashScreen);
+    _graphicsProxyWidget->setWindowFlags( Qt::ToolTip );
 
     setScene( scene );
     setRenderHint(QPainter::Antialiasing);
@@ -61,7 +74,7 @@
     setCacheMode(QGraphicsView::CacheBackground);
     setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);
 
-    connect(aboutDialog, SIGNAL(finished(int)), this, SLOT(hide()));
+    connect(_aboutDialog, SIGNAL(finished(int)), this, SLOT(hide()));
 
     //setWindowOpacity(0.9);
 
@@ -69,11 +82,11 @@
     setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
     setStyleSheet("AboutDialogGraphicsView { border: 0px; }");
 
-    timeLine = new QTimeLine(1000, this);
-    timeLine->setFrameRange(270, 0);
-    //timeLine->setUpdateInterval(10);
-    //timeLine->setCurveShape(QTimeLine::EaseInCurve);
-    connect(timeLine, SIGNAL(frameChanged(int)), this, SLOT(updateStep(int)));
+    _timeLine = new QTimeLine(1000, this);
+    _timeLine->setFrameRange(270, 0);
+    //_timeLine->setUpdateInterval(10);
+    //_timeLine->setCurveShape(QTimeLine::EaseInCurve);
+    connect(_timeLine, SIGNAL(frameChanged(int)), this, SLOT(updateStep(int)));
 }
 
 
@@ -87,16 +100,16 @@
  */
 void AboutDialogGraphicsView::show() {
     // Because on X11 system the window decoration is only available after a widget has been shown once,
-    // we can detect windowTitleBarWidth here for the first time.
-    windowTitleBarWidth = parent->geometry().y() - parent->y();
-    // If the windowTitleBarWidth could not be determined, try it a second way. Even the chances are low to get good results.
-    if ( windowTitleBarWidth == 0 )
-        windowTitleBarWidth = parent->frameGeometry().height() - parent->geometry().height();
+    // we can detect _windowTitleBarWidth here for the first time.
+    _windowTitleBarWidth = _parentWindow->geometry().y() - _parentWindow->y();
+    // If the _windowTitleBarWidth could not be determined, try it a second way. Even the chances are low to get good results.
+    if ( _windowTitleBarWidth == 0 )
+        _windowTitleBarWidth = _parentWindow->frameGeometry().height() - _parentWindow->geometry().height();
 #ifdef Q_OS_LINUX
-    if ( windowTitleBarWidth == 0 ) {
+    if ( _windowTitleBarWidth == 0 ) {
         //TODO: 27 pixel is a fix value for the Ubuntu 10.4 default window theme and so just a workaround for that specific case.
-        windowPosOffset = 27;
-        windowTitleBarWidth = 27;
+        _windowPosOffset = 27;
+        _windowTitleBarWidth = 27;
     }
 #endif
     QPixmap originalPixmap = QPixmap::grabWindow(QApplication::desktop()->winId(), QApplication::desktop()->availableGeometry().x(), QApplication::desktop()->availableGeometry().y(), geometry().width(), geometry().height() );
@@ -107,27 +120,27 @@
 
     setBackgroundBrush(brush);
 
-    aboutDialogAsSplashScreen->setPixmap( QPixmap::grabWidget(aboutDialog) );
-    graphicsProxyWidget->setGeometry( aboutDialog->geometry() );
-    aboutDialog->hide();
-    graphicsProxyWidget->setPos( parent->geometry().x()+(parent->geometry().width()-graphicsProxyWidget->geometry().width()) / 2, parent->y()+windowTitleBarWidth-windowPosOffset);
+    _aboutDialogAsSplashScreen->setPixmap( QPixmap::grabWidget(_aboutDialog) );
+    _graphicsProxyWidget->setGeometry( _aboutDialog->geometry() );
+    _aboutDialog->hide();
+    _graphicsProxyWidget->setPos( _parentWindow->geometry().x()+(_parentWindow->geometry().width()-_graphicsProxyWidget->geometry().width()) / 2, _parentWindow->y()+_windowTitleBarWidth-_windowPosOffset);
 
-    QRectF r = graphicsProxyWidget->boundingRect();
-    graphicsProxyWidget->setTransform(QTransform()
-        .translate(r.width() / 2, -windowTitleBarWidth)
+    QRectF r = _graphicsProxyWidget->boundingRect();
+    _graphicsProxyWidget->setTransform(QTransform()
+        .translate(r.width() / 2, -_windowTitleBarWidth)
         .rotate(270, Qt::XAxis)
         //.rotate(90, Qt::YAxis)
         //.rotate(5, Qt::ZAxis)
         //.scale(1 + 1.5 * step, 1 + 1.5 * step)
-        .translate(-r.width() / 2, windowTitleBarWidth));
+        .translate(-r.width() / 2, _windowTitleBarWidth));
 
-    graphicsProxyWidget->show();
-    //aboutDialogAsSplashScreen->show();
+    _graphicsProxyWidget->show();
+    //_aboutDialogAsSplashScreen->show();
     QGraphicsView::show();
 
-    connect(timeLine, SIGNAL(finished()), this, SLOT(showAboutDialog()));
-    timeLine->setDirection(QTimeLine::Forward);
-    timeLine->start();
+    connect(_timeLine, SIGNAL(finished()), this, SLOT(showAboutDialog()));
+    _timeLine->setDirection(QTimeLine::Forward);
+    _timeLine->start();
 }
 
 
@@ -135,14 +148,14 @@
     \brief Does the next calculation/transformation step.
  */
 void AboutDialogGraphicsView::updateStep(int step) {
-    QRectF r = graphicsProxyWidget->boundingRect();
-    graphicsProxyWidget->setTransform(QTransform()
-        .translate(r.width() / 2, -windowTitleBarWidth)
+    QRectF r = _graphicsProxyWidget->boundingRect();
+    _graphicsProxyWidget->setTransform(QTransform()
+        .translate(r.width() / 2, -_windowTitleBarWidth)
         .rotate(step, Qt::XAxis)
         //.rotate(step, Qt::YAxis)
         //.rotate(step * 5, Qt::ZAxis)
         //.scale(1 + 1.5 * step, 1 + 1.5 * step)
-        .translate(-r.width() / 2, windowTitleBarWidth));
+        .translate(-r.width() / 2, _windowTitleBarWidth));
     //update();
 }
 
@@ -152,9 +165,9 @@
  */
 void AboutDialogGraphicsView::showAboutDialog() {
     //hide();
-    disconnect(timeLine, SIGNAL(finished()), this, SLOT(showAboutDialog()));
-    aboutDialog->move( int(parent->geometry().x()+(parent->geometry().width()-graphicsProxyWidget->geometry().width()) / 2), parent->y()+windowTitleBarWidth-windowPosOffset );
-    aboutDialog->exec();
+    disconnect(_timeLine, SIGNAL(finished()), this, SLOT(showAboutDialog()));
+    _aboutDialog->move( int(_parentWindow->geometry().x()+(_parentWindow->geometry().width()-_graphicsProxyWidget->geometry().width()) / 2), _parentWindow->y()+_windowTitleBarWidth-_windowPosOffset );
+    _aboutDialog->exec();
 }
 
 
@@ -162,26 +175,24 @@
     \brief Does not directly hide the AboutDialog but instead starts the "fade out" 3D animation.
  */
 void AboutDialogGraphicsView::hide() {
-    //aboutDialogAsSplashScreen->setPixmap( QPixmap::grabWidget(aboutDialog) );
-    //graphicsProxyWidget->setGeometry( aboutDialog->geometry() );
-    graphicsProxyWidget->setPos( parent->geometry().x()+(parent->geometry().width()-graphicsProxyWidget->geometry().width()) / 2, parent->y()+windowTitleBarWidth-windowPosOffset);
+    _graphicsProxyWidget->setPos( _parentWindow->geometry().x()+(_parentWindow->geometry().width()-_graphicsProxyWidget->geometry().width()) / 2, _parentWindow->y()+_windowTitleBarWidth-_windowPosOffset);
 
-    QRectF r = graphicsProxyWidget->boundingRect();
-    graphicsProxyWidget->setTransform(QTransform()
-        .translate(r.width() / 2, -windowTitleBarWidth)
+    QRectF r = _graphicsProxyWidget->boundingRect();
+    _graphicsProxyWidget->setTransform(QTransform()
+        .translate(r.width() / 2, -_windowTitleBarWidth)
         .rotate(0, Qt::XAxis)
         //.rotate(90, Qt::YAxis)
         //.rotate(5, Qt::ZAxis)
         //.scale(1 + 1.5 * step, 1 + 1.5 * step)
-        .translate(-r.width() / 2, windowTitleBarWidth));
+        .translate(-r.width() / 2, _windowTitleBarWidth));
 
-    graphicsProxyWidget->show();
-    //aboutDialogAsSplashScreen->show();
+    _graphicsProxyWidget->show();
+    //_aboutDialogAsSplashScreen->show();
     QGraphicsView::show();
 
-    connect(timeLine, SIGNAL(finished()), this, SLOT(hideReally()));
-    timeLine->setDirection(QTimeLine::Backward);
-    timeLine->start();
+    connect(_timeLine, SIGNAL(finished()), this, SLOT(hideReally()));
+    _timeLine->setDirection(QTimeLine::Backward);
+    _timeLine->start();
 }
 
 
@@ -189,16 +200,7 @@
     \brief This slot really hides this AboutDialog container.
  */
 void AboutDialogGraphicsView::hideReally() {
-    disconnect(timeLine, SIGNAL(finished()), this, SLOT(hideReally()));
+    disconnect(_timeLine, SIGNAL(finished()), this, SLOT(hideReally()));
     QGraphicsView::hide();
-    parent->activateWindow();
+    _parentWindow->activateWindow();
 }
-
-
-/*!
-    \brief Makes it possible to set the screen shot used for the animation.
- */
-//TODO: Test whether this function is really still needed. Not only for debug.
-void AboutDialogGraphicsView::setScreenshotPixmap(const QPixmap &screenShot) {
-    originalPixmap = screenShot;
-}
--- a/src/AboutDialogGraphicsView.h	Sat Oct 02 12:48:56 2010 +0000
+++ b/src/AboutDialogGraphicsView.h	Thu Oct 14 19:52:47 2010 +0000
@@ -20,42 +20,37 @@
 #define ABOUTDIALOGGRAPHICSVIEW_H
 
 #include <QGraphicsView>
-#include <QGraphicsProxyWidget>
-#include <QDesktopWidget>
-#include <QDate>
-#include <QTimeLine>
-#include <QPixmap>
-#include <QSplashScreen>
+
+class AboutDialog;
 
-#include "AboutDialog.h"
+class QTimeLine;
+class QSplashScreen;
+
 
 class AboutDialogGraphicsView : public QGraphicsView
 {
     Q_OBJECT
 public:
-    AboutDialogGraphicsView(AboutDialog *aboutDialog, QWidget *parent = 0);
+    AboutDialogGraphicsView(AboutDialog *aboutDialog, QWidget *parentWindow = NULL);
     ~AboutDialogGraphicsView(void);
-    void setScreenshotPixmap(const QPixmap &screenShot);
 
 public slots:
     void show();
     void hide();
 
-private:
-    AboutDialog *aboutDialog;
-    QGraphicsProxyWidget *graphicsProxyWidget;
-    QGraphicsScene *scene;
-    QWidget *parent;
-    QTimeLine *timeLine;
-    QSplashScreen *aboutDialogAsSplashScreen;
-    int windowTitleBarWidth;
-    int windowPosOffset;
-    QPixmap originalPixmap;
-
 private slots:
     void updateStep(int step);
     void showAboutDialog();
     void hideReally();
+
+private:
+    AboutDialog *_aboutDialog;
+    QGraphicsProxyWidget *_graphicsProxyWidget;
+    QWidget *_parentWindow;
+    QTimeLine *_timeLine;
+    QSplashScreen *_aboutDialogAsSplashScreen;
+    int _windowTitleBarWidth;
+    int _windowPosOffset;
 };
 
 #endif // ABOUTDIALOGGRAPHICSVIEW_H
--- a/src/IndentHandler.cpp	Sat Oct 02 12:48:56 2010 +0000
+++ b/src/IndentHandler.cpp	Thu Oct 14 19:52:47 2010 +0000
@@ -19,11 +19,39 @@
 
 #include "IndentHandler.h"
 
+#include "UiGuiSettings.h"
+#include "UiGuiErrorMessage.h"
+#include "TemplateBatchScript.h"
+#include "UiGuiIniFileParser.h"
+#include "SettingsPaths.h"
 
+#include <QToolBox>
+#include <QVBoxLayout>
+#include <QApplication>
+#include <QCheckBox>
+#include <QComboBox>
+#include <QToolButton>
+#include <QFile>
+#include <QProcess>
+#include <QSettings>
+#include <QStringList>
+#include <QLineEdit>
+#include <QSpinBox>
+#include <QLabel>
+#include <QByteArray>
+#include <QDir>
+#include <QMessageBox>
+#include <QMainWindow>
+#include <QTextStream>
+#include <QTextCodec>
+#include <QtScript>
+#include <QDesktopServices>
+#include <QMenu>
+#include <QAction>
+#include <QContextMenuEvent>
+#include <QFileDialog>
 #include <QtDebug>
 
-#include "UiGuiSettings.h"
-
 #ifdef Q_OS_WIN32
 #include <Windows.h>
 #endif
@@ -49,112 +77,119 @@
     its \a indenterID, which is the number of found indenter ini files in alphabetic
     order starting at index 0.
  */
-IndentHandler::IndentHandler(int indenterID, QWidget *mainWindow, QWidget *parent) : QWidget(parent) {
+IndentHandler::IndentHandler(int indenterID, QWidget *mainWindow, QWidget *parent) : QWidget(parent)
+	, _indenterSelectionCombobox(NULL)
+	, _indenterParameterHelpButton(NULL)
+	, _toolBoxContainerLayout(NULL)
+	, _indenterParameterCategoriesToolBox(NULL)
+	, _indenterSettings(NULL)
+	, _mainWindow(NULL)
+	, _errorMessageDialog(NULL)
+	, _menuIndenter(NULL)
+	, _actionLoadIndenterConfigFile(NULL)
+	, _actionSaveIndenterConfigFile(NULL)
+	, _actionCreateShellScript(NULL)
+	, _actionResetIndenterParameters(NULL)
+	, _parameterChangedCallback(NULL)
+	, _windowClosedCallback(NULL)
+{
     Q_ASSERT_X( indenterID >= 0, "IndentHandler", "the selected indenterID is < 0" );
 
     setObjectName(QString::fromUtf8("indentHandler"));
 
-    this->mainWindow = mainWindow;
+    _mainWindow = mainWindow;
 
-    parameterChangedCallback = NULL;
-    windowClosedCallback = NULL;
-    indenterSettings = NULL;
-    menuIndenter = NULL;
-    actionLoad_Indenter_Config_File = NULL;
-    actionSave_Indenter_Config_File = NULL;
-    actionCreateShellScript = NULL;
     initIndenterMenu();
 
-    connect( actionLoad_Indenter_Config_File, SIGNAL(triggered()), this, SLOT(openConfigFileDialog()) );
-    connect( actionSave_Indenter_Config_File, SIGNAL(triggered()), this, SLOT(saveasIndentCfgFileDialog()) );
-    connect( actionCreateShellScript, SIGNAL(triggered()), this, SLOT(createIndenterCallShellScript()) );
-    connect( actionResetIndenterParameters, SIGNAL(triggered()), this, SLOT(resetIndenterParameter()) );
+    connect( _actionLoadIndenterConfigFile, SIGNAL(triggered()), this, SLOT(openConfigFileDialog()) );
+    connect( _actionSaveIndenterConfigFile, SIGNAL(triggered()), this, SLOT(saveasIndentCfgFileDialog()) );
+    connect( _actionCreateShellScript, SIGNAL(triggered()), this, SLOT(createIndenterCallShellScript()) );
+    connect( _actionResetIndenterParameters, SIGNAL(triggered()), this, SLOT(resetIndenterParameter()) );
 
-    // define this widgets size and resize behavior
-    //this->setMaximumWidth(263);
-    this->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
+    // define this widgets resize behavior
+    setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
 
     // create vertical layout box, into which the toolbox will be added
-    vboxLayout = new QVBoxLayout(this);
-    vboxLayout->setMargin(2);
+    _toolBoxContainerLayout = new QVBoxLayout(this);
+    _toolBoxContainerLayout->setMargin(2);
 
     // Create horizontal layout for indenter selector and help button.
     QHBoxLayout *hboxLayout = new QHBoxLayout();
     //hboxLayout->setMargin(2);
-    vboxLayout->addLayout( hboxLayout );
+    _toolBoxContainerLayout->addLayout( hboxLayout );
 
     // Create the indenter selection combo box.
-    indenterSelectionCombobox = new QComboBox(this);
-    indenterSelectionCombobox->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLengthWithIcon);
-    indenterSelectionCombobox->setMinimumContentsLength(20);
-    connect( indenterSelectionCombobox, SIGNAL(activated(int)), this, SLOT(setIndenter(int)) );
-    UiGuiSettings::getInstance()->registerObjectProperty(indenterSelectionCombobox, "currentIndex", "selectedIndenter");
-    hboxLayout->addWidget( indenterSelectionCombobox );
+    _indenterSelectionCombobox = new QComboBox(this);
+    _indenterSelectionCombobox->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLengthWithIcon);
+    _indenterSelectionCombobox->setMinimumContentsLength(20);
+    connect( _indenterSelectionCombobox, SIGNAL(activated(int)), this, SLOT(setIndenter(int)) );
+    UiGuiSettings::getInstance()->registerObjectProperty(_indenterSelectionCombobox, "currentIndex", "selectedIndenter");
+    hboxLayout->addWidget( _indenterSelectionCombobox );
 
     // Create the indenter parameter help button.
-    indenterParameterHelpButton = new QToolButton(this);
-    indenterParameterHelpButton->setObjectName(QString::fromUtf8("indenterParameterHelpButton"));
-    indenterParameterHelpButton->setIcon(QIcon(QString::fromUtf8(":/mainWindow/help.png")));
-    hboxLayout->addWidget( indenterParameterHelpButton );
+    _indenterParameterHelpButton = new QToolButton(this);
+    _indenterParameterHelpButton->setObjectName(QString::fromUtf8("indenterParameterHelpButton"));
+    _indenterParameterHelpButton->setIcon(QIcon(QString::fromUtf8(":/mainWindow/help.png")));
+    hboxLayout->addWidget( _indenterParameterHelpButton );
     // Handle if the indenter parameter help button is pressed.
-    connect( indenterParameterHelpButton, SIGNAL(clicked()), this, SLOT(showIndenterManual()) );
+    connect( _indenterParameterHelpButton, SIGNAL(clicked()), this, SLOT(showIndenterManual()) );
 
     // create a toolbox and set its resize behavior
-    toolBox = new QToolBox(this);
-    toolBox->setObjectName(QString::fromUtf8("toolBox"));
+    _indenterParameterCategoriesToolBox = new QToolBox(this);
+    _indenterParameterCategoriesToolBox->setObjectName(QString::fromUtf8("_indenterParameterCategoriesToolBox"));
 
 #ifdef UNIVERSALINDENTGUI_NPP_EXPORTS
-    connect( toolBox, SIGNAL(currentChanged(int)), this, SLOT(updateDrawing()) );
+    connect( _indenterParameterCategoriesToolBox, SIGNAL(currentChanged(int)), this, SLOT(updateDrawing()) );
 #endif // UNIVERSALINDENTGUI_NPP_EXPORTS
 
-    //toolBox->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
-    //toolBox->setMaximumSize(QSize(16777215, 16777215));
+    //_indenterParameterCategoriesToolBox->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
+    //_indenterParameterCategoriesToolBox->setMaximumSize(QSize(16777215, 16777215));
     // insert the toolbox into the vlayout
-    vboxLayout->addWidget(toolBox);
+    _toolBoxContainerLayout->addWidget(_indenterParameterCategoriesToolBox);
 
-    indenterExecutableCallString = "";
-    indenterExecutableSuffix = "";
+    _indenterExecutableCallString = "";
+    _indenterExecutableSuffix = "";
 
-    indenterDirctoryStr = SettingsPaths::getIndenterPath();
-    tempDirctoryStr = SettingsPaths::getTempPath();
-    settingsDirctoryStr = SettingsPaths::getSettingsPath();
-    QDir indenterDirctory = QDir(indenterDirctoryStr);
+    _indenterDirctoryStr = SettingsPaths::getIndenterPath();
+    _tempDirctoryStr = SettingsPaths::getTempPath();
+    _settingsDirctoryStr = SettingsPaths::getSettingsPath();
+    QDir indenterDirctory = QDir(_indenterDirctoryStr);
 
-    if ( mainWindow != NULL ) {
-        errorMessageDialog = new UiGuiErrorMessage(mainWindow);
+    if ( _mainWindow != NULL ) {
+        _errorMessageDialog = new UiGuiErrorMessage(_mainWindow);
     }
     else {
-        errorMessageDialog = new UiGuiErrorMessage(this);
+        _errorMessageDialog = new UiGuiErrorMessage(this);
     }
 
-    indenterIniFileList = indenterDirctory.entryList( QStringList("uigui_*.ini") );
-    if ( indenterIniFileList.count() > 0 ) {
+    _indenterIniFileList = indenterDirctory.entryList( QStringList("uigui_*.ini") );
+    if ( _indenterIniFileList.count() > 0 ) {
         // Take care if the selected indenterID is smaller or greater than the number of existing indenters
         if ( indenterID < 0 ) {
             indenterID = 0;
         }
-        if ( indenterID >= indenterIniFileList.count() ) {
-            indenterID = indenterIniFileList.count() - 1;
+        if ( indenterID >= _indenterIniFileList.count() ) {
+            indenterID = _indenterIniFileList.count() - 1;
         }
 
         // Reads and parses the by indenterID defined indent ini file and creates toolbox entries
-        readIndentIniFile( indenterDirctoryStr + "/" + indenterIniFileList.at(indenterID) );
+        readIndentIniFile( _indenterDirctoryStr + "/" + _indenterIniFileList.at(indenterID) );
 
         // Find out how the indenter can be executed.
         createIndenterCallString();
 
         // Load the users last settings made for this indenter.
-        loadConfigFile( settingsDirctoryStr + "/" + indenterFileName + ".cfg" );
+        loadConfigFile( _settingsDirctoryStr + "/" + _indenterFileName + ".cfg" );
 
         // Fill the indenter selection combo box with the list of available indenters.
         if ( !getAvailableIndenters().isEmpty() ) {
-            indenterSelectionCombobox->addItems( getAvailableIndenters() );
-            indenterSelectionCombobox->setCurrentIndex( indenterID );
-            connect( indenterSelectionCombobox, SIGNAL(currentIndexChanged(int)), this, SIGNAL(selectedIndenterIndexChanged(int)) );
+            _indenterSelectionCombobox->addItems( getAvailableIndenters() );
+            _indenterSelectionCombobox->setCurrentIndex( indenterID );
+            connect( _indenterSelectionCombobox, SIGNAL(currentIndexChanged(int)), this, SIGNAL(selectedIndenterIndexChanged(int)) );
         }
     }
     else {
-        errorMessageDialog->showMessage(tr("No indenter ini files"), tr("There exists no indenter ini files in the directory \"") + QDir(indenterDirctoryStr).absolutePath() + "\".");
+        _errorMessageDialog->showMessage(tr("No indenter ini files"), tr("There exists no indenter ini files in the directory \"") + QDir(_indenterDirctoryStr).absolutePath() + "\".");
     }
 
     retranslateUi();
@@ -167,11 +202,11 @@
 IndentHandler::~IndentHandler() {
     // Generate the parameter string that will be saved to the indenters config file.
     QString parameterString = getParameterString();
-    if ( !indenterFileName.isEmpty() ) {
-        saveConfigFile( settingsDirctoryStr + "/" + indenterFileName + ".cfg", parameterString );
+    if ( !_indenterFileName.isEmpty() ) {
+        saveConfigFile( _settingsDirctoryStr + "/" + _indenterFileName + ".cfg", parameterString );
     }
 
-    delete errorMessageDialog;
+    delete _errorMessageDialog;
 }
 
 
@@ -179,29 +214,29 @@
     \brief Initializes the context menu used for some actions like saving the indenter config file.
  */
 void IndentHandler::initIndenterMenu() {
-    if ( menuIndenter == NULL ) {
-        actionLoad_Indenter_Config_File = new QAction(this);
-        actionLoad_Indenter_Config_File->setObjectName(QString::fromUtf8("actionLoad_Indenter_Config_File"));
-        actionLoad_Indenter_Config_File->setIcon(QIcon(QString::fromUtf8(":/mainWindow/load_indent_cfg.png")));
+    if ( _menuIndenter == NULL ) {
+        _actionLoadIndenterConfigFile = new QAction(this);
+        _actionLoadIndenterConfigFile->setObjectName(QString::fromUtf8("_actionLoadIndenterConfigFile"));
+        _actionLoadIndenterConfigFile->setIcon(QIcon(QString::fromUtf8(":/mainWindow/load_indent_cfg.png")));
 
-        actionSave_Indenter_Config_File = new QAction(this);
-        actionSave_Indenter_Config_File->setObjectName(QString::fromUtf8("actionSave_Indenter_Config_File"));
-        actionSave_Indenter_Config_File->setIcon(QIcon(QString::fromUtf8(":/mainWindow/save_indent_cfg.png")));
+        _actionSaveIndenterConfigFile = new QAction(this);
+        _actionSaveIndenterConfigFile->setObjectName(QString::fromUtf8("_actionSaveIndenterConfigFile"));
+        _actionSaveIndenterConfigFile->setIcon(QIcon(QString::fromUtf8(":/mainWindow/save_indent_cfg.png")));
 
-        actionCreateShellScript = new QAction(this);
-        actionCreateShellScript->setObjectName(QString::fromUtf8("actionCreateShellScript"));
-        actionCreateShellScript->setIcon(QIcon(QString::fromUtf8(":/mainWindow/shell.png")));
+        _actionCreateShellScript = new QAction(this);
+        _actionCreateShellScript->setObjectName(QString::fromUtf8("_actionCreateShellScript"));
+        _actionCreateShellScript->setIcon(QIcon(QString::fromUtf8(":/mainWindow/shell.png")));
 
-        actionResetIndenterParameters = new QAction(this);
-        actionResetIndenterParameters->setObjectName(QString::fromUtf8("actionResetIndenterParameters"));
-        actionResetIndenterParameters->setIcon(QIcon(QString::fromUtf8(":/mainWindow/view-refresh.png")));
+        _actionResetIndenterParameters = new QAction(this);
+        _actionResetIndenterParameters->setObjectName(QString::fromUtf8("_actionResetIndenterParameters"));
+        _actionResetIndenterParameters->setIcon(QIcon(QString::fromUtf8(":/mainWindow/view-refresh.png")));
 
-        menuIndenter = new QMenu(this);
-        menuIndenter->setObjectName(QString::fromUtf8("menuIndenter"));
-        menuIndenter->addAction(actionLoad_Indenter_Config_File);
-        menuIndenter->addAction(actionSave_Indenter_Config_File);
-        menuIndenter->addAction(actionCreateShellScript);
-        menuIndenter->addAction(actionResetIndenterParameters);
+        _menuIndenter = new QMenu(this);
+        _menuIndenter->setObjectName(QString::fromUtf8("_menuIndenter"));
+        _menuIndenter->addAction(_actionLoadIndenterConfigFile);
+        _menuIndenter->addAction(_actionSaveIndenterConfigFile);
+        _menuIndenter->addAction(_actionCreateShellScript);
+        _menuIndenter->addAction(_actionResetIndenterParameters);
     }
 }
 
@@ -210,7 +245,7 @@
     \brief Returns the context menu used for some actions like saving the indenter config file.
  */
 QMenu* IndentHandler::getIndenterMenu() {
-    return menuIndenter;
+    return _menuIndenter;
 }
 
 
@@ -219,7 +254,7 @@
  */
 QList<QAction*> IndentHandler::getIndenterMenuActions() {
     QList<QAction*> actionList;
-    actionList << actionLoad_Indenter_Config_File << actionSave_Indenter_Config_File << actionCreateShellScript << actionResetIndenterParameters;
+    actionList << _actionLoadIndenterConfigFile << _actionSaveIndenterConfigFile << _actionCreateShellScript << _actionResetIndenterParameters;
     return actionList;
 }
 
@@ -250,34 +285,34 @@
     QString shellParameterPlaceholder = "$1";
 #endif
 
-    parameterInputFile = " " + inputFileParameter + "\"" + shellParameterPlaceholder + "\"";
+    parameterInputFile = " " + _inputFileParameter + "\"" + shellParameterPlaceholder + "\"";
 
-    if ( outputFileParameter != "none" && outputFileParameter != "stdout" ) {
-        if ( outputFileName == inputFileName ) {
-            parameterOuputFile = " " + outputFileParameter + "\"" + shellParameterPlaceholder + "\"";
+    if ( _outputFileParameter != "none" && _outputFileParameter != "stdout" ) {
+        if ( _outputFileName == _inputFileName ) {
+            parameterOuputFile = " " + _outputFileParameter + "\"" + shellParameterPlaceholder + "\"";
         }
         else {
-            parameterOuputFile = " " + outputFileParameter + outputFileName + ".tmp";
+            parameterOuputFile = " " + _outputFileParameter + _outputFileName + ".tmp";
         }
     }
 
     // If the config file name is empty it is assumed that all parameters are sent via command line call
-    if ( globalConfigFilename_.isEmpty() ) {
+    if ( _globalConfigFilename.isEmpty() ) {
         parameterParameterFile = " " + getParameterString();
     }
     // else if needed add the parameter to the indenter call string where the config file can be found.
-    else if (useCfgFileParameter != "none") {
-        parameterParameterFile = " " + useCfgFileParameter + "\"./" + configFilename + "\"";
+    else if (_useCfgFileParameter != "none") {
+        parameterParameterFile = " " + _useCfgFileParameter + "\"./" + configFilename + "\"";
     }
 
     // Assemble indenter call string for parameters according to the set order.
-    if ( parameterOrder == "ipo" ) {
+    if ( _parameterOrder == "ipo" ) {
         indenterCompleteCallString = parameterInputFile + parameterParameterFile + parameterOuputFile;
     }
-    else if ( parameterOrder == "pio" ) {
+    else if ( _parameterOrder == "pio" ) {
         indenterCompleteCallString = parameterParameterFile + parameterInputFile + parameterOuputFile;
     }
-    else if ( parameterOrder == "poi" ) {
+    else if ( _parameterOrder == "poi" ) {
         indenterCompleteCallString = parameterParameterFile + parameterOuputFile + parameterInputFile;
     }
     else {
@@ -286,22 +321,22 @@
 
     // Generate the indenter call string either for win32 or other systems.
 #if defined(Q_OS_WIN32)
-    indenterCompleteCallString = indenterExecutableCallString + indenterCompleteCallString;
+    indenterCompleteCallString = _indenterExecutableCallString + indenterCompleteCallString;
 #else
-    indenterCompleteCallString = "#!/bin/bash\n" + indenterExecutableCallString + indenterCompleteCallString;
+    indenterCompleteCallString = "#!/bin/bash\n" + _indenterExecutableCallString + indenterCompleteCallString;
 #endif
 
     // If the indenter writes to stdout pipe the output into a file
-    if ( outputFileParameter == "stdout" ) {
-        indenterCompleteCallString = indenterCompleteCallString + " >" + outputFileName + ".tmp";
+    if ( _outputFileParameter == "stdout" ) {
+        indenterCompleteCallString = indenterCompleteCallString + " >" + _outputFileName + ".tmp";
     }
 
     // If the output filename is not the same as the input filename copy the output over the input.
-    if ( outputFileName != inputFileName ) {
+    if ( _outputFileName != _inputFileName ) {
 #if defined(Q_OS_WIN32)
-        replaceInputFileCommand = "move /Y " + outputFileName + ".tmp \"" + shellParameterPlaceholder + "\"\n";
+        replaceInputFileCommand = "move /Y " + _outputFileName + ".tmp \"" + shellParameterPlaceholder + "\"\n";
 #else
-        replaceInputFileCommand = "mv " + outputFileName + ".tmp \"" + shellParameterPlaceholder + "\"\n";
+        replaceInputFileCommand = "mv " + _outputFileName + ".tmp \"" + shellParameterPlaceholder + "\"\n";
 #endif
     }
 
@@ -330,7 +365,7 @@
     can identify the programming language if needed.
  */
 QString IndentHandler::callIndenter(QString sourceCode, QString inputFileExtension) {
-    if ( indenterExecutableSuffix == ".js" ) {
+    if ( _indenterExecutableSuffix == ".js" ) {
         return callJavaScriptIndenter(sourceCode);
     }
     else {
@@ -350,7 +385,7 @@
 
     engine.globalObject().setProperty("unformattedCode", sourceCode);
 
-    QFile jsDecoderFile( indenterExecutableCallString );
+    QFile jsDecoderFile( _indenterExecutableCallString );
     QString jsDecoderCode;
     if (jsDecoderFile.open(QFile::ReadOnly)) {
         jsDecoderCode = jsDecoderFile.readAll();
@@ -369,11 +404,11 @@
     can identify the programming language if needed.
  */
 QString IndentHandler::callExecutableIndenter(QString sourceCode, QString inputFileExtension) {
-    Q_ASSERT_X( !inputFileName.isEmpty(), "callIndenter", "inputFileName is empty" );
-//    Q_ASSERT_X( !outputFileName.isEmpty(), "callIndenter", "outputFileName is empty" );
-    Q_ASSERT_X( !indenterFileName.isEmpty(), "callIndenter", "indenterFileName is empty" );
+    Q_ASSERT_X( !_inputFileName.isEmpty(), "callIndenter", "_inputFileName is empty" );
+//    Q_ASSERT_X( !_outputFileName.isEmpty(), "callIndenter", "_outputFileName is empty" );
+    Q_ASSERT_X( !_indenterFileName.isEmpty(), "callIndenter", "_indenterFileName is empty" );
 
-    if ( indenterFileName.isEmpty() ) {
+    if ( _indenterFileName.isEmpty() ) {
         return "";
     }
 
@@ -388,8 +423,8 @@
     // Generate the parameter string that will be saved to the indenters config file
     QString parameterString = getParameterString();
 
-    if ( !globalConfigFilename_.isEmpty() ) {
-        saveConfigFile( tempDirctoryStr + "/" + globalConfigFilename_, parameterString );
+    if ( !_globalConfigFilename.isEmpty() ) {
+        saveConfigFile( _tempDirctoryStr + "/" + _globalConfigFilename, parameterString );
     }
 
     // Only add a dot to file extension if the string is not empty
@@ -398,8 +433,8 @@
     }
 
     // Delete any previously used input src file and create a new input src file.
-    QFile::remove(tempDirctoryStr + "/" + inputFileName + inputFileExtension);
-    QFile inputSrcFile(tempDirctoryStr + "/" + inputFileName + inputFileExtension);
+    QFile::remove(_tempDirctoryStr + "/" + _inputFileName + inputFileExtension);
+    QFile inputSrcFile(_tempDirctoryStr + "/" + _inputFileName + inputFileExtension);
     // Write the source code to the input file for the indenter
     if ( inputSrcFile.open( QFile::ReadWrite | QFile::Text ) ) {
         inputSrcFile.write( sourceCode.toUtf8() );
@@ -411,17 +446,17 @@
     }
 
     // Set the input file for the to be called indenter.
-    if ( inputFileParameter.trimmed() == "<" || inputFileParameter == "stdin" ) {
+    if ( _inputFileParameter.trimmed() == "<" || _inputFileParameter == "stdin" ) {
         parameterInputFile = "";
         indentProcess.setStandardInputFile( inputSrcFile.fileName() );
     }
     else {
-        parameterInputFile = " " + inputFileParameter + inputFileName + inputFileExtension;
+        parameterInputFile = " " + _inputFileParameter + _inputFileName + inputFileExtension;
     }
 
     // Set the output file for the to be called indenter.
-    if ( outputFileParameter != "none" && outputFileParameter != "stdout" ) {
-        parameterOuputFile = " " + outputFileParameter + outputFileName + inputFileExtension;
+    if ( _outputFileParameter != "none" && _outputFileParameter != "stdout" ) {
+        parameterOuputFile = " " + _outputFileParameter + _outputFileName + inputFileExtension;
     }
 
 #ifdef Q_OS_WIN32
@@ -430,10 +465,10 @@
     // the Unicode path on their own.
     // Because of this the path gets converted to Windows short paths using the 8.3 notation.
 
-    qDebug() << __LINE__ << " " << __FUNCTION__ << ": Temp dir before trying to convert it to short Windows path is" << tempDirctoryStr;
+    qDebug() << __LINE__ << " " << __FUNCTION__ << ": Temp dir before trying to convert it to short Windows path is" << _tempDirctoryStr;
 
     // At first convert the temp path to Windows like separators.
-    QString tempDirctoryStrHelper = QDir::toNativeSeparators(tempDirctoryStr).replace("\\", "\\\\");
+    QString tempDirctoryStrHelper = QDir::toNativeSeparators(_tempDirctoryStr).replace("\\", "\\\\");
     // Then convert the QString to a WCHAR array and NULL terminate it.
     WCHAR *tempDirctoryWindowsStr = new WCHAR[ tempDirctoryStrHelper.length()+1 ];
     tempDirctoryStrHelper.toWCharArray( tempDirctoryWindowsStr );
@@ -456,11 +491,11 @@
         length = GetShortPathName((LPCTSTR)tempDirctoryWindowsStr, buffer, length);
         tempDirctoryStrHelper = buffer;
 #endif
-        tempDirctoryStr = QDir::fromNativeSeparators(tempDirctoryStrHelper).replace("//", "/");
+        _tempDirctoryStr = QDir::fromNativeSeparators(tempDirctoryStrHelper).replace("//", "/");
         delete [] buffer;
 
         // Check whether the short path still contains some kind of non ascii characters.
-        if ( tempDirctoryStr.length() != tempDirctoryStr.toAscii().length() ) {
+        if ( _tempDirctoryStr.length() != _tempDirctoryStr.toAscii().length() ) {
             qWarning() << __LINE__ << " " << __FUNCTION__ << ": Shortened path still contains non ascii characters. Could cause some indenters not to work properly!";
         }
     }
@@ -468,28 +503,28 @@
         qWarning() << __LINE__ << " " << __FUNCTION__ << ": Couldn't retrieve a short version of the temporary path!";
     }
 
-    qDebug() << __LINE__ << " " << __FUNCTION__ << ": Temp dir after trying to convert it to short Windows path is " << tempDirctoryStr;
+    qDebug() << __LINE__ << " " << __FUNCTION__ << ": Temp dir after trying to convert it to short Windows path is " << _tempDirctoryStr;
 
     delete [] tempDirctoryWindowsStr;
 #endif
 
     // If the config file name is empty it is assumed that all parameters are sent via command line call
-    if ( globalConfigFilename_.isEmpty() ) {
+    if ( _globalConfigFilename.isEmpty() ) {
         parameterParameterFile = " " + parameterString;
     }
     // if needed add the parameter to the indenter call string where the config file can be found
-    else if (useCfgFileParameter != "none") {
-        parameterParameterFile = " " + useCfgFileParameter + "\"" + tempDirctoryStr + "/" + globalConfigFilename_ + "\"";
+    else if (_useCfgFileParameter != "none") {
+        parameterParameterFile = " " + _useCfgFileParameter + "\"" + _tempDirctoryStr + "/" + _globalConfigFilename + "\"";
     }
 
     // Assemble indenter call string for parameters according to the set order.
-    if ( parameterOrder == "ipo" ) {
+    if ( _parameterOrder == "ipo" ) {
         indenterCompleteCallString = parameterInputFile + parameterParameterFile + parameterOuputFile;
     }
-    else if ( parameterOrder == "pio" ) {
+    else if ( _parameterOrder == "pio" ) {
         indenterCompleteCallString = parameterParameterFile + parameterInputFile + parameterOuputFile;
     }
-    else if ( parameterOrder == "poi" ) {
+    else if ( _parameterOrder == "poi" ) {
         indenterCompleteCallString = parameterParameterFile + parameterOuputFile + parameterInputFile;
     }
     else {
@@ -497,25 +532,25 @@
     }
 
     // If no indenter executable call string could be created before, show an error message.
-    if ( indenterExecutableCallString.isEmpty() ) {
-        errorMessageDialog->showMessage(tr("No indenter executable"),
-            tr("There exists no indenter executable with the name \"%1\" in the directory \"%2\" nor in the global environment.").arg(indenterFileName).arg(indenterDirctoryStr) );
+    if ( _indenterExecutableCallString.isEmpty() ) {
+        _errorMessageDialog->showMessage(tr("No indenter executable"),
+            tr("There exists no indenter executable with the name \"%1\" in the directory \"%2\" nor in the global environment.").arg(_indenterFileName).arg(_indenterDirctoryStr) );
         return sourceCode;
     }
 
     // Generate the indenter call string either for win32 or other systems.
-    indenterCompleteCallString = indenterExecutableCallString + indenterCompleteCallString;
+    indenterCompleteCallString = _indenterExecutableCallString + indenterCompleteCallString;
 
     // errors and standard outputs from the process call are merged together
     //indentProcess.setReadChannelMode(QProcess::MergedChannels);
 
 	// Set the directory where the indenter will be executed for the process' environment as PWD.
     QStringList env = indentProcess.environment();
-    env << "PWD=" + QFileInfo(tempDirctoryStr).absoluteFilePath();
+    env << "PWD=" + QFileInfo(_tempDirctoryStr).absoluteFilePath();
     indentProcess.setEnvironment( env );
 
 	// Set the directory for the indenter execution
-    indentProcess.setWorkingDirectory( QFileInfo(tempDirctoryStr).absoluteFilePath() );
+    indentProcess.setWorkingDirectory( QFileInfo(_tempDirctoryStr).absoluteFilePath() );
 
     qDebug() << __LINE__ << " " << __FUNCTION__ << ": Will call the indenter in the directory " << indentProcess.workingDirectory() << " using this commandline call: " << indenterCompleteCallString;
 
@@ -557,7 +592,7 @@
             "</pre></html></body>";
         qWarning() << __LINE__ << " " << __FUNCTION__ << processReturnString;
         QApplication::restoreOverrideCursor();
-        errorMessageDialog->showMessage(tr("Error calling Indenter"), processReturnString);
+        _errorMessageDialog->showMessage(tr("Error calling Indenter"), processReturnString);
     }
 
 
@@ -573,19 +608,19 @@
             "</html></body>";
         qWarning() << __LINE__ << " " << __FUNCTION__ << processReturnString;
         QApplication::restoreOverrideCursor();
-        errorMessageDialog->showMessage( tr("Indenter returned error"), processReturnString );
+        _errorMessageDialog->showMessage( tr("Indenter returned error"), processReturnString );
     }
 
     // Only get the formatted source code, if calling the indenter did succeed.
     if ( calledProcessSuccessfully ) {
         // If the indenter results are written to stdout, read them from there...
-        if ( indentProcess.exitCode() == 0 && outputFileParameter == "stdout"  ) {
+        if ( indentProcess.exitCode() == 0 && _outputFileParameter == "stdout"  ) {
             formattedSourceCode = indentProcess.readAllStandardOutput();
             qDebug() << __LINE__ << " " << __FUNCTION__ << ": Read indenter output from StdOut.";
         }
         // ... else read the output file generated by the indenter call.
         else {
-            QFile outSrcFile(tempDirctoryStr + "/" + outputFileName + inputFileExtension);
+            QFile outSrcFile(_tempDirctoryStr + "/" + _outputFileName + inputFileExtension);
             if ( outSrcFile.open(QFile::ReadOnly | QFile::Text) ) {
                 QTextStream outSrcStrm(&outSrcFile);
                 outSrcStrm.setCodec( QTextCodec::codecForName("UTF-8") );
@@ -603,8 +638,8 @@
     }
 
     // Delete the temporary input and output files.
-    QFile::remove(tempDirctoryStr + "/" + outputFileName + inputFileExtension);
-    QFile::remove(tempDirctoryStr + "/" + inputFileName + inputFileExtension);
+    QFile::remove(_tempDirctoryStr + "/" + _outputFileName + inputFileExtension);
+    QFile::remove(_tempDirctoryStr + "/" + _inputFileName + inputFileExtension);
 
     return formattedSourceCode;
 }
@@ -617,40 +652,40 @@
     QString parameterString = "";
 
     // generate parameter string for all boolean values
-    foreach (ParamBoolean pBoolean, paramBooleans) {
+    foreach (ParamBoolean pBoolean, _paramBooleans) {
         if ( pBoolean.checkBox->isChecked() ) {
             if ( !pBoolean.trueString.isEmpty() ) {
-                parameterString += pBoolean.trueString + cfgFileParameterEnding;
+                parameterString += pBoolean.trueString + _cfgFileParameterEnding;
             }
         }
         else {
             if ( !pBoolean.falseString.isEmpty() ) {
-                parameterString += pBoolean.falseString + cfgFileParameterEnding;
+                parameterString += pBoolean.falseString + _cfgFileParameterEnding;
             }
         }
     }
 
     // generate parameter string for all numeric values
-    foreach (ParamNumeric pNumeric, paramNumerics) {
+    foreach (ParamNumeric pNumeric, _paramNumerics) {
         if ( pNumeric.valueEnabledChkBox->isChecked() ) {
-            parameterString += pNumeric.paramCallName + QString::number( pNumeric.spinBox->value() ) + cfgFileParameterEnding;
+            parameterString += pNumeric.paramCallName + QString::number( pNumeric.spinBox->value() ) + _cfgFileParameterEnding;
         }
     }
 
     // generate parameter string for all string values
-    foreach (ParamString pString, paramStrings) {
+    foreach (ParamString pString, _paramStrings) {
         if ( !pString.lineEdit->text().isEmpty() && pString.valueEnabledChkBox->isChecked() ) {
             // Create parameter definition for each value devided by a | sign.
             foreach (QString paramValue, pString.lineEdit->text().split("|")) {
-                parameterString += pString.paramCallName + paramValue + cfgFileParameterEnding;
+                parameterString += pString.paramCallName + paramValue + _cfgFileParameterEnding;
             }
         }
     }
 
     // generate parameter string for all multiple choice values
-    foreach (ParamMultiple pMultiple, paramMultiples) {
+    foreach (ParamMultiple pMultiple, _paramMultiples) {
         if ( pMultiple.valueEnabledChkBox->isChecked() ) {
-            parameterString += pMultiple.choicesStrings.at( pMultiple.comboBox->currentIndex () ) + cfgFileParameterEnding;
+            parameterString += pMultiple.choicesStrings.at( pMultiple.comboBox->currentIndex () ) + _cfgFileParameterEnding;
         }
     }
 
@@ -695,7 +730,7 @@
     }
 
     // Search for name of each boolean parameter and set its value if found.
-    foreach (ParamBoolean pBoolean, paramBooleans) {
+    foreach (ParamBoolean pBoolean, _paramBooleans) {
         // boolean value that will be assigned to the checkbox
         bool paramValue = false;
 
@@ -717,7 +752,7 @@
                 }
                 // neither true nor false parameter found so use default value
                 else {
-                    paramValue = indenterSettings->value(pBoolean.paramName + "/ValueDefault").toBool();
+                    paramValue = _indenterSettings->value(pBoolean.paramName + "/ValueDefault").toBool();
                 }
             }
         }
@@ -738,7 +773,7 @@
                 }
                 // neither true nor false parameter found so use default value
                 else {
-                    paramValue = indenterSettings->value(pBoolean.paramName + "/ValueDefault").toBool();
+                    paramValue = _indenterSettings->value(pBoolean.paramName + "/ValueDefault").toBool();
                 }
             }
         }
@@ -746,7 +781,7 @@
     }
 
     // Search for name of each numeric parameter and set the value found behind it.
-    foreach (ParamNumeric pNumeric, paramNumerics) {
+    foreach (ParamNumeric pNumeric, _paramNumerics) {
         index = cfgFileData.indexOf( pNumeric.paramCallName, 0, Qt::CaseInsensitive );
         // parameter was found in config file
         if ( index != -1 ) {
@@ -754,7 +789,7 @@
             index += pNumeric.paramCallName.length();
 
             // Find the end of the parameter by searching for set config file parameter ending. Most of time this is a carriage return.
-            crPos = cfgFileData.indexOf( cfgFileParameterEnding, index+1 );
+            crPos = cfgFileData.indexOf( _cfgFileParameterEnding, index+1 );
 
             // get the number and convert it to int
             QString test = cfgFileData.mid( index, crPos - index );
@@ -768,14 +803,14 @@
         }
         // parameter was not found in config file
         else {
-            int defaultValue = indenterSettings->value(pNumeric.paramName + "/ValueDefault").toInt();
+            int defaultValue = _indenterSettings->value(pNumeric.paramName + "/ValueDefault").toInt();
             pNumeric.spinBox->setValue( defaultValue );
             pNumeric.valueEnabledChkBox->setChecked( false );
         }
     }
 
     // Search for name of each string parameter and set it.
-    foreach (ParamString pString, paramStrings) {
+    foreach (ParamString pString, _paramStrings) {
         paramValueStr = "";
         // The number of the found values for this parameter name.
         int numberOfValues = 0;
@@ -789,7 +824,7 @@
                 index += pString.paramCallName.length();
 
                 // Find the end of the parameter by searching for set config file parameter ending. Most of time this is a carriage return.
-                crPos = cfgFileData.indexOf( cfgFileParameterEnding, index+1 );
+                crPos = cfgFileData.indexOf( _cfgFileParameterEnding, index+1 );
 
                 // Get the string and remember it.
                 if ( numberOfValues < 2 ) {
@@ -809,14 +844,14 @@
         }
         // Parameter was not found in config file
         else {
-            paramValueStr = indenterSettings->value(pString.paramName + "/ValueDefault").toString();
+            paramValueStr = _indenterSettings->value(pString.paramName + "/ValueDefault").toString();
             pString.lineEdit->setText( paramValueStr );
             pString.valueEnabledChkBox->setChecked( false );
         }
     }
 
     // search for name of each multiple choice parameter and set it
-    foreach (ParamMultiple pMultiple, paramMultiples) {
+    foreach (ParamMultiple pMultiple, _paramMultiples) {
         int i = 0;
         index = -1;
 
@@ -833,7 +868,7 @@
 
         // parameter was not set in config file, so use default value
         if ( index == -1 ) {
-            int defaultValue = indenterSettings->value(pMultiple.paramName + "/ValueDefault").toInt();
+            int defaultValue = _indenterSettings->value(pMultiple.paramName + "/ValueDefault").toInt();
             pMultiple.comboBox->setCurrentIndex( defaultValue );
             pMultiple.valueEnabledChkBox->setChecked( false );
         }
@@ -848,31 +883,31 @@
  */
 void IndentHandler::resetToDefaultValues() {
     // Search for name of each boolean parameter and set its value if found.
-    foreach (ParamBoolean pBoolean, paramBooleans) {
+    foreach (ParamBoolean pBoolean, _paramBooleans) {
         // Boolean value that will be assigned to the checkbox.
-        bool defaultValue = indenterSettings->value(pBoolean.paramName + "/ValueDefault").toBool();
+        bool defaultValue = _indenterSettings->value(pBoolean.paramName + "/ValueDefault").toBool();
         pBoolean.checkBox->setChecked( defaultValue );
     }
 
     // Search for name of each numeric parameter and set the value found behind it.
-    foreach (ParamNumeric pNumeric, paramNumerics) {
-        int defaultValue = indenterSettings->value(pNumeric.paramName + "/ValueDefault").toInt();
+    foreach (ParamNumeric pNumeric, _paramNumerics) {
+        int defaultValue = _indenterSettings->value(pNumeric.paramName + "/ValueDefault").toInt();
         pNumeric.spinBox->setValue( defaultValue );
-        pNumeric.valueEnabledChkBox->setChecked( indenterSettings->value(pNumeric.paramName + "/Enabled").toBool() );
+        pNumeric.valueEnabledChkBox->setChecked( _indenterSettings->value(pNumeric.paramName + "/Enabled").toBool() );
     }
 
     // Search for name of each string parameter and set it.
-    foreach (ParamString pString, paramStrings) {
-        QString defaultValue = indenterSettings->value(pString.paramName + "/ValueDefault").toString();
+    foreach (ParamString pString, _paramStrings) {
+        QString defaultValue = _indenterSettings->value(pString.paramName + "/ValueDefault").toString();
         pString.lineEdit->setText( defaultValue );
-        pString.valueEnabledChkBox->setChecked( indenterSettings->value(pString.paramName + "/Enabled").toBool() );
+        pString.valueEnabledChkBox->setChecked( _indenterSettings->value(pString.paramName + "/Enabled").toBool() );
     }
 
     // Search for name of each multiple choice parameter and set it.
-    foreach (ParamMultiple pMultiple, paramMultiples) {
-        int defaultValue = indenterSettings->value(pMultiple.paramName + "/ValueDefault").toInt();
+    foreach (ParamMultiple pMultiple, _paramMultiples) {
+        int defaultValue = _indenterSettings->value(pMultiple.paramName + "/ValueDefault").toInt();
         pMultiple.comboBox->setCurrentIndex( defaultValue );
-        pMultiple.valueEnabledChkBox->setChecked( indenterSettings->value(pMultiple.paramName + "/Enabled").toBool() );
+        pMultiple.valueEnabledChkBox->setChecked( _indenterSettings->value(pMultiple.paramName + "/Enabled").toBool() );
     }
 }
 
@@ -884,7 +919,7 @@
     Q_ASSERT_X( !iniFilePath.isEmpty(), "readIndentIniFile", "iniFilePath is empty" );
 
     // open the ini-file that contains all available indenter settings with their additional infos
-    indenterSettings = new UiGuiIniFileParser(iniFilePath);
+    _indenterSettings = new UiGuiIniFileParser(iniFilePath);
 
     QStringList categories;
     //QString indenterGroupString = "";
@@ -895,52 +930,52 @@
     //  parse ini file indenter header
     //
 
-    indenterName = indenterSettings->value("header/indenterName").toString();
-    indenterFileName = indenterSettings->value("header/indenterFileName").toString();
-    globalConfigFilename_ = indenterSettings->value("header/configFilename").toString();
-    useCfgFileParameter = indenterSettings->value("header/useCfgFileParameter").toString();
-    cfgFileParameterEnding = indenterSettings->value("header/cfgFileParameterEnding").toString();
-    if ( cfgFileParameterEnding == "cr" ) {
-        cfgFileParameterEnding = "\n";
+    _indenterName = _indenterSettings->value("header/indenterName").toString();
+    _indenterFileName = _indenterSettings->value("header/indenterFileName").toString();
+    _globalConfigFilename = _indenterSettings->value("header/configFilename").toString();
+    _useCfgFileParameter = _indenterSettings->value("header/useCfgFileParameter").toString();
+    _cfgFileParameterEnding = _indenterSettings->value("header/cfgFileParameterEnding").toString();
+    if ( _cfgFileParameterEnding == "cr" ) {
+        _cfgFileParameterEnding = "\n";
     }
-    indenterShowHelpParameter = indenterSettings->value("header/showHelpParameter").toString();
+    _indenterShowHelpParameter = _indenterSettings->value("header/showHelpParameter").toString();
 
-    if ( indenterFileName.isEmpty() ) {
-        errorMessageDialog->showMessage( tr("Indenter ini file header error"),
+    if ( _indenterFileName.isEmpty() ) {
+        _errorMessageDialog->showMessage( tr("Indenter ini file header error"),
             tr("The loaded indenter ini file \"%1\"has a faulty header. At least the indenters file name is not set.").arg(iniFilePath) );
     }
 
     // Read the parameter order. Possible values are (p=parameter[file] i=inputfile o=outputfile)
     // pio, ipo, iop
-    parameterOrder = indenterSettings->value("header/parameterOrder", "pio").toString();
-    inputFileParameter = indenterSettings->value("header/inputFileParameter").toString();
-    inputFileName = indenterSettings->value("header/inputFileName").toString();
-    outputFileParameter = indenterSettings->value("header/outputFileParameter").toString();
-    outputFileName = indenterSettings->value("header/outputFileName").toString();
-    fileTypes = indenterSettings->value("header/fileTypes").toString();
-    fileTypes.replace('|', " ");
+    _parameterOrder = _indenterSettings->value("header/parameterOrder", "pio").toString();
+    _inputFileParameter = _indenterSettings->value("header/inputFileParameter").toString();
+    _inputFileName = _indenterSettings->value("header/inputFileName").toString();
+    _outputFileParameter = _indenterSettings->value("header/outputFileParameter").toString();
+    _outputFileName = _indenterSettings->value("header/outputFileName").toString();
+    _fileTypes = _indenterSettings->value("header/fileTypes").toString();
+    _fileTypes.replace('|', " ");
 
     // read the categories names which are separated by "|"
-    QString categoriesStr = indenterSettings->value("header/categories").toString();
+    QString categoriesStr = _indenterSettings->value("header/categories").toString();
     categories = categoriesStr.split("|");
     // Assure that the category list is never empty. At least contain a "general" section.
     if ( categories.isEmpty() ) {
         categories.append("General");
     }
 
-    ToolBoxPage toolBoxPage;
+    IndenterParameterCategoryPage categoryPage;
 
     // create a page for each category and store its references in a toolboxpage-array
     foreach (QString category, categories) {
-        toolBoxPage.page = new QWidget();
-        toolBoxPage.page->setObjectName(category);
-        toolBoxPage.page->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
-        toolBoxPage.vboxLayout = new QVBoxLayout(toolBoxPage.page);
-        toolBoxPage.vboxLayout->setSpacing(6);
-        toolBoxPage.vboxLayout->setMargin(9);
-        toolBoxPage.vboxLayout->setObjectName(category);
-        toolBoxPages.append(toolBoxPage);
-        toolBox->addItem(toolBoxPage.page, category);
+        categoryPage.widget = new QWidget();
+        categoryPage.widget->setObjectName(category);
+        categoryPage.widget->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
+        categoryPage.vboxLayout = new QVBoxLayout(categoryPage.widget);
+        categoryPage.vboxLayout->setSpacing(6);
+        categoryPage.vboxLayout->setMargin(9);
+        categoryPage.vboxLayout->setObjectName(category);
+        _indenterParameterCategoryPages.append(categoryPage);
+        _indenterParameterCategoriesToolBox->addItem(categoryPage.widget, category);
     }
 
 
@@ -949,30 +984,30 @@
     //
 
     // read all possible parameters written in brackets []
-    indenterParameters = indenterSettings->childGroups();
+    _indenterParameters = _indenterSettings->childGroups();
 
     // read each parameter to create the corresponding input field
-    foreach (QString indenterParameter, indenterParameters) {
+    foreach (QString indenterParameter, _indenterParameters) {
         // if it is not the indent header definition read the parameter and add it to
         // the corresponding category toolbox page
         if ( indenterParameter != "header") {
             // read to which category the parameter belongs
-            int category = indenterSettings->value(indenterParameter + "/Category").toInt();
+            int category = _indenterSettings->value(indenterParameter + "/Category").toInt();
             // Assure that the category number is never greater than the available categories.
-            if ( category > toolBoxPages.size()-1 ) {
-                category = toolBoxPages.size()-1;
+            if ( category > _indenterParameterCategoryPages.size()-1 ) {
+                category = _indenterParameterCategoryPages.size()-1;
             }
             // read which type of input field the parameter needs
-            QString editType = indenterSettings->value(indenterParameter + "/EditorType").toString();
+            QString editType = _indenterSettings->value(indenterParameter + "/EditorType").toString();
 
             // edit type is numeric so create a spinbox with label
             if ( editType == "numeric" ) {
                 // read the parameter name as it is used at the command line or in its config file
-                QString parameterCallName = indenterSettings->value(indenterParameter + "/CallName").toString();
+                QString parameterCallName = _indenterSettings->value(indenterParameter + "/CallName").toString();
 
                 // create checkbox which enables or disables the parameter
-                QCheckBox *chkBox = new QCheckBox( toolBoxPages.at(category).page );
-                chkBox->setChecked( indenterSettings->value(indenterParameter + "/Enabled").toBool() );
+                QCheckBox *chkBox = new QCheckBox( _indenterParameterCategoryPages.at(category).widget );
+                chkBox->setChecked( _indenterSettings->value(indenterParameter + "/Enabled").toBool() );
                 chkBox->setToolTip( "Enables/disables the parameter. If disabled the indenters default value will be used." );
                 chkBox->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
                 int left, top, right, bottom;
@@ -980,34 +1015,34 @@
                 chkBox->setContentsMargins( left, top, 0, bottom );
 
                 // create the spinbox
-                QSpinBox *spinBox = new QSpinBox( toolBoxPages.at(category).page );
-                paramToolTip = indenterSettings->value(indenterParameter + "/Description").toString();
+                QSpinBox *spinBox = new QSpinBox( _indenterParameterCategoryPages.at(category).widget );
+                paramToolTip = _indenterSettings->value(indenterParameter + "/Description").toString();
                 spinBox->setToolTip( paramToolTip );
                 spinBox->setMaximumWidth(50);
                 spinBox->setMinimumWidth(50);
-                if ( mainWindow != NULL ) {
-                    spinBox->installEventFilter( mainWindow );
+                if ( _mainWindow != NULL ) {
+                    spinBox->installEventFilter( _mainWindow );
                 }
-                if ( indenterSettings->value(indenterParameter + "/MinVal").toString() != "" ) {
-                    spinBox->setMinimum( indenterSettings->value(indenterParameter + "/MinVal").toInt() );
+                if ( _indenterSettings->value(indenterParameter + "/MinVal").toString() != "" ) {
+                    spinBox->setMinimum( _indenterSettings->value(indenterParameter + "/MinVal").toInt() );
                 }
                 else {
                     spinBox->setMinimum( 0 );
                 }
-                if ( indenterSettings->value(indenterParameter + "/MaxVal").toString() != "" ) {
-                    spinBox->setMaximum( indenterSettings->value(indenterParameter + "/MaxVal").toInt() );
+                if ( _indenterSettings->value(indenterParameter + "/MaxVal").toString() != "" ) {
+                    spinBox->setMaximum( _indenterSettings->value(indenterParameter + "/MaxVal").toInt() );
                 }
                 else {
                     spinBox->setMaximum( 2000 );
                 }
 
                 // create the label
-                QLabel *label = new QLabel( toolBoxPages.at(category).page );
+                QLabel *label = new QLabel( _indenterParameterCategoryPages.at(category).widget );
                 label->setText(indenterParameter);
                 label->setBuddy(spinBox);
                 label->setToolTip( paramToolTip );
-                if ( mainWindow != NULL ) {
-                    label->installEventFilter( mainWindow );
+                if ( _mainWindow != NULL ) {
+                    label->installEventFilter( _mainWindow );
                 }
 
                 // put all into a layout and add it to the toolbox page
@@ -1015,7 +1050,7 @@
                 hboxLayout->addWidget(chkBox);
                 hboxLayout->addWidget(spinBox);
                 hboxLayout->addWidget(label);
-                toolBoxPages.at(category).vboxLayout->addLayout(hboxLayout);
+                _indenterParameterCategoryPages.at(category).vboxLayout->addLayout(hboxLayout);
 
                 // remember parameter name and reference to its spinbox
                 ParamNumeric paramNumeric;
@@ -1024,8 +1059,8 @@
                 paramNumeric.spinBox = spinBox;
                 paramNumeric.label = label;
                 paramNumeric.valueEnabledChkBox = chkBox;
-                paramNumeric.spinBox->setValue( indenterSettings->value(paramNumeric.paramName + "/ValueDefault").toInt() );
-                paramNumerics.append(paramNumeric);
+                paramNumeric.spinBox->setValue( _indenterSettings->value(paramNumeric.paramName + "/ValueDefault").toInt() );
+                _paramNumerics.append(paramNumeric);
 
                 QObject::connect(spinBox, SIGNAL(valueChanged(int)), this, SLOT(handleChangedIndenterSettings()));
                 QObject::connect(chkBox, SIGNAL(clicked()), this, SLOT(handleChangedIndenterSettings()));
@@ -1036,35 +1071,35 @@
             // edit type is boolean so create a checkbox
             else if ( editType == "boolean" ) {
                 // create the checkbox, make its settings and add it to the toolbox page
-                QCheckBox *chkBox = new QCheckBox( toolBoxPages.at(category).page );
+                QCheckBox *chkBox = new QCheckBox( _indenterParameterCategoryPages.at(category).widget );
                 chkBox->setText(indenterParameter);
-                paramToolTip = indenterSettings->value(indenterParameter + "/Description").toString();
+                paramToolTip = _indenterSettings->value(indenterParameter + "/Description").toString();
                 chkBox->setToolTip( paramToolTip );
-                if ( mainWindow != NULL ) {
-                    chkBox->installEventFilter( mainWindow );
+                if ( _mainWindow != NULL ) {
+                    chkBox->installEventFilter( _mainWindow );
                 }
-                toolBoxPages.at(category).vboxLayout->addWidget(chkBox);
+                _indenterParameterCategoryPages.at(category).vboxLayout->addWidget(chkBox);
 
                 // remember parameter name and reference to its checkbox
                 ParamBoolean paramBoolean;
                 paramBoolean.paramName = indenterParameter;
                 paramBoolean.checkBox = chkBox;
-                QStringList trueFalseStrings = indenterSettings->value(indenterParameter + "/TrueFalse").toString().split("|");
+                QStringList trueFalseStrings = _indenterSettings->value(indenterParameter + "/TrueFalse").toString().split("|");
                 paramBoolean.trueString = trueFalseStrings.at(0);
                 paramBoolean.falseString = trueFalseStrings.at(1);
-                paramBoolean.checkBox->setChecked( indenterSettings->value(paramBoolean.paramName + "/ValueDefault").toBool() );
-                paramBooleans.append(paramBoolean);
+                paramBoolean.checkBox->setChecked( _indenterSettings->value(paramBoolean.paramName + "/ValueDefault").toBool() );
+                _paramBooleans.append(paramBoolean);
 
                 QObject::connect(chkBox, SIGNAL(clicked()), this, SLOT(handleChangedIndenterSettings()));
             }
             // edit type is numeric so create a line edit with label
             else if ( editType == "string" ) {
                 // read the parameter name as it is used at the command line or in its config file
-                QString parameterCallName = indenterSettings->value(indenterParameter + "/CallName").toString();
+                QString parameterCallName = _indenterSettings->value(indenterParameter + "/CallName").toString();
 
                 // create check box which enables or disables the parameter
-                QCheckBox *chkBox = new QCheckBox( toolBoxPages.at(category).page );
-                chkBox->setChecked( indenterSettings->value(indenterParameter + "/Enabled").toBool() );
+                QCheckBox *chkBox = new QCheckBox( _indenterParameterCategoryPages.at(category).widget );
+                chkBox->setChecked( _indenterSettings->value(indenterParameter + "/Enabled").toBool() );
                 chkBox->setToolTip( "Enables/disables the parameter. If disabled the indenters default value will be used." );
                 chkBox->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
                 int left, top, right, bottom;
@@ -1072,23 +1107,23 @@
                 chkBox->setContentsMargins( left, top, 0, bottom );
 
                 // create the line edit
-                QLineEdit *lineEdit = new QLineEdit( toolBoxPages.at(category).page );
-                paramToolTip = indenterSettings->value(indenterParameter + "/Description").toString();
+                QLineEdit *lineEdit = new QLineEdit( _indenterParameterCategoryPages.at(category).widget );
+                paramToolTip = _indenterSettings->value(indenterParameter + "/Description").toString();
                 lineEdit->setToolTip( paramToolTip );
                 lineEdit->setMaximumWidth(50);
                 lineEdit->setMinimumWidth(50);
-                if ( mainWindow != NULL ) {
-                    lineEdit->installEventFilter( mainWindow );
+                if ( _mainWindow != NULL ) {
+                    lineEdit->installEventFilter( _mainWindow );
                 }
 
                 // create the label
-                QLabel *label = new QLabel( toolBoxPages.at(category).page );
+                QLabel *label = new QLabel( _indenterParameterCategoryPages.at(category).widget );
                 label->setText(indenterParameter);
                 label->setBuddy(lineEdit);
                 label->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred);
                 label->setToolTip( paramToolTip );
-                if ( mainWindow != NULL ) {
-                    label->installEventFilter( mainWindow );
+                if ( _mainWindow != NULL ) {
+                    label->installEventFilter( _mainWindow );
                 }
 
                 // put all into a layout and add it to the toolbox page
@@ -1096,7 +1131,7 @@
                 hboxLayout->addWidget(chkBox);
                 hboxLayout->addWidget(lineEdit);
                 hboxLayout->addWidget(label);
-                toolBoxPages.at(category).vboxLayout->addLayout(hboxLayout);
+                _indenterParameterCategoryPages.at(category).vboxLayout->addLayout(hboxLayout);
 
                 // remember parameter name and reference to its line edit
                 ParamString paramString;
@@ -1105,8 +1140,8 @@
                 paramString.lineEdit = lineEdit;
                 paramString.label = label;
                 paramString.valueEnabledChkBox = chkBox;
-                paramString.lineEdit->setText( indenterSettings->value(paramString.paramName + "/ValueDefault").toString() );
-                paramStrings.append(paramString);
+                paramString.lineEdit->setText( _indenterSettings->value(paramString.paramName + "/ValueDefault").toString() );
+                _paramStrings.append(paramString);
 
                 QObject::connect(lineEdit, SIGNAL(editingFinished()), this, SLOT(handleChangedIndenterSettings()));
                 QObject::connect(chkBox, SIGNAL(clicked()), this, SLOT(handleChangedIndenterSettings()));
@@ -1117,11 +1152,11 @@
             // edit type is multiple so create a combobox with label
             else if ( editType == "multiple" ) {
                 // read the parameter name as it is used at the command line or in its config file
-                QString parameterCallName = indenterSettings->value(indenterParameter + "/CallName").toString();
+                QString parameterCallName = _indenterSettings->value(indenterParameter + "/CallName").toString();
 
                 // create checkbox which enables or disables the parameter
-                QCheckBox *chkBox = new QCheckBox( toolBoxPages.at(category).page );
-                chkBox->setChecked( indenterSettings->value(indenterParameter + "/Enabled").toBool() );
+                QCheckBox *chkBox = new QCheckBox( _indenterParameterCategoryPages.at(category).widget );
+                chkBox->setChecked( _indenterSettings->value(indenterParameter + "/Enabled").toBool() );
                 chkBox->setToolTip( "Enables/disables the parameter. If disabled the indenters default value will be used." );
                 chkBox->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
                 int left, top, right, bottom;
@@ -1129,26 +1164,26 @@
                 chkBox->setContentsMargins( left, top, 0, bottom );
 
                 // create the combo box
-                QComboBox *comboBox = new QComboBox( toolBoxPages.at(category).page );
-                QStringList choicesStrings = indenterSettings->value(indenterParameter + "/Choices").toString().split("|");
-                QStringList choicesStringsReadable = indenterSettings->value(indenterParameter + "/ChoicesReadable").toString().split("|", QString::SkipEmptyParts);
+                QComboBox *comboBox = new QComboBox( _indenterParameterCategoryPages.at(category).widget );
+                QStringList choicesStrings = _indenterSettings->value(indenterParameter + "/Choices").toString().split("|");
+                QStringList choicesStringsReadable = _indenterSettings->value(indenterParameter + "/ChoicesReadable").toString().split("|", QString::SkipEmptyParts);
                 if ( choicesStringsReadable.isEmpty() ) {
                     comboBox->addItems( choicesStrings );
                 }
                 else {
                     comboBox->addItems( choicesStringsReadable );
                 }
-                paramToolTip = indenterSettings->value(indenterParameter + "/Description").toString();
+                paramToolTip = _indenterSettings->value(indenterParameter + "/Description").toString();
                 comboBox->setToolTip( paramToolTip );
-                if ( mainWindow != NULL ) {
-                    comboBox->installEventFilter( mainWindow );
+                if ( _mainWindow != NULL ) {
+                    comboBox->installEventFilter( _mainWindow );
                 }
 
                 // put all into a layout and add it to the toolbox page
                 QHBoxLayout *hboxLayout = new QHBoxLayout();
                 hboxLayout->addWidget(chkBox);
                 hboxLayout->addWidget(comboBox);
-                toolBoxPages.at(category).vboxLayout->addLayout(hboxLayout);
+                _indenterParameterCategoryPages.at(category).vboxLayout->addLayout(hboxLayout);
 
                 // remember parameter name and reference to its lineedit
                 ParamMultiple paramMultiple;
@@ -1158,8 +1193,8 @@
                 paramMultiple.choicesStrings = choicesStrings;
                 paramMultiple.choicesStringsReadable = choicesStringsReadable;
                 paramMultiple.valueEnabledChkBox = chkBox;
-                paramMultiple.comboBox->setCurrentIndex( indenterSettings->value(paramMultiple.paramName + "/ValueDefault").toInt() );
-                paramMultiples.append(paramMultiple);
+                paramMultiple.comboBox->setCurrentIndex( _indenterSettings->value(paramMultiple.paramName + "/ValueDefault").toInt() );
+                _paramMultiples.append(paramMultiple);
 
                 QObject::connect(comboBox, SIGNAL(activated(int)), this, SLOT(handleChangedIndenterSettings()));
                 QObject::connect(chkBox, SIGNAL(clicked()), this, SLOT(handleChangedIndenterSettings()));
@@ -1171,8 +1206,8 @@
     }
 
     // put a spacer at each page end
-    foreach (ToolBoxPage tbp, toolBoxPages) {
-        tbp.vboxLayout->addStretch();
+    foreach (IndenterParameterCategoryPage categoryPage, _indenterParameterCategoryPages) {
+        categoryPage.vboxLayout->addStretch();
     }
 }
 
@@ -1180,16 +1215,16 @@
 /*!
     \brief Searches and returns all indenters a configuration file is found for.
 
-    Opens all uigui ini files found in the list \a indenterIniFileList, opens each ini file
+    Opens all uigui ini files found in the list \a _indenterIniFileList, opens each ini file
     and reads the there defined real name of the indenter. These names are being returned as QStringList.
  */
 QStringList IndentHandler::getAvailableIndenters() {
     QStringList indenterNamesList;
 
     // Loop for every existing uigui ini file
-    foreach (QString indenterIniFile, indenterIniFileList) {
+    foreach (QString indenterIniFile, _indenterIniFileList) {
         // Open the ini file and search for the indenter name
-        QFile file(indenterDirctoryStr + "/" + indenterIniFile);
+        QFile file(_indenterDirctoryStr + "/" + indenterIniFile);
         if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) {
             int index = -1;
             QByteArray line;
@@ -1216,61 +1251,61 @@
     QApplication::setOverrideCursor(Qt::WaitCursor);
 
 #ifdef UNIVERSALINDENTGUI_NPP_EXPORTS
-    disconnect( toolBox, SIGNAL(currentChanged(int)), this, SLOT(updateDrawing()) );
+    disconnect( _indenterParameterCategoriesToolBox, SIGNAL(currentChanged(int)), this, SLOT(updateDrawing()) );
 #endif // UNIVERSALINDENTGUI_NPP_EXPORTS
 
     // Generate the parameter string that will be saved to the indenters config file.
     QString parameterString = getParameterString();
-    if ( !indenterFileName.isEmpty() ) {
-        saveConfigFile( settingsDirctoryStr + "/" + indenterFileName + ".cfg", parameterString );
+    if ( !_indenterFileName.isEmpty() ) {
+        saveConfigFile( _settingsDirctoryStr + "/" + _indenterFileName + ".cfg", parameterString );
     }
 
     // Take care if the selected indenterID is smaller or greater than the number of existing indenters
     if ( indenterID < 0 ) {
         indenterID = 0;
     }
-    if ( indenterID >= indenterIniFileList.count() ) {
-        indenterID = indenterIniFileList.count() - 1;
+    if ( indenterID >= _indenterIniFileList.count() ) {
+        indenterID = _indenterIniFileList.count() - 1;
     }
 
     // remove all pages from the toolbox
-    for (int i = 0; i < toolBox->count(); i++) {
-        toolBox->removeItem(i);
+    for (int i = 0; i < _indenterParameterCategoriesToolBox->count(); i++) {
+        _indenterParameterCategoriesToolBox->removeItem(i);
     }
 
     // delete all toolbox pages and by this its children
-    foreach (ToolBoxPage toolBoxPage, toolBoxPages) {
-        delete toolBoxPage.page;
+    foreach (IndenterParameterCategoryPage categoryPage, _indenterParameterCategoryPages) {
+        delete categoryPage.widget;
     }
 
     // empty all lists, which stored infos for the toolbox pages and its widgets
-    toolBoxPages.clear();
-    paramStrings.clear();
-    paramNumerics.clear();
-    paramBooleans.clear();
-    paramMultiples.clear();
-    delete indenterSettings;
+    _indenterParameterCategoryPages.clear();
+    _paramStrings.clear();
+    _paramNumerics.clear();
+    _paramBooleans.clear();
+    _paramMultiples.clear();
+    delete _indenterSettings;
 
 #ifdef UNIVERSALINDENTGUI_NPP_EXPORTS
     QWidget dummyWidget;
-    toolBox->addItem(&dummyWidget, "dummyText");
+    _indenterParameterCategoriesToolBox->addItem(&dummyWidget, "dummyText");
 #endif
 
-    readIndentIniFile( indenterDirctoryStr + "/" + indenterIniFileList.at(indenterID) );
+    readIndentIniFile( _indenterDirctoryStr + "/" + _indenterIniFileList.at(indenterID) );
 
     // Find out how the indenter can be executed.
     createIndenterCallString();
 
     // Load the users last settings made for this indenter.
-    loadConfigFile( settingsDirctoryStr + "/" + indenterFileName + ".cfg" );
+    loadConfigFile( _settingsDirctoryStr + "/" + _indenterFileName + ".cfg" );
 
     handleChangedIndenterSettings();
 
     QApplication::restoreOverrideCursor();
 
 #ifdef UNIVERSALINDENTGUI_NPP_EXPORTS
-    connect( toolBox, SIGNAL(currentChanged(int)), this, SLOT(updateDrawing()) );
-    toolBox->removeItem( toolBox->indexOf(&dummyWidget) );
+    connect( _indenterParameterCategoriesToolBox, SIGNAL(currentChanged(int)), this, SLOT(updateDrawing()) );
+    _indenterParameterCategoriesToolBox->removeItem( _indenterParameterCategoriesToolBox->indexOf(&dummyWidget) );
 #endif // UNIVERSALINDENTGUI_NPP_EXPORTS
 }
 
@@ -1279,7 +1314,7 @@
     \brief Returns a string containing by the indenter supported file types/extensions divided by a space.
  */
 QString IndentHandler::getPossibleIndenterFileExtensions() {
-    return fileTypes;
+    return _fileTypes;
 }
 
 
@@ -1287,7 +1322,7 @@
     \brief Returns the path and filename of the current indenter config file.
  */
 QString IndentHandler::getIndenterCfgFile() {
-    QFileInfo fileInfo( indenterDirctoryStr + "/" + globalConfigFilename_ );
+    QFileInfo fileInfo( _indenterDirctoryStr + "/" + _globalConfigFilename );
     return fileInfo.absoluteFilePath();
 }
 
@@ -1298,7 +1333,7 @@
 bool IndentHandler::createIndenterCallString() {
     QProcess indentProcess;
 
-    if ( indenterFileName.isEmpty() ) {
+    if ( _indenterFileName.isEmpty() ) {
         return false;
     }
 
@@ -1306,24 +1341,24 @@
     // ------------------------------------------------------------------------
 
     // Set the directory for the indenter execution
-    indentProcess.setWorkingDirectory( QFileInfo(indenterDirctoryStr).absoluteFilePath() );
+    indentProcess.setWorkingDirectory( QFileInfo(_indenterDirctoryStr).absoluteFilePath() );
 
     foreach ( QString suffix, QStringList() << "" << ".exe" << ".bat" << ".com" << ".sh" ) {
-        indenterExecutableSuffix = suffix;
-        indenterExecutableCallString = QFileInfo(indenterDirctoryStr).absoluteFilePath() + "/" + indenterFileName;
-        indenterExecutableCallString += suffix;
+        _indenterExecutableSuffix = suffix;
+        _indenterExecutableCallString = QFileInfo(_indenterDirctoryStr).absoluteFilePath() + "/" + _indenterFileName;
+        _indenterExecutableCallString += suffix;
 
         // Only try to call the indenter, if the file exists.
-        if ( QFile::exists(indenterExecutableCallString) ) {
+        if ( QFile::exists(_indenterExecutableCallString) ) {
             // Only try to call the indenter directly if it is no php file
-            if ( QFileInfo(indenterExecutableCallString).suffix().toLower() != "php" ) {
-                indentProcess.start( "\"" + indenterExecutableCallString +  + "\" " + indenterShowHelpParameter );
+            if ( QFileInfo(_indenterExecutableCallString).suffix().toLower() != "php" ) {
+                indentProcess.start( "\"" + _indenterExecutableCallString +  + "\" " + _indenterShowHelpParameter );
                 if ( indentProcess.waitForFinished(2000) ) {
-                    indenterExecutableCallString = "\"" + indenterExecutableCallString + "\"";
+                    _indenterExecutableCallString = "\"" + _indenterExecutableCallString + "\"";
                     return true;
                 }
                 else if ( indentProcess.error() == QProcess::Timedout ) {
-                    indenterExecutableCallString = "\"" + indenterExecutableCallString + "\"";
+                    _indenterExecutableCallString = "\"" + _indenterExecutableCallString + "\"";
                     return true;
                 }
             }
@@ -1332,10 +1367,10 @@
             // ----------------------------
             // If the file could not be executed, try to find a shebang at its start or test if its a php file.
             QString interpreterName = "";
-            QFile indenterExecutable( indenterExecutableCallString );
+            QFile indenterExecutable( _indenterExecutableCallString );
 
             // If indenter executable file has .php as suffix, use php as default interpreter
-            if ( QFileInfo(indenterExecutableCallString).suffix().toLower() == "php" ) {
+            if ( QFileInfo(_indenterExecutableCallString).suffix().toLower() == "php" ) {
                 interpreterName = "php -f";
             }
             // Else try to open the file and read the shebang.
@@ -1354,7 +1389,7 @@
 
             // Try to call the interpreter, if it exists.
             if ( !interpreterName.isEmpty() ) {
-                indenterExecutableCallString = interpreterName + " \"" + indenterExecutableCallString + "\"";
+                _indenterExecutableCallString = interpreterName + " \"" + _indenterExecutableCallString + "\"";
                 indentProcess.start( interpreterName + " -h");
                 if ( indentProcess.waitForFinished(2000) ) {
                     return true;
@@ -1364,7 +1399,7 @@
                 }
                 // now we know an interpreter is needed but it could not be called, so inform the user.
                 else {
-                    errorMessageDialog->showMessage( tr("Interpreter needed"),
+                    _errorMessageDialog->showMessage( tr("Interpreter needed"),
                         tr("To use the selected indenter the program \"%1\" needs to be available in the global environment. You should add an entry to your path settings.").arg(interpreterName) );
                     return true;
                 }
@@ -1375,10 +1410,10 @@
 
     // If unsuccessful try if the indenter executable is a JavaScript file
     // -------------------------------------------------------------------
-    indenterExecutableSuffix = ".js";
-    indenterExecutableCallString = QFileInfo(indenterDirctoryStr).absoluteFilePath() + "/" + indenterFileName;
-    indenterExecutableCallString += indenterExecutableSuffix;
-    if ( QFile::exists(indenterExecutableCallString) ) {
+    _indenterExecutableSuffix = ".js";
+    _indenterExecutableCallString = QFileInfo(_indenterDirctoryStr).absoluteFilePath() + "/" + _indenterFileName;
+    _indenterExecutableCallString += _indenterExecutableSuffix;
+    if ( QFile::exists(_indenterExecutableCallString) ) {
         return true;
     }
 
@@ -1386,9 +1421,9 @@
     // If unsuccessful try to call the indenter global, using some suffix
     // ------------------------------------------------------------------
     foreach ( QString suffix, QStringList() << "" << ".exe" << ".bat" << ".com" << ".sh" ) {
-        indenterExecutableSuffix = suffix;
-        indenterExecutableCallString = indenterFileName + suffix;
-        indentProcess.start( indenterExecutableCallString + " " + indenterShowHelpParameter );
+        _indenterExecutableSuffix = suffix;
+        _indenterExecutableCallString = _indenterFileName + suffix;
+        indentProcess.start( _indenterExecutableCallString + " " + _indenterShowHelpParameter );
         if ( indentProcess.waitForFinished(2000) ) {
             return true;
         }
@@ -1400,31 +1435,31 @@
 
     // If even globally calling the indenter fails, try calling .com and .exe via wine
     // -------------------------------------------------------------------------------
-    indenterExecutableCallString = "\"" + QFileInfo(indenterDirctoryStr).absoluteFilePath() + "/" + indenterFileName;
+    _indenterExecutableCallString = "\"" + QFileInfo(_indenterDirctoryStr).absoluteFilePath() + "/" + _indenterFileName;
 
     foreach ( QString suffix, QStringList() << ".exe" << ".com" ) {
-        indenterExecutableSuffix = suffix;
-        if ( QFile::exists(indenterDirctoryStr + "/" + indenterFileName + suffix) ) {
+        _indenterExecutableSuffix = suffix;
+        if ( QFile::exists(_indenterDirctoryStr + "/" + _indenterFileName + suffix) ) {
             QProcess wineTestProcess;
             wineTestProcess.start("wine --version");
             // if the process of wine was not callable assume that wine is not installed
             if ( !wineTestProcess.waitForFinished(2000) ) {
-                errorMessageDialog->showMessage(tr("wine not installed"), tr("There exists only a win32 executable of the indenter and wine does not seem to be installed. Please install wine to be able to run the indenter.") );
-                indenterExecutableCallString = "";
+                _errorMessageDialog->showMessage(tr("wine not installed"), tr("There exists only a win32 executable of the indenter and wine does not seem to be installed. Please install wine to be able to run the indenter.") );
+                _indenterExecutableCallString = "";
                 return false;
             }
             else {
-                indenterExecutableCallString = "\"" + QFileInfo(indenterDirctoryStr).absoluteFilePath() + "/";
-                indenterExecutableCallString += indenterFileName + suffix + "\"";
-                indenterExecutableCallString = "wine " + indenterExecutableCallString;
+                _indenterExecutableCallString = "\"" + QFileInfo(_indenterDirctoryStr).absoluteFilePath() + "/";
+                _indenterExecutableCallString += _indenterFileName + suffix + "\"";
+                _indenterExecutableCallString = "wine " + _indenterExecutableCallString;
 
                 return true;
             }
         }
     }
 
-    indenterExecutableCallString = "";
-    indenterExecutableSuffix = "";
+    _indenterExecutableCallString = "";
+    _indenterExecutableSuffix = "";
     return false;
 }
 
@@ -1433,8 +1468,8 @@
     \brief Returns a string that points to where the indenters manual can be found.
  */
 QString IndentHandler::getManual() {
-    if ( indenterSettings != NULL ) {
-        return indenterSettings->value("header/manual").toString();
+    if ( _indenterSettings != NULL ) {
+        return _indenterSettings->value("header/manual").toString();
     }
     else {
         return "";
@@ -1455,24 +1490,24 @@
     \brief Can be called to update all widgets text to the currently selected language.
  */
 void IndentHandler::retranslateUi() {
-    indenterSelectionCombobox->setToolTip( tr("<html><head><meta name=\"qrichtext\" content=\"1\" /></head><body style=\" white-space: pre-wrap; font-family:MS Shell Dlg; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;\"><p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Shows the currently chosen indenters name and lets you choose other available indenters</p></body></html>") );
-    indenterParameterHelpButton->setToolTip( tr("Brings you to the online manual of the currently selected indenter, where you can get further help on the possible parameters.") );
+    _indenterSelectionCombobox->setToolTip( tr("<html><head><meta name=\"qrichtext\" content=\"1\" /></head><body style=\" white-space: pre-wrap; font-family:MS Shell Dlg; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;\"><p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Shows the currently chosen indenters name and lets you choose other available indenters</p></body></html>") );
+    _indenterParameterHelpButton->setToolTip( tr("Brings you to the online manual of the currently selected indenter, where you can get further help on the possible parameters.") );
 
-    actionLoad_Indenter_Config_File->setText(QApplication::translate("IndentHandler", "Load Indenter Config File", 0, QApplication::UnicodeUTF8));
-    actionLoad_Indenter_Config_File->setStatusTip(QApplication::translate("IndentHandler", "Opens a file dialog to load the original config file of the indenter.", 0, QApplication::UnicodeUTF8));
-    actionLoad_Indenter_Config_File->setShortcut(QApplication::translate("IndentHandler", "Alt+O", 0, QApplication::UnicodeUTF8));
+    _actionLoadIndenterConfigFile->setText(QApplication::translate("IndentHandler", "Load Indenter Config File", 0, QApplication::UnicodeUTF8));
+    _actionLoadIndenterConfigFile->setStatusTip(QApplication::translate("IndentHandler", "Opens a file dialog to load the original config file of the indenter.", 0, QApplication::UnicodeUTF8));
+    _actionLoadIndenterConfigFile->setShortcut(QApplication::translate("IndentHandler", "Alt+O", 0, QApplication::UnicodeUTF8));
 
-    actionSave_Indenter_Config_File->setText(QApplication::translate("IndentHandler", "Save Indenter Config File", 0, QApplication::UnicodeUTF8));
-    actionSave_Indenter_Config_File->setStatusTip(QApplication::translate("IndentHandler", "Opens a dialog to save the current indenter configuration to a file.", 0, QApplication::UnicodeUTF8));
-    actionSave_Indenter_Config_File->setShortcut(QApplication::translate("IndentHandler", "Alt+S", 0, QApplication::UnicodeUTF8));
+    _actionSaveIndenterConfigFile->setText(QApplication::translate("IndentHandler", "Save Indenter Config File", 0, QApplication::UnicodeUTF8));
+    _actionSaveIndenterConfigFile->setStatusTip(QApplication::translate("IndentHandler", "Opens a dialog to save the current indenter configuration to a file.", 0, QApplication::UnicodeUTF8));
+    _actionSaveIndenterConfigFile->setShortcut(QApplication::translate("IndentHandler", "Alt+S", 0, QApplication::UnicodeUTF8));
 
-    actionCreateShellScript->setText(QApplication::translate("IndentHandler", "Create Indenter Call Shell Script", 0, QApplication::UnicodeUTF8));
-    actionCreateShellScript->setToolTip(QApplication::translate("IndentHandler", "Create a shell script that calls the current selected indenter for formatting an as parameter given file with the current indent settings.", 0, QApplication::UnicodeUTF8));
-    actionCreateShellScript->setStatusTip(QApplication::translate("IndentHandler", "Create a shell script that calls the current selected indenter for formatting an as parameter given file with the current indent settings.", 0, QApplication::UnicodeUTF8));
+    _actionCreateShellScript->setText(QApplication::translate("IndentHandler", "Create Indenter Call Shell Script", 0, QApplication::UnicodeUTF8));
+    _actionCreateShellScript->setToolTip(QApplication::translate("IndentHandler", "Create a shell script that calls the current selected indenter for formatting an as parameter given file with the current indent settings.", 0, QApplication::UnicodeUTF8));
+    _actionCreateShellScript->setStatusTip(QApplication::translate("IndentHandler", "Create a shell script that calls the current selected indenter for formatting an as parameter given file with the current indent settings.", 0, QApplication::UnicodeUTF8));
 
-    actionResetIndenterParameters->setText(QApplication::translate("IndentHandler", "Reset indenter parameters", 0, QApplication::UnicodeUTF8));
-    actionResetIndenterParameters->setToolTip(QApplication::translate("IndentHandler", "Resets all indenter parameters to the default values.", 0, QApplication::UnicodeUTF8));
-    actionResetIndenterParameters->setStatusTip(QApplication::translate("IndentHandler", "Resets all indenter parameters to the default values.", 0, QApplication::UnicodeUTF8));
+    _actionResetIndenterParameters->setText(QApplication::translate("IndentHandler", "Reset indenter parameters", 0, QApplication::UnicodeUTF8));
+    _actionResetIndenterParameters->setToolTip(QApplication::translate("IndentHandler", "Resets all indenter parameters to the default values.", 0, QApplication::UnicodeUTF8));
+    _actionResetIndenterParameters->setStatusTip(QApplication::translate("IndentHandler", "Resets all indenter parameters to the default values.", 0, QApplication::UnicodeUTF8));
 }
 
 
@@ -1480,7 +1515,7 @@
     \brief Returns the name of the currently selected indenter.
  */
 QString IndentHandler::getCurrentIndenterName() {
-    QString currentIndenterName = indenterSelectionCombobox->currentText();
+    QString currentIndenterName = _indenterSelectionCombobox->currentText();
 
     // Remove the supported programming languages from indenters name, which are set in braces.
     if ( currentIndenterName.indexOf("(") > 0 ) {
@@ -1561,7 +1596,7 @@
     QFile::remove(shellScriptFileName);
     QFile outSrcFile(shellScriptFileName);
     if ( outSrcFile.open( QFile::ReadWrite | QFile::Text ) ) {
-        QString shellScriptConfigFilename = QFileInfo(shellScriptFileName).baseName() + "." + QFileInfo(globalConfigFilename_).suffix();
+        QString shellScriptConfigFilename = QFileInfo(shellScriptFileName).baseName() + "." + QFileInfo(_globalConfigFilename).suffix();
 
         // Get the content of the shell/batch script.
         QString indenterCallShellScript = generateShellScript(shellScriptConfigFilename);
@@ -1578,7 +1613,7 @@
 
         // Save the indenter config file to the same directory, where the shell srcipt was saved to,
         // because the script will reference it there via "./".
-        if ( !globalConfigFilename_.isEmpty() ) {
+        if ( !_globalConfigFilename.isEmpty() ) {
             saveConfigFile( QFileInfo(shellScriptFileName).path() + "/" + shellScriptConfigFilename, getParameterString() );
         }
     }
@@ -1619,26 +1654,26 @@
 
 
 /*!
-    \brief Sets the function pointer \a parameterChangedCallback to the given callback
+    \brief Sets the function pointer \a _parameterChangedCallback to the given callback
     function \a paramChangedCallback.
 
     Is needed for use as Notepad++ plugin.
  */
 void IndentHandler::setParameterChangedCallback( void(*paramChangedCallback)(void) ) {
-    parameterChangedCallback = paramChangedCallback;
+    _parameterChangedCallback = paramChangedCallback;
 }
 
 
 /*!
-    \brief Emits the \a indenterSettingsChanged signal and if set executes the \a parameterChangedCallback function.
+    \brief Emits the \a indenterSettingsChanged signal and if set executes the \a _parameterChangedCallback function.
 
    Is needed for use as Notepad++ plugin.
  */
 void IndentHandler::handleChangedIndenterSettings() {
     emit( indenterSettingsChanged() );
 
-    if ( parameterChangedCallback != NULL ) {
-        parameterChangedCallback();
+    if ( _parameterChangedCallback != NULL ) {
+        _parameterChangedCallback();
     }
 }
 
@@ -1649,18 +1684,18 @@
    Is needed for use as Notepad++ plugin.
  */
 void IndentHandler::setWindowClosedCallback( void(*winClosedCallback)(void) ) {
-    windowClosedCallback = winClosedCallback;
+    _windowClosedCallback = winClosedCallback;
 }
 
 
 /*!
-    \brief Is called on this indenter parameter window close and if set calls the function \a windowClosedCallback.
+    \brief Is called on this indenter parameter window close and if set calls the function \a _windowClosedCallback.
 
     Is needed for use as Notepad++ plugin.
  */
 void IndentHandler::closeEvent(QCloseEvent *event) {
-    if ( windowClosedCallback != NULL ) {
-        windowClosedCallback();
+    if ( _windowClosedCallback != NULL ) {
+        _windowClosedCallback();
     }
     event->accept();
 }
@@ -1670,7 +1705,7 @@
     \brief Returns the id (list index) of the currently selected indenter.
  */
 int IndentHandler::getIndenterId() {
-    return indenterSelectionCombobox->currentIndex();
+    return _indenterSelectionCombobox->currentIndex();
 }
 
 
@@ -1696,6 +1731,7 @@
 /*!
     \brief Converts characters < > and & in the \a text to HTML codes &lt &gt and &amp.
  */
+//TODO: This function should go into a string helper/tool class/file.
 QString IndentHandler::encodeToHTML(const QString &text) {
     QString htmlText = text;
     htmlText.replace("&", "&amp;");
--- a/src/IndentHandler.h	Sat Oct 02 12:48:56 2010 +0000
+++ b/src/IndentHandler.h	Thu Oct 14 19:52:47 2010 +0000
@@ -21,36 +21,19 @@
 #define INDENTHANDLER_H
 
 #include <QWidget>
-#include <QToolBox>
-#include <QVBoxLayout>
-#include <QApplication>
-#include <QCheckBox>
-#include <QComboBox>
-#include <QToolButton>
-#include <QFile>
-#include <QProcess>
-#include <QSettings>
-#include <QStringList>
-#include <QLineEdit>
-#include <QSpinBox>
-#include <QLabel>
-#include <QByteArray>
-#include <QDir>
-#include <QMessageBox>
-#include <QMainWindow>
-#include <QTextStream>
-#include <QTextCodec>
-#include <QtScript>
-#include <QDesktopServices>
-#include <QMenu>
-#include <QAction>
-#include <QContextMenuEvent>
-#include <QFileDialog>
+
+class UiGuiErrorMessage;
+class UiGuiIniFileParser;
 
-#include "UiGuiErrorMessage.h"
-#include "TemplateBatchScript.h"
-#include "UiGuiIniFileParser.h"
-#include "SettingsPaths.h"
+class QMenu;
+class QVBoxLayout;
+class QLabel;
+class QSpinBox;
+class QComboBox;
+class QCheckBox;
+class QLineEdit;
+class QToolButton;
+class QToolBox;
 
 
 class IndentHandler : public QWidget
@@ -106,12 +89,12 @@
     bool createIndenterCallString();
     void initIndenterMenu();
 
-    //! Holds a reference to all created pages of the toolbox and the pages boxlayout
-    struct ToolBoxPage {
-        QWidget *page;
+    //! Holds a reference to all created pages of the parameter categories toolbox and the pages boxlayout
+    struct IndenterParameterCategoryPage {
+        QWidget *widget;
         QVBoxLayout *vboxLayout;
     };
-    QVector<ToolBoxPage> toolBoxPages;
+    QVector<IndenterParameterCategoryPage> _indenterParameterCategoryPages;
 
     //! Holds a reference to all checkboxes needed for boolean parameter setting and the parameters name
     struct ParamBoolean {
@@ -120,7 +103,7 @@
         QString falseString;
         QCheckBox *checkBox;
     };
-    QVector<ParamBoolean> paramBooleans;
+    QVector<ParamBoolean> _paramBooleans;
 
     //! Holds a reference to all line edits needed for parameter setting and the parameters name
     struct ParamString {
@@ -130,7 +113,7 @@
         QLineEdit *lineEdit;
         QLabel *label;
     };
-    QVector<ParamString> paramStrings;
+    QVector<ParamString> _paramStrings;
 
     //! Hold a reference to all spin boxes needed for parameter setting and the parameters name
     struct ParamNumeric {
@@ -140,7 +123,7 @@
         QSpinBox *spinBox;
         QLabel *label;
     };
-    QVector<ParamNumeric> paramNumerics;
+    QVector<ParamNumeric> _paramNumerics;
 
     //! Hold a reference to all combo boxes needed for parameter setting and the parameters name
     struct ParamMultiple {
@@ -151,45 +134,49 @@
         QStringList choicesStrings;
         QStringList choicesStringsReadable;
     };
-    QVector<ParamMultiple> paramMultiples;
+    QVector<ParamMultiple> _paramMultiples;
 
-    QComboBox *indenterSelectionCombobox;
-    QToolButton *indenterParameterHelpButton;
-    QVBoxLayout *vboxLayout;
-    QToolBox *toolBox;
-    UiGuiIniFileParser *indenterSettings;
-    QStringList indenterParameters;
+    QComboBox *_indenterSelectionCombobox;
+    QToolButton *_indenterParameterHelpButton;
+    //! Vertical layout box, into which the toolbox will be added
+    QVBoxLayout *_toolBoxContainerLayout;
+    QToolBox *_indenterParameterCategoriesToolBox;
+    UiGuiIniFileParser *_indenterSettings;
+    QStringList _indenterParameters;
     //! The indenters name in a descriptive form
-    QString indenterName;
+    QString _indenterName;
     //! The indenters file name (w/o extension), that is being called
-    QString indenterFileName;
-    QString indenterDirctoryStr;
-    QString tempDirctoryStr;
-    QString settingsDirctoryStr;
-    QStringList indenterIniFileList;
-    QString parameterOrder;
-    QString globalConfigFilename_;
-    QString cfgFileParameterEnding;
-    QString inputFileParameter;
-    QString inputFileName;
-    QString outputFileParameter;
-    QString outputFileName;
-    QString fileTypes;
-    QString useCfgFileParameter;
-    QString indenterShowHelpParameter;
-    QWidget *mainWindow;
-    UiGuiErrorMessage *errorMessageDialog;
-    QString indenterExecutableCallString;
-    QString indenterExecutableSuffix;
+    QString _indenterFileName;
+    QString _indenterDirctoryStr;
+    QString _tempDirctoryStr;
+    QString _settingsDirctoryStr;
+    QStringList _indenterIniFileList;
+    QString _parameterOrder;
+    QString _globalConfigFilename;
+    QString _cfgFileParameterEnding;
+    QString _inputFileParameter;
+    QString _inputFileName;
+    QString _outputFileParameter;
+    QString _outputFileName;
+    QString _fileTypes;
+    QString _useCfgFileParameter;
+    QString _indenterShowHelpParameter;
+    QWidget *_mainWindow;
+    UiGuiErrorMessage *_errorMessageDialog;
+    QString _indenterExecutableCallString;
+    QString _indenterExecutableSuffix;
 
-    QMenu *menuIndenter;
-    QAction *actionLoad_Indenter_Config_File;
-    QAction *actionSave_Indenter_Config_File;
-    QAction *actionCreateShellScript;
-    QAction *actionResetIndenterParameters;
-    void(*parameterChangedCallback)(void);
-    void(*windowClosedCallback)(void);
+    QMenu *_menuIndenter;
+    QAction *_actionLoadIndenterConfigFile;
+    QAction *_actionSaveIndenterConfigFile;
+    QAction *_actionCreateShellScript;
+    QAction *_actionResetIndenterParameters;
+    //! Needed for the NPP plugin.
+    void(*_parameterChangedCallback)(void);
+    //! Needed for the NPP plugin.
+    void(*_windowClosedCallback)(void);
 
+	//TODO: This function should go into a string helper/tool class/file.
     QString encodeToHTML(const QString &text);
 };
 
--- a/src/MainWindow.cpp	Sat Oct 02 12:48:56 2010 +0000
+++ b/src/MainWindow.cpp	Thu Oct 14 19:52:47 2010 +0000
@@ -18,9 +18,44 @@
  ***************************************************************************/
 
 #include "MainWindow.h"
+#include "ui_MainWindow.h"
 
 #include "UiGuiVersion.h"
 #include "UiGuiLogger.h"
+#include "SettingsPaths.h"
+
+#include "ui_ToolBarWidget.h"
+#include "AboutDialog.h"
+#include "AboutDialogGraphicsView.h"
+#include "UiGuiSettings.h"
+#include "UiGuiSettingsDialog.h"
+#include "UiGuiHighlighter.h"
+#include "IndentHandler.h"
+#include "UpdateCheckDialog.h"
+
+#include <QWidget>
+#include <QLabel>
+#include <QString>
+#include <QScrollBar>
+#include <QTextCursor>
+#include <QFileDialog>
+#include <QTextStream>
+#include <QTextDocument>
+#include <QPrinter>
+#include <QPrintDialog>
+#include <QCloseEvent>
+#include <QHelpEvent>
+#include <QToolTip>
+#include <QTranslator>
+#include <QLocale>
+#include <QTextCodec>
+#include <QDate>
+#include <QUrl>
+#include <QMessageBox>
+#include <QtDebug>
+
+#include <Qsci/qsciscintilla.h>
+#include <Qsci/qsciprinter.h>
 
 //! \defgroup grp_MainWindow All concerning main window functionality.
 
@@ -37,13 +72,31 @@
 /*!
     \brief Constructs the main window.
  */
-MainWindow::MainWindow(QString file2OpenOnStart, QWidget *parent) : QMainWindow(parent), qSciSourceCodeEditor(NULL) {
+MainWindow::MainWindow(QString file2OpenOnStart, QWidget *parent) : QMainWindow(parent)
+	, _mainWindowForm(NULL)
+	, _qSciSourceCodeEditor(NULL)
+	, _settings(NULL)
+	, _highlighter(NULL)
+	, _textEditVScrollBar(NULL)
+	, _aboutDialog(NULL)
+	, _aboutDialogGraphicsView(NULL)
+	, _settingsDialog(NULL)
+	, _encodingActionGroup(NULL)
+	, _saveEncodedActionGroup(NULL)
+	, _highlighterActionGroup(NULL)
+	, _uiGuiTranslator(NULL)
+	, _qTTranslator(NULL)
+	, _toolBarWidget(NULL)
+	, _indentHandler(NULL)
+	, _updateCheckDialog(NULL)
+	, _textEditLineColumnInfoLabel(NULL)
+{
     // Init of some variables.
-    sourceCodeChanged = false;
-    scrollPositionChanged = false;
+    _sourceCodeChanged = false;
+    _scrollPositionChanged = false;
 
-    // Create the settings object, which loads all UiGui settings from a file.
-    settings = UiGuiSettings::getInstance();
+    // Create the _settings object, which loads all UiGui settings from a file.
+    _settings = UiGuiSettings::getInstance();
 
     // Initialize the language of the application.
     initApplicationLanguage();
@@ -69,14 +122,14 @@
 
 
     // Generate about dialog box
-    aboutDialog = new AboutDialog(this, Qt::SplashScreen);
-    aboutDialogGraphicsView = new AboutDialogGraphicsView(aboutDialog, this);
-    connect( toolBarWidget->pbAbout, SIGNAL(clicked()), this, SLOT(showAboutDialog()) );
-    connect( actionAbout_UniversalIndentGUI, SIGNAL(triggered()), this, SLOT(showAboutDialog()) );
+    _aboutDialog = new AboutDialog(this, Qt::SplashScreen);
+    _aboutDialogGraphicsView = new AboutDialogGraphicsView(_aboutDialog, this);
+    connect( _toolBarWidget->pbAbout, SIGNAL(clicked()), this, SLOT(showAboutDialog()) );
+    connect( _mainWindowForm->actionAbout_UniversalIndentGUI, SIGNAL(triggered()), this, SLOT(showAboutDialog()) );
 
     // Generate settings dialog box
-    settingsDialog = new UiGuiSettingsDialog(this, settings);
-    connect( actionShowSettings, SIGNAL(triggered()), settingsDialog, SLOT(showDialog()) );
+    _settingsDialog = new UiGuiSettingsDialog(this, _settings);
+    connect( _mainWindowForm->actionShowSettings, SIGNAL(triggered()), _settingsDialog, SLOT(showDialog()) );
 
     // If a file that should be opened on start has been handed over to the constructor exists, load it
     if ( QFile::exists(file2OpenOnStart) ) {
@@ -90,8 +143,8 @@
     updateSourceView();
 
     // Check if a newer version is available but only if the setting for that is enabled and today not already a check has been done.
-    if ( settings->getValueByName("CheckForUpdate").toBool() && QDate::currentDate() != settings->getValueByName("LastUpdateCheck").toDate() ) {
-        updateCheckDialog->checkForUpdate();
+    if ( _settings->getValueByName("CheckForUpdate").toBool() && QDate::currentDate() != _settings->getValueByName("LastUpdateCheck").toDate() ) {
+        _updateCheckDialog->checkForUpdate();
     }
 
     // Enable accept dropping of files.
@@ -100,65 +153,66 @@
 
 
 /*!
-    \brief Initializes the main window by creating the main gui and make some settings.
+    \brief Initializes the main window by creating the main gui and make some _settings.
  */
 void MainWindow::initMainWindow() {
     // Generate gui as it is build in the file "mainwindow.ui"
-    setupUi(this);
+    _mainWindowForm = new Ui::MainWindowUi();
+    _mainWindowForm->setupUi(this);
 
     // Handle last opened window size
     // ------------------------------
-    bool maximized = settings->getValueByName("maximized").toBool();
-    QPoint pos = settings->getValueByName("position").toPoint();
-    QSize size = settings->getValueByName("size").toSize();
+    bool maximized = _settings->getValueByName("maximized").toBool();
+    QPoint pos = _settings->getValueByName("position").toPoint();
+    QSize size = _settings->getValueByName("size").toSize();
     resize(size);
     move(pos);
     if ( maximized ) {
         showMaximized();
     }
 #ifndef Q_OS_MAC // On Mac restoring the window state causes the screenshot no longer to work.
-    restoreState( settings->getValueByName("MainWindowState").toByteArray() );
+    restoreState( _settings->getValueByName("MainWindowState").toByteArray() );
 #endif
 
     // Handle if first run of this version
     // -----------------------------------
-    QString readVersion = settings->getValueByName("version").toString();
+    QString readVersion = _settings->getValueByName("version").toString();
     // If version strings are not equal set first run true.
     if ( readVersion != PROGRAM_VERSION_STRING ) {
-        isFirstRunOfThisVersion = true;
+        _isFirstRunOfThisVersion = true;
     }
     else {
-        isFirstRunOfThisVersion = false;
+        _isFirstRunOfThisVersion = false;
     }
 
     // Get last selected file encoding
     // -------------------------------
-    currentEncoding = settings->getValueByName("encoding").toString();
+    _currentEncoding = _settings->getValueByName("encoding").toString();
 
-    updateCheckDialog = new UpdateCheckDialog(settings, this);
+    _updateCheckDialog = new UpdateCheckDialog(_settings, this);
 
-    // Register the load last file setting in the menu to the settings object.
-    settings->registerObjectProperty(loadLastOpenedFileOnStartupAction, "checked", "loadLastSourceCodeFileOnStartup");
+    // Register the load last file setting in the menu to the _settings object.
+    _settings->registerObjectProperty(_mainWindowForm->loadLastOpenedFileOnStartupAction, "checked", "loadLastSourceCodeFileOnStartup");
 
     // Tell the QScintilla editor if it has to show white space.
-    connect( whiteSpaceIsVisibleAction, SIGNAL(toggled(bool)), this, SLOT(setWhiteSpaceVisibility(bool)) );
-    // Register the white space setting in the menu to the settings object.
-    settings->registerObjectProperty(whiteSpaceIsVisibleAction, "checked", "whiteSpaceIsVisible");
+    connect( _mainWindowForm->whiteSpaceIsVisibleAction, SIGNAL(toggled(bool)), this, SLOT(setWhiteSpaceVisibility(bool)) );
+    // Register the white space setting in the menu to the _settings object.
+    _settings->registerObjectProperty(_mainWindowForm->whiteSpaceIsVisibleAction, "checked", "whiteSpaceIsVisible");
 
     // Connect the remaining menu items.
-    connect( actionOpen_Source_File, SIGNAL(triggered()), this, SLOT(openSourceFileDialog()) );
-    connect( actionSave_Source_File_As, SIGNAL(triggered()), this, SLOT(saveasSourceFileDialog()) );
-    connect( actionSave_Source_File, SIGNAL(triggered()), this, SLOT(saveSourceFile()) );
-    connect( actionExportPDF, SIGNAL(triggered()), this, SLOT(exportToPDF()) );
-    connect( actionExportHTML, SIGNAL(triggered()), this, SLOT(exportToHTML()) );
-    connect( actionCheck_for_update, SIGNAL(triggered()), updateCheckDialog, SLOT(checkForUpdateAndShowDialog()) );
-    connect( actionShowLog, SIGNAL(triggered()), UiGuiLogger::getInstance(), SLOT(show()) );
+    connect( _mainWindowForm->actionOpen_Source_File, SIGNAL(triggered()), this, SLOT(openSourceFileDialog()) );
+    connect( _mainWindowForm->actionSave_Source_File_As, SIGNAL(triggered()), this, SLOT(saveasSourceFileDialog()) );
+    connect( _mainWindowForm->actionSave_Source_File, SIGNAL(triggered()), this, SLOT(saveSourceFile()) );
+    connect( _mainWindowForm->actionExportPDF, SIGNAL(triggered()), this, SLOT(exportToPDF()) );
+    connect( _mainWindowForm->actionExportHTML, SIGNAL(triggered()), this, SLOT(exportToHTML()) );
+    connect( _mainWindowForm->actionCheck_for_update, SIGNAL(triggered()), _updateCheckDialog, SLOT(checkForUpdateAndShowDialog()) );
+    connect( _mainWindowForm->actionShowLog, SIGNAL(triggered()), UiGuiLogger::getInstance(), SLOT(show()) );
 
     // Init the menu for selecting one of the recently opened files.
     updateRecentlyOpenedList();
-    connect( menuRecently_Opened_Files, SIGNAL(triggered(QAction*)), this, SLOT(openFileFromRecentlyOpenedList(QAction*)) );
-    //connect( settings, SIGNAL(recentlyOpenedListSize(int)), this, SLOT(updateRecentlyOpenedList()) );
-    settings->registerObjectSlot(this, "updateRecentlyOpenedList()", "recentlyOpenedListSize");
+    connect( _mainWindowForm->menuRecently_Opened_Files, SIGNAL(triggered(QAction*)), this, SLOT(openFileFromRecentlyOpenedList(QAction*)) );
+    //connect( _settings, SIGNAL(recentlyOpenedListSize(int)), this, SLOT(updateRecentlyOpenedList()) );
+    _settings->registerObjectSlot(this, "updateRecentlyOpenedList()", "recentlyOpenedListSize");
 }
 
 
@@ -167,20 +221,20 @@
  */
 void MainWindow::initToolBar() {
     // Create the tool bar and add it to the main window.
-    toolBarWidget = new Ui::ToolBarWidget();
+    _toolBarWidget = new Ui::ToolBarWidget();
     QWidget* helpWidget = new QWidget();
-    toolBarWidget->setupUi(helpWidget);
-    toolBar->addWidget(helpWidget);
-    toolBar->setAllowedAreas( Qt::TopToolBarArea | Qt::BottomToolBarArea );
+    _toolBarWidget->setupUi(helpWidget);
+    _mainWindowForm->toolBar->addWidget(helpWidget);
+    _mainWindowForm->toolBar->setAllowedAreas( Qt::TopToolBarArea | Qt::BottomToolBarArea );
 
     // Connect the tool bar widgets to their functions.
-    settings->registerObjectProperty(toolBarWidget->enableSyntaxHighlightningCheckBox, "checked", "SyntaxHighlightingEnabled");
-    toolBarWidget->enableSyntaxHighlightningCheckBox->hide();
-    connect( toolBarWidget->pbOpen_Source_File, SIGNAL(clicked()), this, SLOT(openSourceFileDialog()) );
-    connect( toolBarWidget->pbExit, SIGNAL(clicked()), this, SLOT(close()));
-    connect( toolBarWidget->cbLivePreview, SIGNAL(toggled(bool)), this, SLOT(previewTurnedOnOff(bool)) );
-    connect( toolBarWidget->cbLivePreview, SIGNAL(toggled(bool)), actionLive_Indent_Preview, SLOT(setChecked(bool)) );
-    connect( actionLive_Indent_Preview, SIGNAL(toggled(bool)), toolBarWidget->cbLivePreview, SLOT(setChecked(bool)) );
+    _settings->registerObjectProperty(_toolBarWidget->enableSyntaxHighlightningCheckBox, "checked", "SyntaxHighlightingEnabled");
+    _toolBarWidget->enableSyntaxHighlightningCheckBox->hide();
+    connect( _toolBarWidget->pbOpen_Source_File, SIGNAL(clicked()), this, SLOT(openSourceFileDialog()) );
+    connect( _toolBarWidget->pbExit, SIGNAL(clicked()), this, SLOT(close()));
+    connect( _toolBarWidget->cbLivePreview, SIGNAL(toggled(bool)), this, SLOT(previewTurnedOnOff(bool)) );
+    connect( _toolBarWidget->cbLivePreview, SIGNAL(toggled(bool)), _mainWindowForm->actionLive_Indent_Preview, SLOT(setChecked(bool)) );
+    connect( _mainWindowForm->actionLive_Indent_Preview, SIGNAL(toggled(bool)), _toolBarWidget->cbLivePreview, SLOT(setChecked(bool)) );
 }
 
 
@@ -193,70 +247,70 @@
         << " the debug and release version of QScintilla are mixed or the library cannot be found at all.";
     // Try and catch doesn't seem to catch the runtime error when starting UiGUI release with QScintilla debug lib and the other way around.
     try {
-        qSciSourceCodeEditor = new QsciScintilla(this);
+        _qSciSourceCodeEditor = new QsciScintilla(this);
     }
     catch (...) {
         QMessageBox::critical(this, "Error creating QScintilla text editor component!",
             "During trying to create the text editor component, that is based on QScintilla, an error occurred. Please make sure that you have installed QScintilla and not mixed release and debug versions." );
         exit(1);
     }
-    hboxLayout1->addWidget(qSciSourceCodeEditor);
+    _mainWindowForm->hboxLayout1->addWidget(_qSciSourceCodeEditor);
 
-    // Make some settings for the QScintilla widget.
-    qSciSourceCodeEditor->setUtf8(true);
-    qSciSourceCodeEditor->setMarginLineNumbers(1, true);
-    qSciSourceCodeEditor->setMarginWidth(1, QString("10000") );
-    qSciSourceCodeEditor->setBraceMatching(qSciSourceCodeEditor->SloppyBraceMatch);
-    qSciSourceCodeEditor->setMatchedBraceForegroundColor( QColor("red") );
-    qSciSourceCodeEditor->setFolding(QsciScintilla::BoxedTreeFoldStyle);
-    qSciSourceCodeEditor->setAutoCompletionSource(QsciScintilla::AcsAll);
-    qSciSourceCodeEditor->setAutoCompletionThreshold(3);
+    // Make some _settings for the QScintilla widget.
+    _qSciSourceCodeEditor->setUtf8(true);
+    _qSciSourceCodeEditor->setMarginLineNumbers(1, true);
+    _qSciSourceCodeEditor->setMarginWidth(1, QString("10000") );
+    _qSciSourceCodeEditor->setBraceMatching(_qSciSourceCodeEditor->SloppyBraceMatch);
+    _qSciSourceCodeEditor->setMatchedBraceForegroundColor( QColor("red") );
+    _qSciSourceCodeEditor->setFolding(QsciScintilla::BoxedTreeFoldStyle);
+    _qSciSourceCodeEditor->setAutoCompletionSource(QsciScintilla::AcsAll);
+    _qSciSourceCodeEditor->setAutoCompletionThreshold(3);
 
     // Handle if white space is set to be visible
-    bool whiteSpaceIsVisible = settings->getValueByName("whiteSpaceIsVisible").toBool();
+    bool whiteSpaceIsVisible = _settings->getValueByName("whiteSpaceIsVisible").toBool();
     setWhiteSpaceVisibility( whiteSpaceIsVisible );
 
     // Handle the width of tabs in spaces
-    int tabWidth = settings->getValueByName("tabWidth").toInt();
-    qSciSourceCodeEditor->setTabWidth(tabWidth);
+    int tabWidth = _settings->getValueByName("tabWidth").toInt();
+    _qSciSourceCodeEditor->setTabWidth(tabWidth);
 
     // Remember a pointer to the scrollbar of the QScintilla widget used to keep
     // on the same line as before when turning preview on/off.
-    textEditVScrollBar = qSciSourceCodeEditor->verticalScrollBar();
+    _textEditVScrollBar = _qSciSourceCodeEditor->verticalScrollBar();
 
     // Add a column row indicator to the status bar.
-    textEditLineColumnInfoLabel = new QLabel( tr("Line %1, Column %2").arg(1).arg(1) );
-    statusbar->addPermanentWidget(textEditLineColumnInfoLabel);
-    connect( qSciSourceCodeEditor, SIGNAL(cursorPositionChanged(int, int)), this, SLOT(setStatusBarCursorPosInfo(int, int)) );
+    _textEditLineColumnInfoLabel = new QLabel( tr("Line %1, Column %2").arg(1).arg(1) );
+    _mainWindowForm->statusbar->addPermanentWidget(_textEditLineColumnInfoLabel);
+    connect( _qSciSourceCodeEditor, SIGNAL(cursorPositionChanged(int, int)), this, SLOT(setStatusBarCursorPosInfo(int, int)) );
 
     // Connect the text editor to dependent functions.
-    connect( qSciSourceCodeEditor, SIGNAL(textChanged()), this, SLOT(sourceCodeChangedHelperSlot()) );
-    connect( qSciSourceCodeEditor, SIGNAL(linesChanged()), this, SLOT(numberOfLinesChanged()) );
-    //connect( settings, SIGNAL(tabWidth(int)), qSciSourceCodeEditor, SLOT(setTabWidth(int)) );
-    settings->registerObjectSlot(qSciSourceCodeEditor, "setTabWidth(int)", "tabWidth");
-    qSciSourceCodeEditor->setTabWidth( settings->getValueByName("tabWidth").toInt() );
+    connect( _qSciSourceCodeEditor, SIGNAL(textChanged()), this, SLOT(sourceCodeChangedHelperSlot()) );
+    connect( _qSciSourceCodeEditor, SIGNAL(linesChanged()), this, SLOT(numberOfLinesChanged()) );
+    //connect( _settings, SIGNAL(tabWidth(int)), _qSciSourceCodeEditor, SLOT(setTabWidth(int)) );
+    _settings->registerObjectSlot(_qSciSourceCodeEditor, "setTabWidth(int)", "tabWidth");
+    _qSciSourceCodeEditor->setTabWidth( _settings->getValueByName("tabWidth").toInt() );
 }
 
 
 /*!
-    \brief Create and init the syntax highlighter and set it to use the QScintilla edit component.
+    \brief Create and init the syntax _highlighter and set it to use the QScintilla edit component.
  */
 void MainWindow::initSyntaxHighlighter() {
-    // Create the highlighter.
-    highlighter = new UiGuiHighlighter(qSciSourceCodeEditor);
+    // Create the _highlighter.
+    _highlighter = new UiGuiHighlighter(_qSciSourceCodeEditor);
 
     // Connect the syntax highlighting setting in the menu to the turnHighlightOnOff function.
-    connect( enableSyntaxHighlightingAction, SIGNAL(toggled(bool)), this, SLOT(turnHighlightOnOff(bool)) );
+    connect( _mainWindowForm->enableSyntaxHighlightingAction, SIGNAL(toggled(bool)), this, SLOT(turnHighlightOnOff(bool)) );
 
-    // Register the syntax highlighting setting in the menu to the settings object.
-    settings->registerObjectProperty(enableSyntaxHighlightingAction, "checked", "SyntaxHighlightingEnabled");
+    // Register the syntax highlighting setting in the menu to the _settings object.
+    _settings->registerObjectProperty(_mainWindowForm->enableSyntaxHighlightingAction, "checked", "SyntaxHighlightingEnabled");
 }
 
 
 /*!
     \brief Initializes the language of UniversalIndentGUI.
 
-    If the program language is defined in the settings, the corresponding language
+    If the program language is defined in the _settings, the corresponding language
     file will be loaded and set for the application. If not set there, the system
     default language will be set, if a translation file for that language exists.
     Returns true, if the translation file could be loaded. Otherwise it returns
@@ -265,8 +319,8 @@
 bool MainWindow::initApplicationLanguage() {
     QString languageShort;
 
-    // Get the language settings from the settings object.
-    int languageIndex = settings->getValueByName("language").toInt();
+    // Get the language _settings from the _settings object.
+    int languageIndex = _settings->getValueByName("language").toInt();
 
     // If no language was set, indicated by a negative index, use the system language.
     if ( languageIndex < 0 ) {
@@ -279,35 +333,35 @@
         }
 
         // If no translation file for the systems local language exist, fall back to English.
-        if ( settings->getAvailableTranslations().indexOf(languageShort) < 0 ) {
+        if ( _settings->getAvailableTranslations().indexOf(languageShort) < 0 ) {
             languageShort = "en";
         }
 
         // Set the language setting to the new language.
-        settings->setValueByName("language", settings->getAvailableTranslations().indexOf(languageShort) );
+        _settings->setValueByName("language", _settings->getAvailableTranslations().indexOf(languageShort) );
     }
-    // If a language was defined in the settings, get this language mnemonic.
+    // If a language was defined in the _settings, get this language mnemonic.
     else {
-        languageShort = settings->getAvailableTranslations().at(languageIndex);
+        languageShort = _settings->getAvailableTranslations().at(languageIndex);
     }
 
     // Load the Qt own translation file and set it for the application.
-    qTTranslator = new QTranslator();
+    _qTTranslator = new QTranslator();
     bool translationFileLoaded;
-    translationFileLoaded = qTTranslator->load( SettingsPaths::getGlobalFilesPath() + "/translations/qt_" + languageShort );
+    translationFileLoaded = _qTTranslator->load( SettingsPaths::getGlobalFilesPath() + "/translations/qt_" + languageShort );
     if ( translationFileLoaded ) {
-        qApp->installTranslator(qTTranslator);
+        qApp->installTranslator(_qTTranslator);
     }
 
     // Load the uigui translation file and set it for the application.
-    uiGuiTranslator = new QTranslator();
-    translationFileLoaded = uiGuiTranslator->load( SettingsPaths::getGlobalFilesPath() + "/translations/universalindent_" + languageShort );
+    _uiGuiTranslator = new QTranslator();
+    translationFileLoaded = _uiGuiTranslator->load( SettingsPaths::getGlobalFilesPath() + "/translations/universalindent_" + languageShort );
     if ( translationFileLoaded ) {
-        qApp->installTranslator(uiGuiTranslator);
+        qApp->installTranslator(_uiGuiTranslator);
     }
 
-    //connect( settings, SIGNAL(language(int)), this, SLOT(languageChanged(int)) );
-    settings->registerObjectSlot(this, "languageChanged(int)", "language");
+    //connect( _settings, SIGNAL(language(int)), this, SLOT(languageChanged(int)) );
+    _settings->registerObjectSlot(this, "languageChanged(int)", "language");
 
     return translationFileLoaded;
 }
@@ -318,24 +372,24 @@
  */
 void MainWindow::initIndenter() {
     // Get Id of last selected indenter.
-    currentIndenterID = settings->getValueByName("selectedIndenter").toInt();
+    _currentIndenterID = _settings->getValueByName("selectedIndenter").toInt();
 
     // Create the indenter widget with the ID and add it to the layout.
-    indentHandler = new IndentHandler(currentIndenterID, this, centralwidget);
-    vboxLayout->addWidget(indentHandler);
+    _indentHandler = new IndentHandler(_currentIndenterID, this, _mainWindowForm->centralwidget);
+    _mainWindowForm->vboxLayout->addWidget(_indentHandler);
 
-    // If settings for the indenter have changed, let the main window know aboud it.
-    connect(indentHandler, SIGNAL(indenterSettingsChanged()), this, SLOT(indentSettingsChangedSlot()));
+    // If _settings for the indenter have changed, let the main window know aboud it.
+    connect(_indentHandler, SIGNAL(indenterSettingsChanged()), this, SLOT(indentSettingsChangedSlot()));
 
     // Set this true, so the indenter is called at first program start
-    indentSettingsChanged = true;
-    previewToggled = true;
+    _indentSettingsChanged = true;
+    _previewToggled = true;
 
     // Handle if indenter parameter tool tips are enabled
-    settings->registerObjectProperty(indenterParameterTooltipsEnabledAction, "checked", "indenterParameterTooltipsEnabled");
+    _settings->registerObjectProperty(_mainWindowForm->indenterParameterTooltipsEnabledAction, "checked", "indenterParameterTooltipsEnabled");
 
     // Add the indenters context menu to the mainwindows menu.
-    menuIndenter->addActions( indentHandler->getIndenterMenuActions() );
+    _mainWindowForm->menuIndenter->addActions( _indentHandler->getIndenterMenuActions() );
 }
 
 
@@ -354,15 +408,15 @@
     else {
         QTextStream inSrcStrm(&inSrcFile);
         QApplication::setOverrideCursor(Qt::WaitCursor);
-        inSrcStrm.setCodec( QTextCodec::codecForName(currentEncoding.toAscii()) );
+        inSrcStrm.setCodec( QTextCodec::codecForName(_currentEncoding.toAscii()) );
         fileContent = inSrcStrm.readAll();
         QApplication::restoreOverrideCursor();
         inSrcFile.close();
 
         QFileInfo fileInfo(filePath);
-        currentSourceFileExtension = fileInfo.suffix();
-        int indexOfHighlighter = highlighter->setLexerForExtension( currentSourceFileExtension );
-        highlighterActionGroup->actions().at(indexOfHighlighter)->setChecked(true);
+        _currentSourceFileExtension = fileInfo.suffix();
+        int indexOfHighlighter = _highlighter->setLexerForExtension( _currentSourceFileExtension );
+        _highlighterActionGroup->actions().at(indexOfHighlighter)->setChecked(true);
     }
     return fileContent;
 }
@@ -380,34 +434,34 @@
         return;
     }
     QString openedSourceFileContent = "";
-    QString fileExtensions = tr("Supported by indenter")+" ("+indentHandler->getPossibleIndenterFileExtensions()+
+    QString fileExtensions = tr("Supported by indenter")+" ("+_indentHandler->getPossibleIndenterFileExtensions()+
         ");;"+tr("All files")+" (*.*)";
 
     //QString openedSourceFileContent = openFileDialog( tr("Choose source code file"), "./", fileExtensions );
     if ( fileName.isEmpty() ) {
-        fileName = QFileDialog::getOpenFileName( this, tr("Choose source code file"), currentSourceFile, fileExtensions);
+        fileName = QFileDialog::getOpenFileName( this, tr("Choose source code file"), _currentSourceFile, fileExtensions);
     }
 
     if (fileName != "") {
-        currentSourceFile = fileName;
+        _currentSourceFile = fileName;
         QFileInfo fileInfo(fileName);
-        currentSourceFileExtension = fileInfo.suffix();
+        _currentSourceFileExtension = fileInfo.suffix();
 
         openedSourceFileContent = loadFile(fileName);
-        sourceFileContent = openedSourceFileContent;
-        if ( toolBarWidget->cbLivePreview->isChecked() ) {
+        _sourceFileContent = openedSourceFileContent;
+        if ( _toolBarWidget->cbLivePreview->isChecked() ) {
             callIndenter();
         }
-        sourceCodeChanged = true;
-        previewToggled = true;
+        _sourceCodeChanged = true;
+        _previewToggled = true;
         updateSourceView();
         updateWindowTitle();
         updateRecentlyOpenedList();
-        textEditLastScrollPos = 0;
-        textEditVScrollBar->setValue( textEditLastScrollPos );
+        _textEditLastScrollPos = 0;
+        _textEditVScrollBar->setValue( _textEditLastScrollPos );
 
-        savedSourceContent = openedSourceFileContent;
-        qSciSourceCodeEditor->setModified( false );
+        _savedSourceContent = openedSourceFileContent;
+        _qSciSourceCodeEditor->setModified( false );
         setWindowModified( false );
     }
 }
@@ -420,20 +474,20 @@
  */
 bool MainWindow::saveasSourceFileDialog(QAction *chosenEncodingAction) {
     QString encoding;
-    QString fileExtensions = tr("Supported by indenter")+" ("+indentHandler->getPossibleIndenterFileExtensions()+
+    QString fileExtensions = tr("Supported by indenter")+" ("+_indentHandler->getPossibleIndenterFileExtensions()+
         ");;"+tr("All files")+" (*.*)";
 
     //QString openedSourceFileContent = openFileDialog( tr("Choose source code file"), "./", fileExtensions );
-    QString fileName = QFileDialog::getSaveFileName( this, tr("Save source code file"), currentSourceFile, fileExtensions);
+    QString fileName = QFileDialog::getSaveFileName( this, tr("Save source code file"), _currentSourceFile, fileExtensions);
 
     // Saving has been canceled if the filename is empty
     if ( fileName.isEmpty() ) {
         return false;
     }
 
-    savedSourceContent = qSciSourceCodeEditor->text();
+    _savedSourceContent = _qSciSourceCodeEditor->text();
 
-    currentSourceFile = fileName;
+    _currentSourceFile = fileName;
     QFile::remove(fileName);
     QFile outSrcFile(fileName);
     outSrcFile.open( QFile::ReadWrite | QFile::Text );
@@ -443,17 +497,17 @@
         encoding = chosenEncodingAction->text();
     }
     else {
-        encoding = encodingActionGroup->checkedAction()->text();
+        encoding = _encodingActionGroup->checkedAction()->text();
     }
     QTextStream outSrcStrm(&outSrcFile);
     outSrcStrm.setCodec( QTextCodec::codecForName(encoding.toAscii()) );
-    outSrcStrm << savedSourceContent;
+    outSrcStrm << _savedSourceContent;
     outSrcFile.close();
 
     QFileInfo fileInfo(fileName);
-    currentSourceFileExtension = fileInfo.suffix();
+    _currentSourceFileExtension = fileInfo.suffix();
 
-    qSciSourceCodeEditor->setModified( false );
+    _qSciSourceCodeEditor->setModified( false );
     setWindowModified( false );
 
     updateWindowTitle();
@@ -468,23 +522,23 @@
     the save as file dialog will be shown.
  */
 bool MainWindow::saveSourceFile() {
-    if ( currentSourceFile.isEmpty() ) {
+    if ( _currentSourceFile.isEmpty() ) {
         return saveasSourceFileDialog();
     }
     else {
-        QFile::remove(currentSourceFile);
-        QFile outSrcFile(currentSourceFile);
-        savedSourceContent = qSciSourceCodeEditor->text();
+        QFile::remove(_currentSourceFile);
+        QFile outSrcFile(_currentSourceFile);
+        _savedSourceContent = _qSciSourceCodeEditor->text();
         outSrcFile.open( QFile::ReadWrite | QFile::Text );
 
         // Get current encoding.
-        QString currentEncoding = encodingActionGroup->checkedAction()->text();
+        QString _currentEncoding = _encodingActionGroup->checkedAction()->text();
         QTextStream outSrcStrm(&outSrcFile);
-        outSrcStrm.setCodec( QTextCodec::codecForName(currentEncoding.toAscii()) );
-        outSrcStrm << savedSourceContent;
+        outSrcStrm.setCodec( QTextCodec::codecForName(_currentEncoding.toAscii()) );
+        outSrcStrm << _savedSourceContent;
         outSrcFile.close();
 
-        qSciSourceCodeEditor->setModified( false );
+        _qSciSourceCodeEditor->setModified( false );
         setWindowModified( false );
     }
     return true;
@@ -518,25 +572,25 @@
     at the same line number.
  */
 void MainWindow::updateSourceView() {
-    textEditLastScrollPos = textEditVScrollBar->value();
+    _textEditLastScrollPos = _textEditVScrollBar->value();
 
-    if ( toolBarWidget->cbLivePreview->isChecked() ) {
-        sourceViewContent = sourceFormattedContent;
+    if ( _toolBarWidget->cbLivePreview->isChecked() ) {
+        _sourceViewContent = _sourceFormattedContent;
     }
     else {
-        sourceViewContent = sourceFileContent;
+        _sourceViewContent = _sourceFileContent;
     }
 
-    if (previewToggled) {
-        disconnect( qSciSourceCodeEditor, SIGNAL(textChanged ()), this, SLOT(sourceCodeChangedHelperSlot()) );
+    if (_previewToggled) {
+        disconnect( _qSciSourceCodeEditor, SIGNAL(textChanged ()), this, SLOT(sourceCodeChangedHelperSlot()) );
         bool textIsModified = isWindowModified();
-        qSciSourceCodeEditor->setText(sourceViewContent);
+        _qSciSourceCodeEditor->setText(_sourceViewContent);
         setWindowModified(textIsModified);
-        previewToggled = false;
-        connect( qSciSourceCodeEditor, SIGNAL(textChanged ()), this, SLOT(sourceCodeChangedHelperSlot()) );
+        _previewToggled = false;
+        connect( _qSciSourceCodeEditor, SIGNAL(textChanged ()), this, SLOT(sourceCodeChangedHelperSlot()) );
     }
 
-    textEditVScrollBar->setValue( textEditLastScrollPos );
+    _textEditVScrollBar->setValue( _textEditLastScrollPos );
 }
 
 
@@ -547,7 +601,7 @@
  */
 void MainWindow::callIndenter() {
     QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
-    sourceFormattedContent = indentHandler->callIndenter(sourceFileContent, currentSourceFileExtension);
+    _sourceFormattedContent = _indentHandler->callIndenter(_sourceFileContent, _currentSourceFileExtension);
     //updateSourceView();
     QApplication::restoreOverrideCursor();
 }
@@ -558,12 +612,12 @@
  */
 void MainWindow::turnHighlightOnOff(bool turnOn) {
     if ( turnOn ) {
-        highlighter->turnHighlightOn();
+        _highlighter->turnHighlightOn();
     }
     else {
-        highlighter->turnHighlightOff();
+        _highlighter->turnHighlightOff();
     }
-    previewToggled = true;
+    _previewToggled = true;
     updateSourceView();
 }
 
@@ -585,46 +639,46 @@
     int cursorPos, cursorPosAbsolut, cursorLine;
     QString text;
 
-    sourceCodeChanged = true;
-    if ( scrollPositionChanged ) {
-        scrollPositionChanged = false;
+    _sourceCodeChanged = true;
+    if ( _scrollPositionChanged ) {
+        _scrollPositionChanged = false;
     }
 
     // Get the content text of the text editor.
-    sourceFileContent = qSciSourceCodeEditor->text();
+    _sourceFileContent = _qSciSourceCodeEditor->text();
 
     // Get the position of the cursor in the unindented text.
-    if ( sourceFileContent.isEmpty() ) {
+    if ( _sourceFileContent.isEmpty() ) {
         // Add this line feed, because AStyle has problems with a totally emtpy file.
-        sourceFileContent += "\n";
+        _sourceFileContent += "\n";
         cursorPosAbsolut = 0;
         cursorPos = 0;
         cursorLine = 0;
-        enteredCharacter = sourceFileContent.at(cursorPosAbsolut);
+        enteredCharacter = _sourceFileContent.at(cursorPosAbsolut);
     }
     else {
-        qSciSourceCodeEditor->getCursorPosition(&cursorLine, &cursorPos);
-        cursorPosAbsolut = qSciSourceCodeEditor->SendScintilla(QsciScintillaBase::SCI_GETCURRENTPOS);
-        text = qSciSourceCodeEditor->text(cursorLine);
+        _qSciSourceCodeEditor->getCursorPosition(&cursorLine, &cursorPos);
+        cursorPosAbsolut = _qSciSourceCodeEditor->SendScintilla(QsciScintillaBase::SCI_GETCURRENTPOS);
+        text = _qSciSourceCodeEditor->text(cursorLine);
         if ( cursorPosAbsolut > 0 ) {
             cursorPosAbsolut--;
         }
         if ( cursorPos > 0 ) {
             cursorPos--;
         }
-        enteredCharacter = sourceFileContent.at(cursorPosAbsolut);
+        enteredCharacter = _sourceFileContent.at(cursorPosAbsolut);
     }
 
     // Call the indenter to reformat the text.
-    if ( toolBarWidget->cbLivePreview->isChecked() ) {
+    if ( _toolBarWidget->cbLivePreview->isChecked() ) {
         callIndenter();
-        previewToggled = true;
+        _previewToggled = true;
     }
 
     // Update the text editor.
     updateSourceView();
 
-    if ( toolBarWidget->cbLivePreview->isChecked() && !enteredCharacter.isNull() && enteredCharacter != 10 ) {
+    if ( _toolBarWidget->cbLivePreview->isChecked() && !enteredCharacter.isNull() && enteredCharacter != 10 ) {
         //const char ch = enteredCharacter.toAscii();
 
         int saveCursorLine = cursorLine;
@@ -633,8 +687,8 @@
         bool charFound = false;
 
         // Search forward
-        for ( cursorLine = saveCursorLine; cursorLine-saveCursorLine < 6 && cursorLine < qSciSourceCodeEditor->lines(); cursorLine++ ) {
-            text = qSciSourceCodeEditor->text(cursorLine);
+        for ( cursorLine = saveCursorLine; cursorLine-saveCursorLine < 6 && cursorLine < _qSciSourceCodeEditor->lines(); cursorLine++ ) {
+            text = _qSciSourceCodeEditor->text(cursorLine);
             while ( cursorPos < text.count() && enteredCharacter != text.at(cursorPos)) {
                 cursorPos++;
             }
@@ -649,19 +703,19 @@
 
         // If foward search did not find the character, search backward
         if ( !charFound ) {
-            text = qSciSourceCodeEditor->text(saveCursorLine);
+            text = _qSciSourceCodeEditor->text(saveCursorLine);
             cursorPos = saveCursorPos;
             if ( cursorPos >= text.count() ) {
                 cursorPos = text.count() - 1;
             }
 
             for ( cursorLine = saveCursorLine; saveCursorLine-cursorLine < 6 && cursorLine >= 0; cursorLine-- ) {
-                text = qSciSourceCodeEditor->text(cursorLine);
+                text = _qSciSourceCodeEditor->text(cursorLine);
                 while ( cursorPos >= 0 && enteredCharacter != text.at(cursorPos)) {
                     cursorPos--;
                 }
                 if ( cursorPos < 0 ) {
-                    cursorPos = qSciSourceCodeEditor->lineLength(cursorLine-1) - 1;
+                    cursorPos = _qSciSourceCodeEditor->lineLength(cursorLine-1) - 1;
                 }
                 else {
                     charFound = true;
@@ -672,77 +726,77 @@
 
         // If the character was found set its new cursor position...
         if ( charFound ) {
-            qSciSourceCodeEditor->setCursorPosition( cursorLine, cursorPos+1 );
+            _qSciSourceCodeEditor->setCursorPosition( cursorLine, cursorPos+1 );
         }
         // ...if it was not found, set the previous cursor position.
         else {
-            qSciSourceCodeEditor->setCursorPosition( saveCursorLine, saveCursorPos+1 );
+            _qSciSourceCodeEditor->setCursorPosition( saveCursorLine, saveCursorPos+1 );
         }
     }
     // set the previous cursor position.
     else if ( enteredCharacter == 10 ) {
-        qSciSourceCodeEditor->setCursorPosition( cursorLine, cursorPos );
+        _qSciSourceCodeEditor->setCursorPosition( cursorLine, cursorPos );
     }
 
 
-    if ( toolBarWidget->cbLivePreview->isChecked() ) {
-        sourceCodeChanged = false;
+    if ( _toolBarWidget->cbLivePreview->isChecked() ) {
+        _sourceCodeChanged = false;
     }
 
-    if ( savedSourceContent == qSciSourceCodeEditor->text() ) {
-        qSciSourceCodeEditor->setModified( false );
+    if ( _savedSourceContent == _qSciSourceCodeEditor->text() ) {
+        _qSciSourceCodeEditor->setModified( false );
         setWindowModified( false );
     }
     else {
-        qSciSourceCodeEditor->setModified( true ); // Has no effect according to QScintilla docs.
+        _qSciSourceCodeEditor->setModified( true ); // Has no effect according to QScintilla docs.
         setWindowModified( true );
     }
 
     // Could set cursor this way and use normal linear search in text instead of columns and rows.
-    //qSciSourceCodeEditor->SendScintilla(QsciScintillaBase::SCI_SETCURRENTPOS, 50);
-    //qSciSourceCodeEditor->SendScintilla(QsciScintillaBase::SCI_SETANCHOR, 50);
+    //_qSciSourceCodeEditor->SendScintilla(QsciScintillaBase::SCI_SETCURRENTPOS, 50);
+    //_qSciSourceCodeEditor->SendScintilla(QsciScintillaBase::SCI_SETANCHOR, 50);
 }
 
 
 /*!
-    \brief This slot is called whenever one of the indenter settings are changed.
+    \brief This slot is called whenever one of the indenter _settings are changed.
 
     It calls the selected indenter if the preview is turned on. If preview
-    is not active a flag is set, that the settings have changed.
+    is not active a flag is set, that the _settings have changed.
  */
 void MainWindow::indentSettingsChangedSlot() {
-    indentSettingsChanged = true;
+    _indentSettingsChanged = true;
 
     int cursorLine, cursorPos;
-    qSciSourceCodeEditor->getCursorPosition(&cursorLine, &cursorPos);
+    _qSciSourceCodeEditor->getCursorPosition(&cursorLine, &cursorPos);
 
-    if ( toolBarWidget->cbLivePreview->isChecked() ) {
+    if ( _toolBarWidget->cbLivePreview->isChecked() ) {
         callIndenter();
-        previewToggled = true;
+        _previewToggled = true;
 
         updateSourceView();
-        if (sourceCodeChanged) {
-/*            savedCursor = qSciSourceCodeEditor->textCursor();
-            if ( cursorPos >= qSciSourceCodeEditor->text().count() ) {
-                cursorPos = qSciSourceCodeEditor->text().count() - 1;
+        if (_sourceCodeChanged) {
+/*            savedCursor = _qSciSourceCodeEditor->textCursor();
+            if ( cursorPos >= _qSciSourceCodeEditor->text().count() ) {
+                cursorPos = _qSciSourceCodeEditor->text().count() - 1;
             }
             savedCursor.setPosition( cursorPos );
-            qSciSourceCodeEditor->setTextCursor( savedCursor );
+            _qSciSourceCodeEditor->setTextCursor( savedCursor );
 */
-            sourceCodeChanged = false;
+            _sourceCodeChanged = false;
         }
-        indentSettingsChanged = false;
+        _indentSettingsChanged = false;
     }
     else {
         updateSourceView();
     }
 
-    if ( savedSourceContent == qSciSourceCodeEditor->text() ) {
-        qSciSourceCodeEditor->setModified( false );
+    if ( _savedSourceContent == _qSciSourceCodeEditor->text() ) {
+        _qSciSourceCodeEditor->setModified( false );
         setWindowModified( false );
     }
     else {
-        qSciSourceCodeEditor->setModified( true ); // Has no effect according to QScintilla docs.
+        _qSciSourceCodeEditor->setModified( true ); // Has no effect according to QScintilla docs.
         setWindowModified( true );
     }
 }
@@ -755,33 +809,33 @@
     the code has been changed since the last indenter call.
  */
 void MainWindow::previewTurnedOnOff(bool turnOn) {
-    previewToggled = true;
+    _previewToggled = true;
 
     int cursorLine, cursorPos;
-    qSciSourceCodeEditor->getCursorPosition(&cursorLine, &cursorPos);
+    _qSciSourceCodeEditor->getCursorPosition(&cursorLine, &cursorPos);
 
-    if ( turnOn && (indentSettingsChanged || sourceCodeChanged) ) {
+    if ( turnOn && (_indentSettingsChanged || _sourceCodeChanged) ) {
         callIndenter();
     }
     updateSourceView();
-    if (sourceCodeChanged) {
-/*        savedCursor = qSciSourceCodeEditor->textCursor();
-        if ( cursorPos >= qSciSourceCodeEditor->text().count() ) {
-            cursorPos = qSciSourceCodeEditor->text().count() - 1;
+    if (_sourceCodeChanged) {
+/*        savedCursor = _qSciSourceCodeEditor->textCursor();
+        if ( cursorPos >= _qSciSourceCodeEditor->text().count() ) {
+            cursorPos = _qSciSourceCodeEditor->text().count() - 1;
         }
         savedCursor.setPosition( cursorPos );
-        qSciSourceCodeEditor->setTextCursor( savedCursor );
+        _qSciSourceCodeEditor->setTextCursor( savedCursor );
 */
-        sourceCodeChanged = false;
+        _sourceCodeChanged = false;
     }
-    indentSettingsChanged = false;
+    _indentSettingsChanged = false;
 
-    if ( savedSourceContent == qSciSourceCodeEditor->text() ) {
-        qSciSourceCodeEditor->setModified( false );
+    if ( _savedSourceContent == _qSciSourceCodeEditor->text() ) {
+        _qSciSourceCodeEditor->setModified( false );
         setWindowModified( false );
     }
     else {
-        qSciSourceCodeEditor->setModified( true );
+        _qSciSourceCodeEditor->setModified( true );
         setWindowModified( true );
     }
 }
@@ -792,7 +846,7 @@
     source code filename.
  */
 void MainWindow::updateWindowTitle() {
-    this->setWindowTitle( "UniversalIndentGUI " + QString(PROGRAM_VERSION_STRING) + " [*]" + currentSourceFile );
+    this->setWindowTitle( "UniversalIndentGUI " + QString(PROGRAM_VERSION_STRING) + " [*]" + _currentSourceFile );
 }
 
 
@@ -802,7 +856,7 @@
 void MainWindow::exportToPDF() {
     QString fileExtensions = tr("PDF Document")+" (*.pdf)";
 
-    QString fileName = currentSourceFile;
+    QString fileName = _currentSourceFile;
     QFileInfo fileInfo(fileName);
     QString fileExtension = fileInfo.suffix();
 
@@ -813,7 +867,7 @@
         QsciPrinter printer(QPrinter::HighResolution);
         printer.setOutputFormat(QPrinter::PdfFormat);
         printer.setOutputFileName(fileName);
-        printer.printRange(qSciSourceCodeEditor);
+        printer.printRange(_qSciSourceCodeEditor);
     }
 }
 
@@ -824,7 +878,7 @@
 void MainWindow::exportToHTML() {
     QString fileExtensions = tr("HTML Document")+" (*.html)";
 
-    QString fileName = currentSourceFile;
+    QString fileName = _currentSourceFile;
     QFileInfo fileInfo(fileName);
     QString fileExtension = fileInfo.suffix();
 
@@ -833,7 +887,7 @@
 
     if ( !fileName.isEmpty() ) {
         // Create a document from which HTML code can be generated.
-        QTextDocument sourceCodeDocument( qSciSourceCodeEditor->text() );
+        QTextDocument sourceCodeDocument( _qSciSourceCodeEditor->text() );
         sourceCodeDocument.setDefaultFont( QFont("Courier", 12, QFont::Normal) );
         QString sourceCodeAsHTML = sourceCodeDocument.toHtml();
         // To ensure that empty lines are kept in the HTML code make this replacement.
@@ -850,7 +904,7 @@
 
 
 /*!
-    \brief Loads the last opened file if this option is enabled in the settings.
+    \brief Loads the last opened file if this option is enabled in the _settings.
 
     If the file does not exist, the default example file is tried to be loaded. If even that
     fails a very small code example is shown.
@@ -858,39 +912,39 @@
 */
 void MainWindow::loadLastOpenedFile() {
     // Get setting for last opened source code file.
-    loadLastSourceCodeFileOnStartup = settings->getValueByName("loadLastSourceCodeFileOnStartup").toBool();
+    _loadLastSourceCodeFileOnStartup = _settings->getValueByName("loadLastSourceCodeFileOnStartup").toBool();
 
     // Only load last source code file if set to do so
-    if ( loadLastSourceCodeFileOnStartup ) {
+    if ( _loadLastSourceCodeFileOnStartup ) {
         // From the list of last opened files get the first one.
-        currentSourceFile = settings->getValueByName("lastSourceCodeFile").toString().split("|").first();
+        _currentSourceFile = _settings->getValueByName("lastSourceCodeFile").toString().split("|").first();
 
         // If source file exist load it.
-        if ( QFile::exists(currentSourceFile) ) {
-            QFileInfo fileInfo(currentSourceFile);
-            currentSourceFile = fileInfo.absoluteFilePath();
-            sourceFileContent = loadFile(currentSourceFile);
+        if ( QFile::exists(_currentSourceFile) ) {
+            QFileInfo fileInfo(_currentSourceFile);
+            _currentSourceFile = fileInfo.absoluteFilePath();
+            _sourceFileContent = loadFile(_currentSourceFile);
         }
         // If the last opened source code file does not exist, try to load the default example.cpp file.
         else if ( QFile::exists( SettingsPaths::getIndenterPath() + "/example.cpp" ) ) {
             QFileInfo fileInfo( SettingsPaths::getIndenterPath() + "/example.cpp" );
-            currentSourceFile = fileInfo.absoluteFilePath();
-            sourceFileContent = loadFile(currentSourceFile);
+            _currentSourceFile = fileInfo.absoluteFilePath();
+            _sourceFileContent = loadFile(_currentSourceFile);
         }
         // If neither the example source code file exists show some small code example.
         else {
-            currentSourceFile = "untitled.cpp";
-            currentSourceFileExtension = "cpp";
-            sourceFileContent = "if(x==\"y\"){x=z;}";
+            _currentSourceFile = "untitled.cpp";
+            _currentSourceFileExtension = "cpp";
+            _sourceFileContent = "if(x==\"y\"){x=z;}";
         }
     }
-    // if last opened source file should not be loaded make some default settings.
+    // if last opened source file should not be loaded make some default _settings.
     else {
-        currentSourceFile = "untitled.cpp";
-        currentSourceFileExtension = "cpp";
-        sourceFileContent = "";
+        _currentSourceFile = "untitled.cpp";
+        _currentSourceFileExtension = "cpp";
+        _sourceFileContent = "";
     }
-    savedSourceContent = sourceFileContent;
+    _savedSourceContent = _sourceFileContent;
 
     // Update the mainwindow title to show the name of the loaded source code file.
     updateWindowTitle();
@@ -898,22 +952,22 @@
 
 
 /*!
-    \brief Saves the settings for the main application to the file "UniversalIndentGUI.ini".
+    \brief Saves the _settings for the main application to the file "UniversalIndentGUI.ini".
 
     Settings are for example last selected indenter, last loaded config file and so on.
 */
 void MainWindow::saveSettings() {
-    settings->setValueByName( "encoding", currentEncoding );
-    settings->setValueByName( "version", PROGRAM_VERSION_STRING );
-    settings->setValueByName( "maximized", isMaximized() );
+    _settings->setValueByName( "encoding", _currentEncoding );
+    _settings->setValueByName( "version", PROGRAM_VERSION_STRING );
+    _settings->setValueByName( "maximized", isMaximized() );
     if ( !isMaximized() ) {
-        settings->setValueByName( "position", pos() );
-        settings->setValueByName( "size", size() );
+        _settings->setValueByName( "position", pos() );
+        _settings->setValueByName( "size", size() );
     }
-    settings->setValueByName( "MainWindowState", saveState() );
+    _settings->setValueByName( "MainWindowState", saveState() );
 
     // Also save the syntax highlight style for all lexers.
-    highlighter->writeCurrentSettings("");
+    _highlighter->writeCurrentSettings("");
 }
 
 
@@ -934,13 +988,13 @@
 /*!
     \brief This function is setup to capture tooltip events.
 
-    All widgets that are created by the indentHandler object and are responsible
+    All widgets that are created by the _indentHandler object and are responsible
     for indenter parameters are connected with this event filter.
-    So depending on the settings the tooltips can be enabled and disabled for these widgets.
+    So depending on the _settings the tooltips can be enabled and disabled for these widgets.
  */
 bool MainWindow::eventFilter(QObject *obj, QEvent *event) {
     if ( event->type() == QEvent::ToolTip) {
-        if ( indenterParameterTooltipsEnabledAction->isChecked() ) {
+        if ( _mainWindowForm->indenterParameterTooltipsEnabledAction->isChecked() ) {
             return QMainWindow::eventFilter(obj, event);
         }
         else {
@@ -981,27 +1035,27 @@
     corresponding action in the languageInfoList and sets the language.
  */
 void MainWindow::languageChanged(int languageIndex) {
-    if ( languageIndex < settings->getAvailableTranslations().size() ) {
+    if ( languageIndex < _settings->getAvailableTranslations().size() ) {
         // Get the mnemonic of the new selected language.
-        QString languageShort = settings->getAvailableTranslations().at(languageIndex);
+        QString languageShort = _settings->getAvailableTranslations().at(languageIndex);
 
         // Remove the old qt translation.
-        qApp->removeTranslator( qTTranslator );
+        qApp->removeTranslator( _qTTranslator );
 
         // Remove the old uigui translation.
-        qApp->removeTranslator( uiGuiTranslator );
+        qApp->removeTranslator( _uiGuiTranslator );
 
         // Load the Qt own translation file and set it for the application.
         bool translationFileLoaded;
-        translationFileLoaded = qTTranslator->load( SettingsPaths::getGlobalFilesPath() + "/translations/qt_" + languageShort );
+        translationFileLoaded = _qTTranslator->load( SettingsPaths::getGlobalFilesPath() + "/translations/qt_" + languageShort );
         if ( translationFileLoaded ) {
-            qApp->installTranslator(qTTranslator);
+            qApp->installTranslator(_qTTranslator);
         }
 
         // Load the uigui translation file and set it for the application.
-        translationFileLoaded = uiGuiTranslator->load( SettingsPaths::getGlobalFilesPath() + "/translations/universalindent_" + languageShort );
+        translationFileLoaded = _uiGuiTranslator->load( SettingsPaths::getGlobalFilesPath() + "/translations/universalindent_" + languageShort );
         if ( translationFileLoaded ) {
-            qApp->installTranslator(uiGuiTranslator);
+            qApp->installTranslator(_uiGuiTranslator);
         }
     }
 }
@@ -1014,35 +1068,35 @@
     QAction *encodingAction;
     QString encodingName;
 
-    encodingsList = QStringList() << "UTF-8" << "UTF-16" << "UTF-16BE" << "UTF-16LE"
+    _encodingsList = QStringList() << "UTF-8" << "UTF-16" << "UTF-16BE" << "UTF-16LE"
         << "Apple Roman" << "Big5" << "Big5-HKSCS" << "EUC-JP" << "EUC-KR" << "GB18030-0"
         << "IBM 850" << "IBM 866" << "IBM 874" << "ISO 2022-JP" << "ISO 8859-1" << "ISO 8859-13"
         << "Iscii-Bng" << "JIS X 0201" << "JIS X 0208" << "KOI8-R" << "KOI8-U" << "MuleLao-1"
         << "ROMAN8" << "Shift-JIS" << "TIS-620" << "TSCII" << "Windows-1250" << "WINSAMI2";
 
-    encodingActionGroup = new QActionGroup(this);
-    saveEncodedActionGroup = new QActionGroup(this);
+    _encodingActionGroup = new QActionGroup(this);
+    _saveEncodedActionGroup = new QActionGroup(this);
 
     // Loop for each available encoding
-    foreach ( encodingName, encodingsList ) {
+    foreach ( encodingName, _encodingsList ) {
         // Create actions for the "reopen" menu
-        encodingAction = new QAction(encodingName, encodingActionGroup);
+        encodingAction = new QAction(encodingName, _encodingActionGroup);
         encodingAction->setStatusTip( tr("Reopen the currently opened source code file by using the text encoding scheme ") + encodingName );
         encodingAction->setCheckable(true);
-        if ( encodingName == currentEncoding ) {
+        if ( encodingName == _currentEncoding ) {
             encodingAction->setChecked(true);
         }
 
         // Create actions for the "save as encoded" menu
-        encodingAction = new QAction(encodingName, saveEncodedActionGroup);
+        encodingAction = new QAction(encodingName, _saveEncodedActionGroup);
         encodingAction->setStatusTip( tr("Save the currently opened source code file by using the text encoding scheme ") + encodingName );
     }
 
-    encodingMenu->addActions( encodingActionGroup->actions() );
-    connect( encodingActionGroup, SIGNAL(triggered(QAction*)), this, SLOT(encodingChanged(QAction*)) );
+    _mainWindowForm->encodingMenu->addActions( _encodingActionGroup->actions() );
+    connect( _encodingActionGroup, SIGNAL(triggered(QAction*)), this, SLOT(encodingChanged(QAction*)) );
 
-    saveEncodedMenu->addActions( saveEncodedActionGroup->actions() );
-    connect( saveEncodedActionGroup, SIGNAL(triggered(QAction*)), this, SLOT(saveAsOtherEncoding(QAction*)) );
+    _mainWindowForm->saveEncodedMenu->addActions( _saveEncodedActionGroup->actions() );
+    connect( _saveEncodedActionGroup, SIGNAL(triggered(QAction*)), this, SLOT(saveAsOtherEncoding(QAction*)) );
 }
 
 
@@ -1057,7 +1111,7 @@
 
     // If the file was save with another encoding, change the selected encoding in the reopen menu.
     if ( fileWasSaved ) {
-        foreach ( QAction *action, encodingActionGroup->actions() ) {
+        foreach ( QAction *action, _encodingActionGroup->actions() ) {
             if ( action->text() == chosenEncodingAction->text() ) {
                 action->setChecked(true);
                 return;
@@ -1072,23 +1126,23 @@
 */
 void MainWindow::encodingChanged(QAction* encodingAction) {
     if ( maybeSave() ) {
-        QFile inSrcFile(currentSourceFile);
+        QFile inSrcFile(_currentSourceFile);
         QString fileContent = "";
 
         if ( !inSrcFile.open(QFile::ReadOnly | QFile::Text) ) {
-            QMessageBox::warning(NULL, tr("Error opening file"), tr("Cannot read the file ")+"\""+currentSourceFile+"\"." );
+            QMessageBox::warning(NULL, tr("Error opening file"), tr("Cannot read the file ")+"\""+_currentSourceFile+"\"." );
         }
         else {
             QTextStream inSrcStrm(&inSrcFile);
             QApplication::setOverrideCursor(Qt::WaitCursor);
             QString encodingName = encodingAction->text();
-            currentEncoding = encodingName;
+            _currentEncoding = encodingName;
             inSrcStrm.setCodec( QTextCodec::codecForName(encodingName.toAscii()) );
             fileContent = inSrcStrm.readAll();
             QApplication::restoreOverrideCursor();
             inSrcFile.close();
-            qSciSourceCodeEditor->setText( fileContent );
-            qSciSourceCodeEditor->setModified(false);
+            _qSciSourceCodeEditor->setText( fileContent );
+            _qSciSourceCodeEditor->setModified(false);
         }
     }
 }
@@ -1101,18 +1155,18 @@
     QAction *highlighterAction;
     QString highlighterName;
 
-    highlighterActionGroup = new QActionGroup(this);
+    _highlighterActionGroup = new QActionGroup(this);
 
     // Loop for each known highlighter
-    foreach ( highlighterName, highlighter->getAvailableHighlighters() ) {
-        highlighterAction = new QAction(highlighterName, highlighterActionGroup);
+    foreach ( highlighterName, _highlighter->getAvailableHighlighters() ) {
+        highlighterAction = new QAction(highlighterName, _highlighterActionGroup);
         highlighterAction->setStatusTip( tr("Set the syntax highlightning to ") + highlighterName );
         highlighterAction->setCheckable(true);
     }
-    highlighterMenu->addActions( highlighterActionGroup->actions() );
-    menuSettings->insertMenu(indenterParameterTooltipsEnabledAction, highlighterMenu );
+    _mainWindowForm->highlighterMenu->addActions( _highlighterActionGroup->actions() );
+    _mainWindowForm->menuSettings->insertMenu(_mainWindowForm->indenterParameterTooltipsEnabledAction, _mainWindowForm->highlighterMenu );
 
-    connect( highlighterActionGroup, SIGNAL(triggered(QAction*)), highlighter, SLOT(setHighlighterByAction(QAction*)) );
+    connect( _highlighterActionGroup, SIGNAL(triggered(QAction*)), _highlighter, SLOT(setHighlighterByAction(QAction*)) );
 }
 
 
@@ -1120,12 +1174,12 @@
     \brief Is called whenever the white space visibility is being changed in the menu.
  */
 void MainWindow::setWhiteSpaceVisibility(bool visible) {
-    if ( qSciSourceCodeEditor != NULL ) {
+    if ( _qSciSourceCodeEditor != NULL ) {
         if ( visible ) {
-            qSciSourceCodeEditor->setWhitespaceVisibility(QsciScintilla::WsVisible);
+            _qSciSourceCodeEditor->setWhitespaceVisibility(QsciScintilla::WsVisible);
         }
         else {
-            qSciSourceCodeEditor->setWhitespaceVisibility(QsciScintilla::WsInvisible);
+            _qSciSourceCodeEditor->setWhitespaceVisibility(QsciScintilla::WsInvisible);
         }
     }
 }
@@ -1136,8 +1190,8 @@
 */
 void MainWindow::numberOfLinesChanged() {
     QString lineNumbers;
-    lineNumbers.setNum( qSciSourceCodeEditor->lines()*10 );
-    qSciSourceCodeEditor->setMarginWidth(1, lineNumbers);
+    lineNumbers.setNum( _qSciSourceCodeEditor->lines()*10 );
+    _qSciSourceCodeEditor->setMarginWidth(1, lineNumbers);
 }
 
 
@@ -1151,31 +1205,31 @@
         QString languageName;
 
         // Translate the main window.
-        retranslateUi(this);
+        _mainWindowForm->retranslateUi(this);
         updateWindowTitle();
 
         // Translate the toolbar.
-        toolBarWidget->retranslateUi(toolBar);
+        _toolBarWidget->retranslateUi(_mainWindowForm->toolBar);
 
         // Translate the indent handler widget.
-        indentHandler->retranslateUi();
+        _indentHandler->retranslateUi();
 
         // Translate the load encoding menu.
-        QList<QAction *> encodingActionList = encodingActionGroup->actions();
+        QList<QAction *> encodingActionList = _encodingActionGroup->actions();
         for ( i = 0; i < encodingActionList.size(); i++ ) {
-            encodingActionList.at(i)->setStatusTip( tr("Reopen the currently opened source code file by using the text encoding scheme ") + encodingsList.at(i) );
+            encodingActionList.at(i)->setStatusTip( tr("Reopen the currently opened source code file by using the text encoding scheme ") + _encodingsList.at(i) );
         }
 
         // Translate the save encoding menu.
-        encodingActionList = saveEncodedActionGroup->actions();
+        encodingActionList = _saveEncodedActionGroup->actions();
         for ( i = 0; i < encodingActionList.size(); i++ ) {
-            encodingActionList.at(i)->setStatusTip( tr("Save the currently opened source code file by using the text encoding scheme ") + encodingsList.at(i) );
+            encodingActionList.at(i)->setStatusTip( tr("Save the currently opened source code file by using the text encoding scheme ") + _encodingsList.at(i) );
         }
 
-        // Translate the highlighter menu.
-        QList<QAction *> actionList = highlighterMenu->actions();
+        // Translate the _highlighter menu.
+        QList<QAction *> actionList = _mainWindowForm->highlighterMenu->actions();
         i = 0;
-        foreach ( QString highlighterName, highlighter->getAvailableHighlighters() ) {
+        foreach ( QString highlighterName, _highlighter->getAvailableHighlighters() ) {
             QAction *highlighterAction = actionList.at(i);
             highlighterAction->setStatusTip( tr("Set the syntax highlightning to ") + highlighterName );
             i++;
@@ -1183,7 +1237,7 @@
 
         // Translate the line and column indicators in the statusbar.
         int line, column;
-        qSciSourceCodeEditor->getCursorPosition( &line, &column );
+        _qSciSourceCodeEditor->getCursorPosition( &line, &column );
         setStatusBarCursorPosInfo( line, column );
     }
     else {
@@ -1197,18 +1251,18 @@
     \brief Updates the list of recently opened files.
 
     Therefore the currently open file is set at the lists first position
-    regarding the in the settings set maximum list length. Overheads of the
-    list will be cut off. The new list will be updated to the settings and
+    regarding the in the _settings set maximum list length. Overheads of the
+    list will be cut off. The new list will be updated to the _settings and
     the recently opened menu will be updated too.
  */
 void MainWindow::updateRecentlyOpenedList() {
     QString fileName;
     QString filePath;
-    QStringList recentlyOpenedList = settings->getValueByName("lastSourceCodeFile").toString().split("|");
-    QList<QAction*> recentlyOpenedActionList = menuRecently_Opened_Files->actions();
+    QStringList recentlyOpenedList = _settings->getValueByName("lastSourceCodeFile").toString().split("|");
+    QList<QAction*> recentlyOpenedActionList = _mainWindowForm->menuRecently_Opened_Files->actions();
 
     // Check if the currently open file is in the list of recently opened.
-    int indexOfCurrentFile = recentlyOpenedList.indexOf( currentSourceFile );
+    int indexOfCurrentFile = recentlyOpenedList.indexOf( _currentSourceFile );
 
     // If it is in the list of recently opened files and not at the first position, move it to the first pos.
     if ( indexOfCurrentFile > 0 ) {
@@ -1216,15 +1270,15 @@
         recentlyOpenedActionList.move(indexOfCurrentFile, 0);
     }
     // Put the current file at the first position if it not already is and is not empty.
-    else if ( indexOfCurrentFile == -1 && !currentSourceFile.isEmpty() ) {
-        recentlyOpenedList.insert(0, currentSourceFile);
-        QAction *recentlyOpenedAction = new QAction(QFileInfo(currentSourceFile).fileName(), menuRecently_Opened_Files);
-        recentlyOpenedAction->setStatusTip(currentSourceFile);
+    else if ( indexOfCurrentFile == -1 && !_currentSourceFile.isEmpty() ) {
+        recentlyOpenedList.insert(0, _currentSourceFile);
+        QAction *recentlyOpenedAction = new QAction(QFileInfo(_currentSourceFile).fileName(), _mainWindowForm->menuRecently_Opened_Files);
+        recentlyOpenedAction->setStatusTip(_currentSourceFile);
         recentlyOpenedActionList.insert(0, recentlyOpenedAction );
     }
 
     // Get the maximum recently opened list size.
-    int recentlyOpenedListMaxSize = settings->getValueByName("recentlyOpenedListSize").toInt();
+    int recentlyOpenedListMaxSize = _settings->getValueByName("recentlyOpenedListSize").toInt();
 
     // Loop for each filepath in the recently opened list, remove non existing files and
     // loop only as long as maximum allowed list entries are set.
@@ -1243,7 +1297,7 @@
         // else if its not already in the menu, add it to the menu.
         else {
             if ( i >= recentlyOpenedActionList.size()-2 ) {
-                QAction *recentlyOpenedAction = new QAction(fileInfo.fileName(), menuRecently_Opened_Files);
+                QAction *recentlyOpenedAction = new QAction(fileInfo.fileName(), _mainWindowForm->menuRecently_Opened_Files);
                 recentlyOpenedAction->setStatusTip(filePath);
                 recentlyOpenedActionList.insert( recentlyOpenedActionList.size()-2, recentlyOpenedAction );
             }
@@ -1251,7 +1305,7 @@
         }
     }
 
-    // Trim the list to its in the settings allowed maximum size.
+    // Trim the list to its in the _settings allowed maximum size.
     while ( recentlyOpenedList.size() > recentlyOpenedListMaxSize ) {
         recentlyOpenedList.takeLast();
         QAction* action = recentlyOpenedActionList.takeAt( recentlyOpenedActionList.size()-3 );
@@ -1259,17 +1313,18 @@
     }
 
     // Add all actions to the menu.
-    menuRecently_Opened_Files->addActions(recentlyOpenedActionList);
+    _mainWindowForm->menuRecently_Opened_Files->addActions(recentlyOpenedActionList);
+    _mainWindowForm->menuRecently_Opened_Files->addActions(recentlyOpenedActionList);
 
-    // Write the new recently opened list to the settings.
-    settings->setValueByName( "lastSourceCodeFile", recentlyOpenedList.join("|") );
+    // Write the new recently opened list to the _settings.
+    _settings->setValueByName( "lastSourceCodeFile", recentlyOpenedList.join("|") );
 
     // Enable or disable "actionClear_Recently_Opened_List" if list is [not] emtpy
     if ( recentlyOpenedList.isEmpty() ) {
-        actionClear_Recently_Opened_List->setEnabled(false);
+        _mainWindowForm->actionClear_Recently_Opened_List->setEnabled(false);
     }
     else {
-        actionClear_Recently_Opened_List->setEnabled(true);
+        _mainWindowForm->actionClear_Recently_Opened_List->setEnabled(true);
     }
 }
 
@@ -1278,8 +1333,8 @@
     \brief This slot empties the list of recently opened files.
  */
 void MainWindow::clearRecentlyOpenedList() {
-    QStringList recentlyOpenedList = settings->getValueByName("lastSourceCodeFile").toString().split("|");
-    QList<QAction*> recentlyOpenedActionList = menuRecently_Opened_Files->actions();
+    QStringList recentlyOpenedList = _settings->getValueByName("lastSourceCodeFile").toString().split("|");
+    QList<QAction*> recentlyOpenedActionList = _mainWindowForm->menuRecently_Opened_Files->actions();
 
     while ( recentlyOpenedList.size() > 0 ) {
         recentlyOpenedList.takeLast();
@@ -1287,11 +1342,11 @@
         delete action;
     }
 
-    // Write the new recently opened list to the settings.
-    settings->setValueByName( "lastSourceCodeFile", recentlyOpenedList.join("|") );
+    // Write the new recently opened list to the _settings.
+    _settings->setValueByName( "lastSourceCodeFile", recentlyOpenedList.join("|") );
 
     // Disable "actionClear_Recently_Opened_List"
-    actionClear_Recently_Opened_List->setEnabled(false);
+    _mainWindowForm->actionClear_Recently_Opened_List->setEnabled(false);
 }
 
 
@@ -1302,14 +1357,14 @@
 void MainWindow::openFileFromRecentlyOpenedList(QAction* recentlyOpenedAction) {
     // If the selected action from the recently opened list menu is the clear action
     // call the slot to clear the list and then leave.
-    if ( recentlyOpenedAction == actionClear_Recently_Opened_List ) {
+    if ( recentlyOpenedAction == _mainWindowForm->actionClear_Recently_Opened_List ) {
         clearRecentlyOpenedList();
         return;
     }
 
     QString fileName = recentlyOpenedAction->text();
-    int indexOfSelectedFile = menuRecently_Opened_Files->actions().indexOf( recentlyOpenedAction );
-    QStringList recentlyOpenedList = settings->getValueByName("lastSourceCodeFile").toString().split("|");
+    int indexOfSelectedFile = _mainWindowForm->menuRecently_Opened_Files->actions().indexOf( recentlyOpenedAction );
+    QStringList recentlyOpenedList = _settings->getValueByName("lastSourceCodeFile").toString().split("|");
     QString filePath = recentlyOpenedList.at(indexOfSelectedFile);
     QFileInfo fileInfo(filePath);
 
@@ -1358,8 +1413,8 @@
 void MainWindow::showAboutDialog() {
     //QPixmap originalPixmap = QPixmap::grabWindow(QApplication::desktop()->screen()->winId());
     //qDebug("in main pixmap width %d, numScreens = %d", originalPixmap.size().width(), QApplication::desktop()->availableGeometry().width());
-    //aboutDialogGraphicsView->setScreenshotPixmap( originalPixmap );
-    aboutDialogGraphicsView->show();
+    //_aboutDialogGraphicsView->setScreenshotPixmap( originalPixmap );
+    _aboutDialogGraphicsView->show();
 }
 
 
@@ -1367,5 +1422,5 @@
     \brief Sets the label in the status bar to show the \a line and \a column number.
 */
 void MainWindow::setStatusBarCursorPosInfo( int line, int column ) {
-    textEditLineColumnInfoLabel->setText( tr("Line %1, Column %2").arg(line+1).arg(column+1) );
+    _textEditLineColumnInfoLabel->setText( tr("Line %1, Column %2").arg(line+1).arg(column+1) );
 }
--- a/src/MainWindow.h	Sat Oct 02 12:48:56 2010 +0000
+++ b/src/MainWindow.h	Thu Oct 14 19:52:47 2010 +0000
@@ -20,97 +20,35 @@
 #ifndef MAINWINDOW_H
 #define MAINWINDOW_H
 
-#include "ui_MainWindow.h"
-#include "ui_ToolBarWidget.h"
-#include "AboutDialog.h"
-#include "AboutDialogGraphicsView.h"
-#include "UiGuiSettings.h"
-#include "UiGuiSettingsDialog.h"
-#include "UiGuiHighlighter.h"
-#include "IndentHandler.h"
-#include "UpdateCheckDialog.h"
+#include <QMainWindow>
 
-#include <QWidget>
-#include <QString>
-#include <QScrollBar>
-#include <QTextCursor>
-#include <QFileDialog>
-#include <QTextStream>
-#include <QPrinter>
-#include <QPrintDialog>
-#include <QCloseEvent>
-#include <QHelpEvent>
-#include <QToolTip>
-#include <QTranslator>
-#include <QLocale>
-#include <QTextCodec>
-#include <QDate>
+class UiGuiSettings;
+class UiGuiSettingsDialog;
+class AboutDialog;
+class AboutDialogGraphicsView;
+class UiGuiHighlighter;
+class IndentHandler;
+class UpdateCheckDialog;
+namespace Ui {
+	class ToolBarWidget;
+	class MainWindowUi;
+}
 
-#include <Qsci/qsciscintilla.h>
-#include <Qsci/qsciprinter.h>
+class QLabel;
+class QScrollBar;
+class QActionGroup;
+class QTranslator;
 
-class MainWindow : public QMainWindow, private Ui::MainWindowUi
+class QsciScintilla;
+
+
+class MainWindow : public QMainWindow
 {
     Q_OBJECT
 
 public:
     //! Constructor
-    MainWindow(QString file2OpenOnStart = "", QWidget *parent = 0);
-
-private:
-    QString loadFile(QString filePath);
-    QString openFileDialog(QString dialogHeaderStr, QString startPath, QString fileMaskStr);
-    void updateWindowTitle();
-    void loadLastOpenedFile();
-    void saveSettings();
-    bool maybeSave();
-    void createEncodingMenu();
-    void createHighlighterMenu();
-    bool initApplicationLanguage();
-    void initMainWindow();
-    void initToolBar();
-    void initTextEditor();
-    void initSyntaxHighlighter();
-    void initIndenter();
-    void changeEvent(QEvent *event);
-    void dragEnterEvent(QDragEnterEvent *event);
-    void dropEvent(QDropEvent *event);
-
-    QsciScintilla *qSciSourceCodeEditor;
-    UiGuiSettings *settings;
-
-    QString currentEncoding;
-    QString sourceFileContent;
-    QString sourceFormattedContent;
-    QString sourceViewContent;
-    UiGuiHighlighter *highlighter;
-    QScrollBar *textEditVScrollBar;
-    AboutDialog *aboutDialog;
-    AboutDialogGraphicsView *aboutDialogGraphicsView;
-    UiGuiSettingsDialog *settingsDialog;
-    int textEditLastScrollPos;
-    int currentIndenterID;
-    bool loadLastSourceCodeFileOnStartup;
-    QString currentSourceFile;
-    QString currentSourceFileExtension;
-    QString savedSourceContent;
-    QActionGroup *encodingActionGroup;
-    QActionGroup *saveEncodedActionGroup;
-    QActionGroup *highlighterActionGroup;
-    QTranslator *uiGuiTranslator;
-    QTranslator *qTTranslator;
-    bool isFirstRunOfThisVersion;
-
-    bool sourceCodeChanged;
-    bool scrollPositionChanged;
-    bool indentSettingsChanged;
-    bool previewToggled;
-    QStringList encodingsList;
-
-    Ui::ToolBarWidget *toolBarWidget;
-    IndentHandler *indentHandler;
-    UpdateCheckDialog *updateCheckDialog;
-    QLabel *textEditLineColumnInfoLabel;
+    MainWindow(QString file2OpenOnStart = "", QWidget *parent = NULL);
 
 protected:
     void closeEvent( QCloseEvent *event );
@@ -139,6 +77,63 @@
     void clearRecentlyOpenedList();
     void showAboutDialog();
     void setStatusBarCursorPosInfo(int line, int column);
+
+private:
+	Ui::MainWindowUi *_mainWindowForm;
+
+    QString loadFile(QString filePath);
+    QString openFileDialog(QString dialogHeaderStr, QString startPath, QString fileMaskStr);
+    void updateWindowTitle();
+    void loadLastOpenedFile();
+    void saveSettings();
+    bool maybeSave();
+    void createEncodingMenu();
+    void createHighlighterMenu();
+    bool initApplicationLanguage();
+    void initMainWindow();
+    void initToolBar();
+    void initTextEditor();
+    void initSyntaxHighlighter();
+    void initIndenter();
+    void changeEvent(QEvent *event);
+    void dragEnterEvent(QDragEnterEvent *event);
+    void dropEvent(QDropEvent *event);
+
+    QsciScintilla *_qSciSourceCodeEditor;
+    QSharedPointer<UiGuiSettings> _settings;
+
+    QString _currentEncoding;
+    QString _sourceFileContent;
+    QString _sourceFormattedContent;
+    QString _sourceViewContent;
+    UiGuiHighlighter *_highlighter;
+    QScrollBar *_textEditVScrollBar;
+    AboutDialog *_aboutDialog;
+    AboutDialogGraphicsView *_aboutDialogGraphicsView;
+    UiGuiSettingsDialog *_settingsDialog;
+    int _textEditLastScrollPos;
+    int _currentIndenterID;
+    bool _loadLastSourceCodeFileOnStartup;
+    QString _currentSourceFile;
+    QString _currentSourceFileExtension;
+    QString _savedSourceContent;
+    QActionGroup *_encodingActionGroup;
+    QActionGroup *_saveEncodedActionGroup;
+    QActionGroup *_highlighterActionGroup;
+    QTranslator *_uiGuiTranslator;
+    QTranslator *_qTTranslator;
+    bool _isFirstRunOfThisVersion;
+
+    bool _sourceCodeChanged;
+    bool _scrollPositionChanged;
+    bool _indentSettingsChanged;
+    bool _previewToggled;
+    QStringList _encodingsList;
+
+    Ui::ToolBarWidget *_toolBarWidget;
+    IndentHandler *_indentHandler;
+    UpdateCheckDialog *_updateCheckDialog;
+    QLabel *_textEditLineColumnInfoLabel;
 };
 
 #endif // MAINWINDOW_H
--- a/src/SettingsPaths.cpp	Sat Oct 02 12:48:56 2010 +0000
+++ b/src/SettingsPaths.cpp	Thu Oct 14 19:52:47 2010 +0000
@@ -17,14 +17,16 @@
  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
  ***************************************************************************/
 
+#include "SettingsPaths.h"
 
-#include <stdlib.h>
+#include <QCoreApplication>
+#include <QFile>
+#include <QDir>
 #include <QDirIterator>
 #include <QStack>
 #include <QtDebug>
 
-#include "SettingsPaths.h"
-
+#include <stdlib.h>
 
 //! \defgroup grp_Settings All concerning applications settings.
 
@@ -35,13 +37,13 @@
     paths needed for settings can be retrieved.
 */
 
-bool SettingsPaths::alreadyInitialized = false;
-QString SettingsPaths::applicationBinaryPath = "";
-QString SettingsPaths::settingsPath = "";
-QString SettingsPaths::globalFilesPath = "";
-QString SettingsPaths::indenterPath = "";
-QString SettingsPaths::tempPath = "";
-bool SettingsPaths::portableMode = false;
+bool SettingsPaths::_alreadyInitialized = false;
+QString SettingsPaths::_applicationBinaryPath = "";
+QString SettingsPaths::_settingsPath = "";
+QString SettingsPaths::_globalFilesPath = "";
+QString SettingsPaths::_indenterPath = "";
+QString SettingsPaths::_tempPath = "";
+bool SettingsPaths::_portableMode = false;
 
 
 /*!
@@ -55,108 +57,108 @@
     In not portable mode (multiuser mode) only users home directory is used for writing config data.
  */
 void SettingsPaths::init() {
-    alreadyInitialized = true;
+    _alreadyInitialized = true;
 
     qDebug() << __LINE__ << " " << __FUNCTION__ << ": Initializing application paths.";
 
     // Get the applications binary path, with respect to MacOSXs use of the .app folder.
-    applicationBinaryPath = QCoreApplication::applicationDirPath();
+    _applicationBinaryPath = QCoreApplication::applicationDirPath();
     // Remove any trailing slashes
-    while ( applicationBinaryPath.right(1) == "/" ) {
-        applicationBinaryPath.chop(1);
+    while ( _applicationBinaryPath.right(1) == "/" ) {
+        _applicationBinaryPath.chop(1);
     }
 
 #ifdef UNIVERSALINDENTGUI_NPP_EXPORTS
-    applicationBinaryPath += "/plugins/uigui";
+    _applicationBinaryPath += "/plugins/uigui";
 #endif
 
 #ifdef Q_OS_MAC
     // Because on Mac universal binaries are used, the binary path is not equal
     // to the applications (.app) path. So get the .apps path here.
-    int indexOfDotApp = applicationBinaryPath.indexOf(".app");
+    int indexOfDotApp = _applicationBinaryPath.indexOf(".app");
     if ( indexOfDotApp != -1 ) {
         // Cut off after the dot of ".app".
-        applicationBinaryPath = applicationBinaryPath.left( indexOfDotApp-1 );
+        _applicationBinaryPath = _applicationBinaryPath.left( indexOfDotApp-1 );
         // Cut off after the first slash that was in front of ".app" (normally this is the word "UniversalIndentGUI")
-        applicationBinaryPath = applicationBinaryPath.left( applicationBinaryPath.lastIndexOf("/") );
+        _applicationBinaryPath = _applicationBinaryPath.left( _applicationBinaryPath.lastIndexOf("/") );
     }
 #endif
 
     // If the "config" directory is a subdir of the applications binary path, use this one (portable mode)
-    settingsPath = applicationBinaryPath + "/config";
-    if ( QFile::exists( settingsPath ) ) {
-        portableMode = true;
+    _settingsPath = _applicationBinaryPath + "/config";
+    if ( QFile::exists( _settingsPath ) ) {
+        _portableMode = true;
         QDir dirCreator;
-        globalFilesPath = applicationBinaryPath;
-        indenterPath = applicationBinaryPath + "/indenters";
-        dirCreator.mkpath( settingsPath );
-        tempPath = applicationBinaryPath + "/temp";
+        _globalFilesPath = _applicationBinaryPath;
+        _indenterPath = _applicationBinaryPath + "/indenters";
+        dirCreator.mkpath( _settingsPath );
+        _tempPath = _applicationBinaryPath + "/temp";
         //TODO: If the portable drive has write protection, use local temp path and clean it up on exit.
-        dirCreator.mkpath( tempPath );
+        dirCreator.mkpath( _tempPath );
     }
     // ... otherwise use the system specific global application data path.
     else {
-        portableMode = false;
+        _portableMode = false;
         QDir dirCreator;
 #ifdef Q_OS_WIN
         // Get the local users application settings directory.
         // Remove any trailing slashes.
-        settingsPath = QDir::fromNativeSeparators( qgetenv("APPDATA") );
-        while ( settingsPath.right(1) == "/" ) {
-            settingsPath.chop(1);
+        _settingsPath = QDir::fromNativeSeparators( qgetenv("APPDATA") );
+        while ( _settingsPath.right(1) == "/" ) {
+            _settingsPath.chop(1);
         }
-        settingsPath = settingsPath + "/UniversalIndentGUI";
+        _settingsPath = _settingsPath + "/UniversalIndentGUI";
 
-        // On windows systems the directories "indenters", "translations" are subdirs of the applicationBinaryPath.
-        globalFilesPath = applicationBinaryPath;
+        // On windows systems the directories "indenters", "translations" are subdirs of the _applicationBinaryPath.
+        _globalFilesPath = _applicationBinaryPath;
 #else
         // Remove any trailing slashes.
-        settingsPath = QDir::homePath();
-        while ( settingsPath.right(1) == "/" ) {
-            settingsPath.chop(1);
+        _settingsPath = QDir::homePath();
+        while ( _settingsPath.right(1) == "/" ) {
+            _settingsPath.chop(1);
         }
-        settingsPath = settingsPath + "/.universalindentgui";
-        globalFilesPath = "/usr/share/universalindentgui";
+        _settingsPath = _settingsPath + "/.universalindentgui";
+        _globalFilesPath = "/usr/share/universalindentgui";
 #endif
-        dirCreator.mkpath( settingsPath );
+        dirCreator.mkpath( _settingsPath );
         // If a highlighter config file does not exist in the users home config dir
         // copy the default config file over there.
-        if ( !QFile::exists(settingsPath+"/UiGuiSyntaxHighlightConfig.ini") ) {
-            QFile::copy( globalFilesPath+"/config/UiGuiSyntaxHighlightConfig.ini", settingsPath+"/UiGuiSyntaxHighlightConfig.ini" );
+        if ( !QFile::exists(_settingsPath+"/UiGuiSyntaxHighlightConfig.ini") ) {
+            QFile::copy( _globalFilesPath+"/config/UiGuiSyntaxHighlightConfig.ini", _settingsPath+"/UiGuiSyntaxHighlightConfig.ini" );
         }
-        indenterPath = globalFilesPath + "/indenters";
+        _indenterPath = _globalFilesPath + "/indenters";
 
         // On different systems it may be that "QDir::tempPath()" ends with a "/" or not. So check this.
         // Remove any trailing slashes.
-        tempPath = QDir::tempPath();
-        while ( tempPath.right(1) == "/" ) {
-            tempPath.chop(1);
+        _tempPath = QDir::tempPath();
+        while ( _tempPath.right(1) == "/" ) {
+            _tempPath.chop(1);
         }
-        tempPath = tempPath + "/UniversalIndentGUI";
+        _tempPath = _tempPath + "/UniversalIndentGUI";
 
 #if defined(Q_OS_WIN32)
-        dirCreator.mkpath( tempPath );
+        dirCreator.mkpath( _tempPath );
 #else
         // On Unix based systems create a random temporary directory for security
         // reasons. Otherwise an evil human being could create a symbolic link
         // to an important existing file which gets overwritten when UiGUI writes
         // into this normally temporary but linked file.
-        char *pathTemplate = new char[tempPath.length()+8];
-        QByteArray pathTemplateQBA = QString(tempPath + "-XXXXXX").toAscii();
+        char *pathTemplate = new char[_tempPath.length()+8];
+        QByteArray pathTemplateQBA = QString(_tempPath + "-XXXXXX").toAscii();
         delete [] pathTemplate;
         pathTemplate = pathTemplateQBA.data();
         pathTemplate = mkdtemp( pathTemplate );
-        tempPath = pathTemplate;
+        _tempPath = pathTemplate;
 #endif
     }
 
     qDebug() << __LINE__ << " " << __FUNCTION__ << ": Paths are:" \
-        "<ul><li>applicationBinaryPath=" << applicationBinaryPath \
-        << "</li><li>settingsPath=" << settingsPath \
-        << "</li><li>globalFilesPath=" << globalFilesPath \
-        << "</li><li>indenterPath=" << indenterPath \
-        << "</li><li>tempPath=" << tempPath \
-        << "</li><li>Running in portable mode=" << portableMode << "</li></ul>";
+        "<ul><li>_applicationBinaryPath=" << _applicationBinaryPath \
+        << "</li><li>_settingsPath=" << _settingsPath \
+        << "</li><li>_globalFilesPath=" << _globalFilesPath \
+        << "</li><li>_indenterPath=" << _indenterPath \
+        << "</li><li>_tempPath=" << _tempPath \
+        << "</li><li>Running in portable mode=" << _portableMode << "</li></ul>";
 }
 
 
@@ -164,10 +166,10 @@
     \brief Returns the path of the applications executable.
  */
 const QString SettingsPaths::getApplicationBinaryPath() {
-    if ( !alreadyInitialized ) {
+    if ( !_alreadyInitialized ) {
         SettingsPaths::init();
     }
-    return applicationBinaryPath;
+    return _applicationBinaryPath;
 }
 
 
@@ -175,10 +177,10 @@
     \brief Returns the path where all settings are being/should be written to.
  */
 const QString SettingsPaths::getSettingsPath() {
-    if ( !alreadyInitialized ) {
+    if ( !_alreadyInitialized ) {
         SettingsPaths::init();
     }
-    return settingsPath;
+    return _settingsPath;
 }
 
 
@@ -186,10 +188,10 @@
     \brief Returns the path where the files concerning all users reside. For example translations.
  */
 const QString SettingsPaths::getGlobalFilesPath() {
-    if ( !alreadyInitialized ) {
+    if ( !_alreadyInitialized ) {
         SettingsPaths::init();
     }
-    return globalFilesPath;
+    return _globalFilesPath;
 }
 
 
@@ -197,10 +199,10 @@
     \brief Returns the path where the indenter executables reside.
  */
 const QString SettingsPaths::getIndenterPath() {
-    if ( !alreadyInitialized ) {
+    if ( !_alreadyInitialized ) {
         SettingsPaths::init();
     }
-    return indenterPath;
+    return _indenterPath;
 }
 
 
@@ -208,10 +210,10 @@
     \brief Returns the path where the where all temporary data should be written to.
  */
 const QString SettingsPaths::getTempPath() {
-    if ( !alreadyInitialized ) {
+    if ( !_alreadyInitialized ) {
         SettingsPaths::init();
     }
-    return tempPath;
+    return _tempPath;
 }
 
 
@@ -219,10 +221,10 @@
     \brief Returns true if portable mode shall be used.
  */
 bool SettingsPaths::getPortableMode() {
-    if ( !alreadyInitialized ) {
+    if ( !_alreadyInitialized ) {
         SettingsPaths::init();
     }
-    return portableMode;
+    return _portableMode;
 }
 
 
@@ -230,7 +232,7 @@
     \brief Completely deletes the created temporary directory with all of its content.
  */
 void SettingsPaths::cleanAndRemoveTempDir() {
-    QDirIterator dirIterator(tempPath, QDirIterator::Subdirectories);
+    QDirIterator dirIterator(_tempPath, QDirIterator::Subdirectories);
     QStack<QString> directoryStack;
     bool noErrorsOccurred = true;
 
@@ -267,7 +269,7 @@
             }
         }
     }
-    noErrorsOccurred &= QDir(tempPath).rmdir(tempPath);
+    noErrorsOccurred &= QDir(_tempPath).rmdir(_tempPath);
     if ( noErrorsOccurred == false )
         qWarning() << __LINE__ << " " << __FUNCTION__ << "While cleaning up the temp dir an error occurred.";
 }
--- a/src/SettingsPaths.h	Sat Oct 02 12:48:56 2010 +0000
+++ b/src/SettingsPaths.h	Thu Oct 14 19:52:47 2010 +0000
@@ -20,10 +20,8 @@
 #ifndef SETTINGSPATHS_H
 #define SETTINGSPATHS_H
 
-#include <QString>
-#include <QCoreApplication>
-#include <QFile>
-#include <QDir>
+class QString;
+
 
 class SettingsPaths
 {
@@ -40,13 +38,13 @@
 private:
     SettingsPaths();
 
-    static bool alreadyInitialized;
-    static QString applicationBinaryPath;
-    static QString settingsPath;
-    static QString globalFilesPath;
-    static QString indenterPath;
-    static QString tempPath;
-    static bool portableMode;
+    static bool _alreadyInitialized;
+    static QString _applicationBinaryPath;
+    static QString _settingsPath;
+    static QString _globalFilesPath;
+    static QString _indenterPath;
+    static QString _tempPath;
+    static bool _portableMode;
 };
 
 #endif // SETTINGSPATHS_H
--- a/src/UiGuiErrorMessage.cpp	Sat Oct 02 12:48:56 2010 +0000
+++ b/src/UiGuiErrorMessage.cpp	Thu Oct 14 19:52:47 2010 +0000
@@ -19,6 +19,8 @@
 
 #include "UiGuiErrorMessage.h"
 
+#include <QCheckBox>
+
 /*!
     \class UiGuiErrorMessage
     \ingroup grp_Dialogs
@@ -31,13 +33,13 @@
 /*!
     \brief Initializes the dialog.
 
-    Retrieves the object pointer to the \a showAgainCheckBox check box, sets the dialogs
+    Retrieves the object pointer to the \a _showAgainCheckBox check box, sets the dialogs
     modality and for a working translation sets the check box text.
  */
 UiGuiErrorMessage::UiGuiErrorMessage(QWidget *parent) : QErrorMessage(parent) {
-    showAgainCheckBox = findChild<QCheckBox *>();
+    _showAgainCheckBox = findChild<QCheckBox *>();
     setWindowModality( Qt::ApplicationModal );
-    showAgainCheckBox->setText( tr("Show this message again") );
+    _showAgainCheckBox->setText( tr("Show this message again") );
 }
 
 
@@ -58,16 +60,16 @@
 void UiGuiErrorMessage::showMessage( const QString &title, const QString &message ) {
     bool showAgain = true;
 
-    if ( showAgainCheckBox != 0 ) {
-        showAgain = showAgainCheckBox->isChecked();
+    if ( _showAgainCheckBox != 0 ) {
+        showAgain = _showAgainCheckBox->isChecked();
     }
 
     setWindowTitle(title);
 
-    if ( !errorMessageList.contains(message) ) {
-        errorMessageList << message;
-        if ( showAgainCheckBox != 0 ) {
-            showAgainCheckBox->setChecked(true);
+    if ( !_errorMessageList.contains(message) ) {
+        _errorMessageList << message;
+        if ( _showAgainCheckBox != 0 ) {
+            _showAgainCheckBox->setChecked(true);
         }
         QErrorMessage::showMessage( message );
     }
--- a/src/UiGuiErrorMessage.h	Sat Oct 02 12:48:56 2010 +0000
+++ b/src/UiGuiErrorMessage.h	Thu Oct 14 19:52:47 2010 +0000
@@ -21,7 +21,9 @@
 #define UIGUIERRORMESSAGE_H
 
 #include <QErrorMessage>
-#include <QCheckBox>
+
+class QCheckBox;
+
 
 class UiGuiErrorMessage : public QErrorMessage
 {
@@ -34,8 +36,8 @@
     void showMessage( const QString &title, const QString &message );
 
 private:
-    QCheckBox *showAgainCheckBox;
-    QStringList errorMessageList;
+    QCheckBox *_showAgainCheckBox;
+    QStringList _errorMessageList;
 };
 
 #endif // UIGUIERRORMESSAGE_H
--- a/src/UiGuiHighlighter.cpp	Sat Oct 02 12:48:56 2010 +0000
+++ b/src/UiGuiHighlighter.cpp	Thu Oct 14 19:52:47 2010 +0000
@@ -17,12 +17,63 @@
  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
  ***************************************************************************/
 
-#include <QtGui>
-
 #include "UiGuiHighlighter.h"
 
 #include "SettingsPaths.h"
 
+#include <QSettings>
+#include <QMenu>
+#include <QScrollBar>
+#include <QCoreApplication>
+
+#include <Qsci/qsciscintilla.h>
+#include <Qsci/qscilexer.h>
+#include <Qsci/qscilexerbash.h>
+#include <Qsci/qscilexerbatch.h>
+#include <Qsci/qscilexercmake.h>
+#include <Qsci/qscilexercpp.h>
+#include <Qsci/qscilexercsharp.h>
+#include <Qsci/qscilexercss.h>
+#include <Qsci/qscilexerd.h>
+#include <Qsci/qscilexerdiff.h>
+#if ( QSCINTILLA_VERSION >= 0x020300 )
+#include <Qsci/qscilexerfortran.h>
+#include <Qsci/qscilexerfortran77.h>
+#endif
+#include <Qsci/qscilexerhtml.h>
+#include <Qsci/qscilexeridl.h>
+#include <Qsci/qscilexerjava.h>
+#include <Qsci/qscilexerjavascript.h>
+#include <Qsci/qscilexerlua.h>
+#include <Qsci/qscilexermakefile.h>
+#if ( QSCINTILLA_VERSION >= 0x020300 )
+#include <Qsci/qscilexerpascal.h>
+#endif
+#include <Qsci/qscilexerperl.h>
+#if ( QSCINTILLA_VERSION >= 0x020300 )
+#include <Qsci/qscilexerpostscript.h>
+#endif
+#include <Qsci/qscilexerpov.h>
+#include <Qsci/qscilexerproperties.h>
+#include <Qsci/qscilexerpython.h>
+#include <Qsci/qscilexerruby.h>
+#if ( QSCINTILLA_VERSION >= 0x020400 )
+#include <Qsci/qscilexerspice.h>
+#endif
+#include <Qsci/qscilexersql.h>
+#if ( QSCINTILLA_VERSION >= 0x020300 )
+#include <Qsci/qscilexertcl.h>
+#endif
+#include <Qsci/qscilexertex.h>
+#if ( QSCINTILLA_VERSION >= 0x020400 )
+#include <Qsci/qscilexerverilog.h>
+#endif
+#include <Qsci/qscilexervhdl.h>
+#if ( QSCINTILLA_VERSION >= 0x020300 )
+#include <Qsci/qscilexerxml.h>
+#include <Qsci/qscilexeryaml.h>
+#endif
+
 //! \defgroup grp_EditorComponent All concerning editor widget.
 
 /*!
@@ -35,59 +86,65 @@
     \brief The constructor initializes some regular expressions and keywords to identify cpp tokens
  */
 UiGuiHighlighter::UiGuiHighlighter(QsciScintilla *parent) : QObject(parent) {
-    this->qsciEditorParent = parent;
+    _qsciEditorParent = parent;
 
-    // Create the highlighter settings object from the UiGuiSyntaxHighlightConfig.ini file.
-    this->settings = new QSettings(SettingsPaths::getSettingsPath() + "/UiGuiSyntaxHighlightConfig.ini", QSettings::IniFormat, this);
+    // Create the highlighter _settings object from the UiGuiSyntaxHighlightConfig.ini file.
+    _settings = new QSettings(SettingsPaths::getSettingsPath() + "/UiGuiSyntaxHighlightConfig.ini", QSettings::IniFormat, this);
 
-    highlightningIsOn = true;
+    _highlightningIsOn = true;
 
-    mapHighlighternameToExtension["Bash"] = QStringList() << "sh";
-    mapHighlighternameToExtension["Batch"] = QStringList() << "bat";
-    mapHighlighternameToExtension["CMake"] = QStringList() << "cmake";
-    mapHighlighternameToExtension["C++"] = QStringList() << "c" << "h" << "cpp" << "hpp" << "cxx" << "hxx";
-    mapHighlighternameToExtension["C#"] = QStringList() << "cs";
-    mapHighlighternameToExtension["CSS"] = QStringList() << "css";
-    mapHighlighternameToExtension["D"] = QStringList() << "d";
-    mapHighlighternameToExtension["Diff"] = QStringList() << "diff";
+    _mapHighlighternameToExtension["Bash"] = QStringList() << "sh";
+    _mapHighlighternameToExtension["Batch"] = QStringList() << "bat";
+    _mapHighlighternameToExtension["CMake"] = QStringList() << "cmake";
+    _mapHighlighternameToExtension["C++"] = QStringList() << "c" << "h" << "cpp" << "hpp" << "cxx" << "hxx";
+    _mapHighlighternameToExtension["C#"] = QStringList() << "cs";
+    _mapHighlighternameToExtension["CSS"] = QStringList() << "css";
+    _mapHighlighternameToExtension["D"] = QStringList() << "d";
+    _mapHighlighternameToExtension["Diff"] = QStringList() << "diff";
 #if ( QSCINTILLA_VERSION >= 0x020300 )
-    mapHighlighternameToExtension["Fortran"] = QStringList() << "f" << "for" << "f90";
-    mapHighlighternameToExtension["Fortran77"] = QStringList() << "f77";
+    _mapHighlighternameToExtension["Fortran"] = QStringList() << "f" << "for" << "f90";
+    _mapHighlighternameToExtension["Fortran77"] = QStringList() << "f77";
 #endif
-    mapHighlighternameToExtension["HTML"] = QStringList() << "html" << "htm";
-    mapHighlighternameToExtension["IDL"] = QStringList() << "idl";
-    mapHighlighternameToExtension["Java"] = QStringList() << "java";
-    mapHighlighternameToExtension["JavaScript"] = QStringList() << "js";
-    mapHighlighternameToExtension["LUA"] = QStringList() << "lua";
-    mapHighlighternameToExtension["Makefile"] = QStringList() << "makefile";
+    _mapHighlighternameToExtension["HTML"] = QStringList() << "html" << "htm";
+    _mapHighlighternameToExtension["IDL"] = QStringList() << "idl";
+    _mapHighlighternameToExtension["Java"] = QStringList() << "java";
+    _mapHighlighternameToExtension["JavaScript"] = QStringList() << "js";
+    _mapHighlighternameToExtension["LUA"] = QStringList() << "lua";
+    _mapHighlighternameToExtension["Makefile"] = QStringList() << "makefile";
 #if ( QSCINTILLA_VERSION >= 0x020300 )
-    mapHighlighternameToExtension["Pascal"] = QStringList() << "pas";
+    _mapHighlighternameToExtension["Pascal"] = QStringList() << "pas";
 #endif
-    mapHighlighternameToExtension["Perl"] = QStringList() << "perl" << "pl" << "pm";
-    mapHighlighternameToExtension["PHP"] = QStringList() << "php";
+    _mapHighlighternameToExtension["Perl"] = QStringList() << "perl" << "pl" << "pm";
+    _mapHighlighternameToExtension["PHP"] = QStringList() << "php";
 #if ( QSCINTILLA_VERSION >= 0x020300 )
-    mapHighlighternameToExtension["PostScript"] = QStringList() << "ps" << "eps" << "pdf" << "ai" << "fh";
+    _mapHighlighternameToExtension["PostScript"] = QStringList() << "ps" << "eps" << "pdf" << "ai" << "fh";
 #endif
-    mapHighlighternameToExtension["POV"] = QStringList() << "pov";
-    mapHighlighternameToExtension["Ini"] = QStringList() << "ini";
-    mapHighlighternameToExtension["Python"] = QStringList() << "py";
-    mapHighlighternameToExtension["Ruby"] = QStringList() << "rub" << "rb";
-    mapHighlighternameToExtension["SQL"] = QStringList() << "sql";
+    _mapHighlighternameToExtension["POV"] = QStringList() << "pov";
+    _mapHighlighternameToExtension["Ini"] = QStringList() << "ini";
+    _mapHighlighternameToExtension["Python"] = QStringList() << "py";
+    _mapHighlighternameToExtension["Ruby"] = QStringList() << "rub" << "rb";
+#if ( QSCINTILLA_VERSION >= 0x020400 )
+    _mapHighlighternameToExtension["Spice"] = QStringList() << "cir";
+#endif
+    _mapHighlighternameToExtension["SQL"] = QStringList() << "sql";
 #if ( QSCINTILLA_VERSION >= 0x020300 )
-    mapHighlighternameToExtension["TCL"] = QStringList() << "tcl";
+    _mapHighlighternameToExtension["TCL"] = QStringList() << "tcl";
 #endif
-    mapHighlighternameToExtension["TeX"] = QStringList() << "tex";
-    mapHighlighternameToExtension["VHDL"] = QStringList() << "vhdl";
-    mapHighlighternameToExtension["XML"] = QStringList() << "xml";
+    _mapHighlighternameToExtension["TeX"] = QStringList() << "tex";
+#if ( QSCINTILLA_VERSION >= 0x020400 )
+    _mapHighlighternameToExtension["Verilog"] = QStringList() << "v" << "vh";
+#endif
+    _mapHighlighternameToExtension["VHDL"] = QStringList() << "vhdl";
+    _mapHighlighternameToExtension["XML"] = QStringList() << "xml";
 #if ( QSCINTILLA_VERSION >= 0x020300 )
-    mapHighlighternameToExtension["YAML"] = QStringList() << "yaml";
+    _mapHighlighternameToExtension["YAML"] = QStringList() << "yaml";
 #endif
 
-    lexer = NULL;
+    _lexer = NULL;
 
     // This code is only for testing.
     /*
-    foreach(QStringList extensionList, mapHighlighternameToExtension.values() ) {
+    foreach(QStringList extensionList, _mapHighlighternameToExtension.values() ) {
         setLexerForExtension( extensionList.at(0) );
     }
     */
@@ -101,7 +158,7 @@
     \brief Returns the available highlighters as QStringList.
  */
 QStringList UiGuiHighlighter::getAvailableHighlighters() {
-    return mapHighlighternameToExtension.keys();
+    return _mapHighlighternameToExtension.keys();
 }
 
 
@@ -110,12 +167,12 @@
  */
 void UiGuiHighlighter::setHighlighterByAction(QAction* highlighterAction) {
     QString highlighterName = highlighterAction->text();
-    setLexerForExtension( mapHighlighternameToExtension[highlighterName].first() );
+    setLexerForExtension( _mapHighlighternameToExtension[highlighterName].first() );
     //TODO: This is really no nice way. How do it better?
     // Need to do this "text update" to update the syntax highlighting. Otherwise highlighting is wrong.
-    int scrollPos = qsciEditorParent->verticalScrollBar()->value();
-    qsciEditorParent->setText( qsciEditorParent->text() );
-    qsciEditorParent->verticalScrollBar()->setValue(scrollPos);
+    int scrollPos = _qsciEditorParent->verticalScrollBar()->value();
+    _qsciEditorParent->setText( _qsciEditorParent->text() );
+    _qsciEditorParent->verticalScrollBar()->setValue(scrollPos);
 }
 
 
@@ -123,8 +180,8 @@
     \brief Turns the syntax parser on.
 */
 void UiGuiHighlighter::turnHighlightOn() {
-    highlightningIsOn = true;
-    qsciEditorParent->setLexer(lexer);
+    _highlightningIsOn = true;
+    _qsciEditorParent->setLexer(_lexer);
     readCurrentSettings("");
 }
 
@@ -132,14 +189,14 @@
     \brief Turns the syntax parser off.
 */
 void UiGuiHighlighter::turnHighlightOff() {
-    highlightningIsOn = false;
-    qsciEditorParent->setLexer();
+    _highlightningIsOn = false;
+    _qsciEditorParent->setLexer();
 #if defined(Q_OS_WIN) || defined(Q_OS_MAC)
-    qsciEditorParent->setFont( QFont("Courier", 10, QFont::Normal) );
-    qsciEditorParent->setMarginsFont( QFont("Courier", 10, QFont::Normal) );
+    _qsciEditorParent->setFont( QFont("Courier", 10, QFont::Normal) );
+    _qsciEditorParent->setMarginsFont( QFont("Courier", 10, QFont::Normal) );
 #else
-    qsciEditorParent->setFont( QFont("Monospace", 10, QFont::Normal) );
-    qsciEditorParent->setMarginsFont( QFont("Monospace", 10, QFont::Normal) );
+    _qsciEditorParent->setFont( QFont("Monospace", 10, QFont::Normal) );
+    _qsciEditorParent->setMarginsFont( QFont("Monospace", 10, QFont::Normal) );
 #endif
 }
 
@@ -154,21 +211,21 @@
     QString key;
 
     // Reset lists containing fonts and colors for each style
-    fontForStyles.clear();
-    colorForStyles.clear();
+    _fontForStyles.clear();
+    _colorForStyles.clear();
 
     // Read the styles.
     for (int i = 0; i < 128; ++i) {
         // Ignore invalid styles.
-        if ( lexer->description(i).isEmpty() )
+        if ( _lexer->description(i).isEmpty() )
             continue;
 
-        key.sprintf( "%s/%s/style%d/", prefix, lexer->language(), i );
+        key.sprintf( "%s/%s/style%d/", prefix, _lexer->language(), i );
         key.replace("+", "p");
 
         // Read the foreground color.
-        ok = settings->contains(key + "color");
-        num = settings->value(key + "color", 0).toInt();
+        ok = _settings->contains(key + "color");
+        num = _settings->value(key + "color", 0).toInt();
 
         if (ok)
             setColor( QColor((num >> 16) & 0xff, (num >> 8) & 0xff, num & 0xff), i );
@@ -176,19 +233,19 @@
             rc = false;
 
         // Read the end-of-line fill.
-        ok = settings->contains(key + "eolfill");
-        flag = settings->value(key + "eolfill", false).toBool();
+        ok = _settings->contains(key + "eolfill");
+        flag = _settings->value(key + "eolfill", false).toBool();
 
         if (ok)
-            lexer->setEolFill( flag, i );
+            _lexer->setEolFill( flag, i );
         else
             rc = false;
 
         // Read the font
         QStringList fdesc;
 
-        ok = settings->contains(key + "font");
-        fdesc = settings->value(key + "font").toStringList();
+        ok = _settings->contains(key + "font");
+        fdesc = _settings->value(key + "font").toStringList();
 
         if (ok && fdesc.count() == 5) {
             QFont f;
@@ -212,19 +269,19 @@
             rc = false;
 
         // Read the background color.
-        ok = settings->contains(key + "paper");
-        num = settings->value(key + "paper", 0).toInt();
+        ok = _settings->contains(key + "paper");
+        num = _settings->value(key + "paper", 0).toInt();
 
         if (ok)
-            lexer->setPaper( QColor((num >> 16) & 0xff, (num >> 8) & 0xff, num & 0xff), i );
+            _lexer->setPaper( QColor((num >> 16) & 0xff, (num >> 8) & 0xff, num & 0xff), i );
         else
             rc = false;
     }
 
     // Read the properties.
-    key.sprintf( "%s/%s/properties/", prefix, lexer->language() );
+    key.sprintf( "%s/%s/properties/", prefix, _lexer->language() );
 
-    lexer->refreshProperties();
+    _lexer->refreshProperties();
 
     return rc;
 }
@@ -239,42 +296,42 @@
     // Write the styles.
     for (int i = 0; i < 128; ++i) {
         // Ignore invalid styles.
-        if ( lexer->description(i).isEmpty() )
+        if ( _lexer->description(i).isEmpty() )
             continue;
 
         int num;
         QColor c;
 
-        key.sprintf( "%s/%s/style%d/", prefix, lexer->language(), i );
+        key.sprintf( "%s/%s/style%d/", prefix, _lexer->language(), i );
         key.replace("+", "p");
 
         // Write style name
-        settings->setValue( key + "", lexer->description(i) );
+        _settings->setValue( key + "", _lexer->description(i) );
 
         // Write the foreground color.
-        if ( colorForStyles.contains(i) ) {
-            c = colorForStyles[i];
+        if ( _colorForStyles.contains(i) ) {
+            c = _colorForStyles[i];
         }
         else {
-            c = lexer->color(i);
+            c = _lexer->color(i);
         }
         num = (c.red() << 16) | (c.green() << 8) | c.blue();
 
-        settings->setValue(key + "color", num);
+        _settings->setValue(key + "color", num);
 
         // Write the end-of-line fill.
-        settings->setValue( key + "eolfill", lexer->eolFill(i) );
+        _settings->setValue( key + "eolfill", _lexer->eolFill(i) );
 
         // Write the font
         QStringList fdesc;
         QString fmt("%1");
         QFont f;
 
-        if ( fontForStyles.contains(i) ) {
-            f = fontForStyles[i];
+        if ( _fontForStyles.contains(i) ) {
+            f = _fontForStyles[i];
         }
         else {
-            f = lexer->font(i);
+            f = _lexer->font(i);
         }
 
         fdesc += f.family();
@@ -285,13 +342,13 @@
         fdesc += fmt.arg( (int)f.italic() );
         fdesc += fmt.arg( (int)f.underline() );
 
-        settings->setValue(key + "font", fdesc);
+        _settings->setValue(key + "font", fdesc);
 
         // Write the background color.
-        c = lexer->paper(i);
+        c = _lexer->paper(i);
         num = (c.red() << 16) | (c.green() << 8) | c.blue();
 
-        settings->setValue(key + "paper", num);
+        _settings->setValue(key + "paper", num);
     }
 }
 
@@ -300,8 +357,8 @@
     \brief Sets the \a color for the given \a style.
  */
 void UiGuiHighlighter::setColor(const QColor &color, int style) {
-    colorForStyles[style] = color;
-    lexer->setColor( color, style );
+    _colorForStyles[style] = color;
+    _lexer->setColor( color, style );
 }
 
 
@@ -309,8 +366,8 @@
     \brief Sets the \a font for the given \a style.
  */
 void UiGuiHighlighter::setFont(const QFont &font, int style) {
-    fontForStyles[style] = font;
-    lexer->setFont( font, style );
+    _fontForStyles[style] = font;
+    _lexer->setFont( font, style );
 }
 
 
@@ -318,7 +375,7 @@
     \brief Sets the to be used lexer by giving his name.
  */
 void UiGuiHighlighter::setLexerByName( QString lexerName ) {
-    setLexerForExtension( mapHighlighternameToExtension[lexerName].first() );
+    setLexerForExtension( _mapHighlighternameToExtension[lexerName].first() );
 }
 
 
@@ -329,132 +386,142 @@
     int indexOfHighlighter = 0;
     extension = extension.toLower();
 
-    if ( lexer != NULL ) {
+    if ( _lexer != NULL ) {
         writeCurrentSettings("");
-        delete lexer;
+        delete _lexer;
     }
 
     if ( extension == "cpp" || extension == "hpp" || extension == "c" || extension == "h" || extension == "cxx" || extension == "hxx" ) {
-        lexer = new QsciLexerCPP();
+        _lexer = new QsciLexerCPP();
     }
     else if ( extension == "sh" ) {
-        lexer = new QsciLexerBash();
+        _lexer = new QsciLexerBash();
     }
     else if ( extension == "bat" ) {
-        lexer = new QsciLexerBatch();
+        _lexer = new QsciLexerBatch();
     }
     else if ( extension == "cmake" ) {
-        lexer = new QsciLexerCMake();
+        _lexer = new QsciLexerCMake();
     }
     else if ( extension == "cs" ) {
-        lexer = new QsciLexerCSharp();
+        _lexer = new QsciLexerCSharp();
     }
     else if ( extension == "css" ) {
-        lexer = new QsciLexerCSS();
+        _lexer = new QsciLexerCSS();
     }
     else if ( extension == "d" ) {
-        lexer = new QsciLexerD();
+        _lexer = new QsciLexerD();
     }
     else if ( extension == "diff" ) {
-        lexer = new QsciLexerDiff();
+        _lexer = new QsciLexerDiff();
     }
 #if ( QSCINTILLA_VERSION >= 0x020300 )
     else if ( extension == "f" || extension == "for" || extension == "f90" ) {
-        lexer = new QsciLexerFortran();
+        _lexer = new QsciLexerFortran();
     }
     else if ( extension == "f77" ) {
-        lexer = new QsciLexerFortran77();
+        _lexer = new QsciLexerFortran77();
     }
 #endif
     else if ( extension == "html" || extension == "htm" ) {
-        lexer = new QsciLexerHTML();
+        _lexer = new QsciLexerHTML();
     }
     else if ( extension == "idl" ) {
-        lexer = new QsciLexerIDL();
+        _lexer = new QsciLexerIDL();
     }
     else if ( extension == "java" ) {
-        lexer = new QsciLexerJava();
+        _lexer = new QsciLexerJava();
     }
     else if ( extension == "js" ) {
-        lexer = new QsciLexerJavaScript();
+        _lexer = new QsciLexerJavaScript();
     }
     else if ( extension == "lua" ) {
-        lexer = new QsciLexerLua();
+        _lexer = new QsciLexerLua();
     }
     else if ( extension == "makefile" ) {
-        lexer = new QsciLexerMakefile();
+        _lexer = new QsciLexerMakefile();
     }
 #if ( QSCINTILLA_VERSION >= 0x020300 )
     else if ( extension == "pas" ) {
-        lexer = new QsciLexerPascal();
+        _lexer = new QsciLexerPascal();
     }
 #endif
     else if ( extension == "perl" || extension == "pl" || extension == "pm" ) {
-        lexer = new QsciLexerPerl();
+        _lexer = new QsciLexerPerl();
     }
     else if ( extension == "php" ) {
-        lexer = new QsciLexerHTML();
+        _lexer = new QsciLexerHTML();
     }
 #if ( QSCINTILLA_VERSION >= 0x020300 )
     else if ( extension == "ps" || extension == "eps" || extension == "pdf" || extension == "ai" || extension == "fh") {
-        lexer = new QsciLexerPostScript();
+        _lexer = new QsciLexerPostScript();
     }
 #endif
     else if ( extension == "pov" ) {
-        lexer = new QsciLexerPOV();
+        _lexer = new QsciLexerPOV();
     }
     else if ( extension == "ini" ) {
-        lexer = new QsciLexerProperties();
+        _lexer = new QsciLexerProperties();
     }
     else if ( extension == "py" ) {
-        lexer = new QsciLexerPython();
+        _lexer = new QsciLexerPython();
     }
     else if ( extension == "rub" || extension == "rb" ) {
-        lexer = new QsciLexerRuby();
+        _lexer = new QsciLexerRuby();
     }
+#if ( QSCINTILLA_VERSION >= 0x020400 )
+    else if ( extension == "spice?" ) {
+        _lexer = new QsciLexerSpice();
+    }
+#endif
     else if ( extension == "sql" ) {
-        lexer = new QsciLexerSQL();
+        _lexer = new QsciLexerSQL();
     }
 #if ( QSCINTILLA_VERSION >= 0x020300 )
     else if ( extension == "tcl" ) {
-        lexer = new QsciLexerTCL();
+        _lexer = new QsciLexerTCL();
     }
 #endif
     else if ( extension == "tex" ) {
-        lexer = new QsciLexerTeX();
+        _lexer = new QsciLexerTeX();
     }
+#if ( QSCINTILLA_VERSION >= 0x020400 )
+    else if ( extension == "vlog?" ) {
+        _lexer = new QsciLexerVerilog();
+    }
+#endif
     else if ( extension == "vhdl" ) {
-        lexer = new QsciLexerVHDL();
+        _lexer = new QsciLexerVHDL();
     }
     else if ( extension == "xml" ) {
 #if ( QSCINTILLA_VERSION >= 0x020300 )
-        lexer = new QsciLexerXML();
+        _lexer = new QsciLexerXML();
 #else
-        lexer = new QsciLexerHTML();
+        _lexer = new QsciLexerHTML();
 #endif
     }
 #if ( QSCINTILLA_VERSION >= 0x020300 )
     else if ( extension == "yaml" ) {
-        lexer = new QsciLexerYAML();
+        _lexer = new QsciLexerYAML();
     }
 #endif
     else {
-        lexer = new QsciLexerCPP();
+        _lexer = new QsciLexerCPP();
         extension = "cpp";
     }
 
-    // Find the index of the selected lexer.
+    // Find the index of the selected _lexer.
     indexOfHighlighter = 0;
-    while ( !mapHighlighternameToExtension.values().at(indexOfHighlighter).contains(extension) ) {
+    while ( !_mapHighlighternameToExtension.values().at(indexOfHighlighter).contains(extension) ) {
         indexOfHighlighter++;
     }
 
-    // Set the lexer for the QScintilla widget.
-    if ( highlightningIsOn ) {
-        qsciEditorParent->setLexer(lexer);
+    // Set the _lexer for the QScintilla widget.
+    if ( _highlightningIsOn ) {
+        _qsciEditorParent->setLexer(_lexer);
     }
 
-    // Read the settings for the lexer properties from file.
+    // Read the _settings for the _lexer properties from file.
     readCurrentSettings("");
 
     return indexOfHighlighter;
--- a/src/UiGuiHighlighter.h	Sat Oct 02 12:48:56 2010 +0000
+++ b/src/UiGuiHighlighter.h	Thu Oct 14 19:52:47 2010 +0000
@@ -22,49 +22,14 @@
 
 #include <QObject>
 #include <QMap>
-#include <QMenu>
-#include <QCoreApplication>
-#include <Qsci/qsciscintilla.h>
-#include <Qsci/qscilexer.h>
-#include <Qsci/qscilexerbash.h>
-#include <Qsci/qscilexerbatch.h>
-#include <Qsci/qscilexercmake.h>
-#include <Qsci/qscilexercpp.h>
-#include <Qsci/qscilexercsharp.h>
-#include <Qsci/qscilexercss.h>
-#include <Qsci/qscilexerd.h>
-#include <Qsci/qscilexerdiff.h>
-#if ( QSCINTILLA_VERSION >= 0x020300 )
-#include <Qsci/qscilexerfortran.h>
-#include <Qsci/qscilexerfortran77.h>
-#endif
-#include <Qsci/qscilexerhtml.h>
-#include <Qsci/qscilexeridl.h>
-#include <Qsci/qscilexerjava.h>
-#include <Qsci/qscilexerjavascript.h>
-#include <Qsci/qscilexerlua.h>
-#include <Qsci/qscilexermakefile.h>
-#if ( QSCINTILLA_VERSION >= 0x020300 )
-#include <Qsci/qscilexerpascal.h>
-#endif
-#include <Qsci/qscilexerperl.h>
-#if ( QSCINTILLA_VERSION >= 0x020300 )
-#include <Qsci/qscilexerpostscript.h>
-#endif
-#include <Qsci/qscilexerpov.h>
-#include <Qsci/qscilexerproperties.h>
-#include <Qsci/qscilexerpython.h>
-#include <Qsci/qscilexerruby.h>
-#include <Qsci/qscilexersql.h>
-#if ( QSCINTILLA_VERSION >= 0x020300 )
-#include <Qsci/qscilexertcl.h>
-#endif
-#include <Qsci/qscilexertex.h>
-#include <Qsci/qscilexervhdl.h>
-#if ( QSCINTILLA_VERSION >= 0x020300 )
-#include <Qsci/qscilexerxml.h>
-#include <Qsci/qscilexeryaml.h>
-#endif
+#include <QFont>
+#include <QColor>
+
+class QAction;
+class QSettings;
+
+class QsciScintilla;
+class QsciLexer;
 
 
 class UiGuiHighlighter : public QObject
@@ -80,15 +45,6 @@
     void writeCurrentSettings(const char *prefix);
     QStringList getAvailableHighlighters();
 
-private:
-    bool highlightningIsOn;
-    QsciScintilla *qsciEditorParent;
-    QMap<int, QFont> fontForStyles;
-    QMap<int, QColor> colorForStyles;
-    QsciLexer* lexer;
-    QSettings *settings;
-    QMap<QString, QStringList> mapHighlighternameToExtension;
-
 public slots:
     //! The foreground color for style number \a style is set to \a color.  If
     //! \a style is -1 then the color is set for all styles.
@@ -104,6 +60,15 @@
     void setLexerByName( QString lexerName );
 
     void setHighlighterByAction(QAction* highlighterAction);
+
+private:
+    bool _highlightningIsOn;
+    QsciScintilla *_qsciEditorParent;
+    QMap<int, QFont> _fontForStyles;
+    QMap<int, QColor> _colorForStyles;
+    QsciLexer* _lexer;
+    QSettings *_settings;
+    QMap<QString, QStringList> _mapHighlighternameToExtension;
 };
 
 #endif  // UIGUIHIGHLIGHTER_H
--- a/src/UiGuiIndentServer.cpp	Sat Oct 02 12:48:56 2010 +0000
+++ b/src/UiGuiIndentServer.cpp	Thu Oct 14 19:52:47 2010 +0000
@@ -17,9 +17,12 @@
  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
  ***************************************************************************/
 
-#include <QtDebug>
+#include "UiGuiIndentServer.h"
 
-#include "UiGuiIndentServer.h"
+#include <QTcpServer>
+#include <QTcpSocket>
+#include <QMessageBox>
+#include <QtDebug>
 
 //! \defgroup grp_Server All concerning the server component.
 
@@ -41,9 +44,9 @@
 */
 
 UiGuiIndentServer::UiGuiIndentServer(void) : QObject() {
-    tcpServer = NULL;
-    currentClientConnection = NULL;
-    readyForHandleRequest = false;
+    _tcpServer = NULL;
+    _currentClientConnection = NULL;
+    _readyForHandleRequest = false;
 }
 
 
@@ -52,36 +55,36 @@
 
 
 void UiGuiIndentServer::startServer() {
-    if ( tcpServer == NULL ) {
-        tcpServer = new QTcpServer(this);
+    if ( _tcpServer == NULL ) {
+        _tcpServer = new QTcpServer(this);
     }
 
-    if ( !tcpServer->isListening() ) {
-        if ( !tcpServer->listen(QHostAddress::Any, 84484) ) {
-            QMessageBox::critical( NULL, tr("UiGUI Server"), tr("Unable to start the server: %1.").arg(tcpServer->errorString()) );
+    if ( !_tcpServer->isListening() ) {
+        if ( !_tcpServer->listen(QHostAddress::Any, quint16(84484)) ) {
+            QMessageBox::critical( NULL, tr("UiGUI Server"), tr("Unable to start the server: %1.").arg(_tcpServer->errorString()) );
             return;
         }
     }
 
-    connect( tcpServer, SIGNAL(newConnection()), this, SLOT(handleNewConnection()) );
-    readyForHandleRequest = true;
-    blockSize = 0;
+    connect( _tcpServer, SIGNAL(newConnection()), this, SLOT(handleNewConnection()) );
+    _readyForHandleRequest = true;
+    _blockSize = 0;
 }
 
 
 void UiGuiIndentServer::stopServer() {
-    if ( tcpServer != NULL ) {
-        tcpServer->close();
-        delete tcpServer;
-        tcpServer = NULL;
+    if ( _tcpServer != NULL ) {
+        _tcpServer->close();
+        delete _tcpServer;
+        _tcpServer = NULL;
     }
-    currentClientConnection = NULL;
-    readyForHandleRequest = false;
+    _currentClientConnection = NULL;
+    _readyForHandleRequest = false;
 }
 
 
 void UiGuiIndentServer::handleNewConnection() {
-    QTcpSocket *clientConnection = tcpServer->nextPendingConnection();
+    QTcpSocket *clientConnection = _tcpServer->nextPendingConnection();
     connect( clientConnection, SIGNAL(disconnected()), clientConnection, SLOT(deleteLater()) );
 
     connect( clientConnection, SIGNAL(readyRead()), this, SLOT(handleReceivedData()) );
@@ -89,31 +92,31 @@
 
 
 void UiGuiIndentServer::handleReceivedData() {
-    if ( !readyForHandleRequest ) {
+    if ( !_readyForHandleRequest ) {
         return;
     }
 
-    currentClientConnection = qobject_cast<QTcpSocket*>( sender() );
+    _currentClientConnection = qobject_cast<QTcpSocket*>( sender() );
     QString receivedData = "";
 
-    if ( currentClientConnection != NULL ) {
-        QDataStream in(currentClientConnection);
+    if ( _currentClientConnection != NULL ) {
+        QDataStream in(_currentClientConnection);
         in.setVersion(QDataStream::Qt_4_0);
 
-        if ( blockSize == 0 ) {
-            if ( currentClientConnection->bytesAvailable() < (int)sizeof(quint32) )
+        if ( _blockSize == 0 ) {
+            if ( _currentClientConnection->bytesAvailable() < (int)sizeof(quint32) )
                 return;
 
-            in >> blockSize;
+            in >> _blockSize;
         }
 
-        if ( currentClientConnection->bytesAvailable() < blockSize )
+        if ( _currentClientConnection->bytesAvailable() < _blockSize )
             return;
 
         QString receivedMessage;
         in >> receivedMessage;
 
-        blockSize = 0;
+        _blockSize = 0;
 
         qDebug() << "receivedMessage: " << receivedMessage;
 
@@ -128,26 +131,26 @@
 
 
 void UiGuiIndentServer::sendMessage( const QString &message ) {
-    readyForHandleRequest = false;
+    _readyForHandleRequest = false;
 
-    dataToSend = "";
-    QDataStream out(&dataToSend, QIODevice::WriteOnly);
+    _dataToSend = "";
+    QDataStream out(&_dataToSend, QIODevice::WriteOnly);
     out.setVersion(QDataStream::Qt_4_0);
     out << (quint32)0;
     out << message;
     out.device()->seek(0);
-    out << (quint32)(dataToSend.size() - sizeof(quint32));
+    out << (quint32)(_dataToSend.size() - sizeof(quint32));
 
-    connect(currentClientConnection, SIGNAL(bytesWritten(qint64)), this, SLOT(checkIfReadyForHandleRequest()));
-    currentClientConnection->write(dataToSend);
+    connect(_currentClientConnection, SIGNAL(bytesWritten(qint64)), this, SLOT(checkIfReadyForHandleRequest()));
+    _currentClientConnection->write(_dataToSend);
 }
 
 
 void UiGuiIndentServer::checkIfReadyForHandleRequest() {
-    if ( currentClientConnection->bytesToWrite() == 0 ) {
-        QString dataToSendStr = dataToSend.right( dataToSend.size() - sizeof(quint32) );
-        qDebug() << "checkIfReadyForHandleRequest dataToSend was: " << dataToSendStr;
-        disconnect(currentClientConnection, SIGNAL(bytesWritten(qint64)), this, SLOT(checkIfReadyForHandleRequest()));
-        readyForHandleRequest = true;
+    if ( _currentClientConnection->bytesToWrite() == 0 ) {
+        QString dataToSendStr = _dataToSend.right( _dataToSend.size() - sizeof(quint32) );
+        qDebug() << "checkIfReadyForHandleRequest _dataToSend was: " << dataToSendStr;
+        disconnect(_currentClientConnection, SIGNAL(bytesWritten(qint64)), this, SLOT(checkIfReadyForHandleRequest()));
+        _readyForHandleRequest = true;
     }
 }
--- a/src/UiGuiIndentServer.h	Sat Oct 02 12:48:56 2010 +0000
+++ b/src/UiGuiIndentServer.h	Thu Oct 14 19:52:47 2010 +0000
@@ -20,9 +20,11 @@
 #ifndef UIGUIINDENTSERVER_H
 #define UIGUIINDENTSERVER_H
 
-#include <QTcpServer>
-#include <QTcpSocket>
-#include <QMessageBox>
+#include <QObject>
+
+class QTcpServer;
+class QTcpSocket;
+
 
 class UiGuiIndentServer : public QObject
 {
@@ -43,11 +45,11 @@
     void checkIfReadyForHandleRequest();
 
 private:
-    QTcpServer *tcpServer;
-    QByteArray dataToSend;
-    bool readyForHandleRequest;
-    QTcpSocket *currentClientConnection;
-    quint32 blockSize;
+    QTcpServer *_tcpServer;
+    QByteArray _dataToSend;
+    bool _readyForHandleRequest;
+    QTcpSocket *_currentClientConnection;
+    quint32 _blockSize;
 };
 
 #endif // UIGUIINDENTSERVER_H
--- a/src/UiGuiIniFileParser.cpp	Sat Oct 02 12:48:56 2010 +0000
+++ b/src/UiGuiIniFileParser.cpp	Thu Oct 14 19:52:47 2010 +0000
@@ -19,6 +19,9 @@
 
 #include "UiGuiIniFileParser.h"
 
+#include <QFile>
+#include <QStringList>
+#include <QVariant>
 #include <QTextStream>
 
 //! \defgroup grp_Settings All concerning applications settings.
@@ -41,9 +44,9 @@
     \brief Init and empty all needed lists and strings.
  */
 UiGuiIniFileParser::UiGuiIniFileParser(void) {
-    sections.clear();
-    keyValueMap.clear();
-    iniFileName = "";
+    _sections.clear();
+    _keyValueMap.clear();
+    _iniFileName = "";
 }
 
 
@@ -52,7 +55,7 @@
  */
 UiGuiIniFileParser::UiGuiIniFileParser(const QString &iniFileName) {
     UiGuiIniFileParser();
-    this->iniFileName = iniFileName;
+    _iniFileName = iniFileName;
     parseIniFile();
 }
 
@@ -67,8 +70,8 @@
 QStringList UiGuiIniFileParser::childGroups() {
     QStringList sectionsStringList;
 
-    for( unsigned int i = 0; i < sections.size(); i++ ) {
-        sectionsStringList << sections[i];
+    for( unsigned int i = 0; i < _sections.size(); i++ ) {
+        sectionsStringList << _sections[i];
     }
 
     return sectionsStringList;
@@ -84,7 +87,7 @@
     value("NiceSection/niceKeyName").
  */
 QVariant UiGuiIniFileParser::value(const QString &keyName, const QString &defaultValue) {
-    return keyValueMap.value( keyName, defaultValue );
+    return _keyValueMap.value( keyName, defaultValue );
 }
 
 
@@ -92,12 +95,12 @@
     \brief Parses the ini file and stores the key value pairs in the internal vectors \a keys and \a values.
  */
 void UiGuiIniFileParser::parseIniFile() {
-    QFile iniFile(iniFileName);
+    QFile iniFile(_iniFileName);
 
     if ( iniFile.open(QFile::ReadOnly) ) {
         // Clear the vectors holding the keys and values.
-        sections.clear();
-        keyValueMap.clear();
+        _sections.clear();
+        _keyValueMap.clear();
 
         QTextStream iniFileStream( &iniFile );
         QString line;
@@ -114,7 +117,7 @@
                 currentSectionName.chop(1);
 
                 // Store the section name.
-                sections.push_back( currentSectionName );
+                _sections.push_back( currentSectionName );
             }
             // Otherwise test whether the line has a assign char
             else if ( line.contains("=") ) {
@@ -135,7 +138,7 @@
                     }
 
                     // Store the key and value in the map.
-                    keyValueMap.insert(keyName, valueAsString );
+                    _keyValueMap.insert(keyName, valueAsString );
                 }
             }
         }
--- a/src/UiGuiIniFileParser.h	Sat Oct 02 12:48:56 2010 +0000
+++ b/src/UiGuiIniFileParser.h	Thu Oct 14 19:52:47 2010 +0000
@@ -20,17 +20,14 @@
 #ifndef UIGUIINIFILEPARSER_H
 #define UIGUIINIFILEPARSER_H
 
-#include <QFile>
+#include <QMap>
 #include <QString>
-#include <QMap>
-#include <QVariant>
-#include <QStringList>
+
 #include <vector>
 
-/*!
-    \class UiGuiIniFileParser
-    \brief This class can be used to parse and access the contents of well formed ini files, but only readable.
- */
+class QStringList;
+class QVariant;
+
 
 class UiGuiIniFileParser
 {
@@ -38,15 +35,15 @@
     UiGuiIniFileParser(void);
     UiGuiIniFileParser(const QString &iniFileName);
     ~UiGuiIniFileParser(void);
-    QVariant value(const QString &keyName, const QString &defaultValue="");
+    QVariant value(const QString &keyName, const QString &defaultValue = "");
     QStringList childGroups();
 
 private:
     void parseIniFile();
 
-    QString iniFileName;
-    std::vector<QString> sections;
-    QMap<QString, QVariant> keyValueMap;
+    QString _iniFileName;
+    std::vector<QString> _sections;
+    QMap<QString, QVariant> _keyValueMap;
 };
 
 #endif // UIGUIINIFILEPARSER_H
--- a/src/UiGuiLogger.cpp	Sat Oct 02 12:48:56 2010 +0000
+++ b/src/UiGuiLogger.cpp	Thu Oct 14 19:52:47 2010 +0000
@@ -18,28 +18,44 @@
  ***************************************************************************/
 
 #include "UiGuiLogger.h"
+#include "ui_UiGuiLoggerDialog.h"
 
-#include <ctime>
+#include "SettingsPaths.h"
+
 #include <QDateTime>
 #include <QFile>
+#include <QFileInfo>
 #include <QUrl>
 #include <QTextStream>
 #include <QDesktopServices>
 
-#include "SettingsPaths.h"
+#include <ctime>
+
+UiGuiLogger* UiGuiLogger::_instance = NULL;
+
+/*!
+    \class UiGuiLogger
+    \brief This class handles any kind of data logging, for debugging and whatever purpose.
 
-UiGuiLogger* UiGuiLogger::instance = NULL;
+    Beneath being able of displaying a dialog window containing all log messages of the
+    current session, a log file in the systems temporary directory is used. Its name
+    is "UiGUI_log.html".
+
+    Setting a verbose level allows to only write messages that have the selected minimum
+    priority to the log.
+ */
 
 /*!
     \brief Returns the only existing instance of UiGuiLogger. If the instance doesn't exist, it will be created.
  */
 UiGuiLogger* UiGuiLogger::getInstance(int verboseLevel) {
-    if ( instance == NULL )
-        instance = new UiGuiLogger(verboseLevel);
+    if ( _instance == NULL )
+        _instance = new UiGuiLogger(verboseLevel);
 
-    return instance;
+    return _instance;
 }
 
+
 /*!
     \brief Returns the only existing instance of UiGuiLogger. If the instance doesn't exist, it will be created.
  */
@@ -57,16 +73,17 @@
     Sets the default verbose level to warning level.
  */
 UiGuiLogger::UiGuiLogger(int verboseLevel) : QDialog() {
-    setupUi(this);
+	_uiGuiLoggerDialogForm = new Ui::UiGuiLoggerDialog();
+    _uiGuiLoggerDialogForm->setupUi(this);
 #ifdef _DEBUG
-    this->verboseLevel = QtDebugMsg;
+    _verboseLevel = QtDebugMsg;
 #else
-    this->verboseLevel = QtMsgType(verboseLevel);
+    _verboseLevel = QtMsgType(verboseLevel);
 #endif
 
-    logFileInitState = NOTINITIALZED;
+    _logFileInitState = NOTINITIALZED;
 
-    connect( openLogFileFolderToolButton, SIGNAL(clicked()), this, SLOT(openLogFileFolder()) );
+    connect( _uiGuiLoggerDialogForm->openLogFileFolderToolButton, SIGNAL(clicked()), this, SLOT(openLogFileFolder()) );
 
     // Make the main application not to wait for the logging window to close.
     setAttribute(Qt::WA_QuitOnClose, false);
@@ -79,11 +96,11 @@
     Only messages whos \a type have a higher priority than the set verbose level are logged.
  */
 void UiGuiLogger::messageHandler(QtMsgType type, const char *msg) {
-    if ( instance == NULL )
-        instance = UiGuiLogger::getInstance();
+    if ( _instance == NULL )
+        _instance = UiGuiLogger::getInstance();
 
     // Only log messages that have a higher or equal priority than set with the verbose level.
-    if ( type < instance->verboseLevel )
+    if ( type < _instance->_verboseLevel )
         return;
 
     // Init log message with prepended date and time.
@@ -113,10 +130,10 @@
     message += QString::fromUtf8( msg ) + "<br/>\n";
 
     // Write the message to the log windows text edit.
-    instance->logTextEdit->append( message );
+    _instance->_uiGuiLoggerDialogForm->logTextEdit->append( message );
 
     // Write/append the log message to the log file.
-    instance->writeToLogFile( message );
+    _instance->writeToLogFile( message );
 
     // In case of a fatal error abort the application.
     if ( type == QtFatalMsg )
@@ -130,21 +147,21 @@
  */
 void UiGuiLogger::setVerboseLevel(int level) {
     if ( level < 0 )
-        verboseLevel = QtDebugMsg;
+        _verboseLevel = QtDebugMsg;
     if ( level > 3 )
-        verboseLevel = QtFatalMsg;
+        _verboseLevel = QtFatalMsg;
     else
-        verboseLevel = QtMsgType(level);
+        _verboseLevel = QtMsgType(level);
 }
 
 
 /*!
-    \brief Deletes the existing instance of UiGuiLogger.
+    \brief Deletes the existing _instance of UiGuiLogger.
  */
 void UiGuiLogger::deleteInstance() {
-    if ( instance != NULL ) {
-        delete instance;
-        instance = NULL;
+    if ( _instance != NULL ) {
+        delete _instance;
+        _instance = NULL;
     }
 }
 
@@ -153,7 +170,7 @@
     \brief Opens the folder that contains the created log file with the name "UiGUI_log.html".
  */
 void UiGuiLogger::openLogFileFolder() {
-    QDesktopServices::openUrl( QFileInfo( logFile ).absolutePath() );
+    QDesktopServices::openUrl( QFileInfo( _logFile ).absolutePath() );
 }
 
 
@@ -162,8 +179,8 @@
  */
 void UiGuiLogger::writeToLogFile(const QString &message) {
     // If the file where all logging messages should go to isn't initilized yet, do that now.
-    if ( logFileInitState == NOTINITIALZED ) {
-        logFileInitState = INITIALIZING;
+    if ( _logFileInitState == NOTINITIALZED ) {
+        _logFileInitState = INITIALIZING;
 
         // On different systems it may be that "QDir::tempPath()" ends with a "/" or not. So check this.
         // Remove any trailing slashes.
@@ -195,28 +212,28 @@
         }
         logFileName += "_" + QString(randomChar) + ".html";
 
-        logFile.setFileName( tempPath + "/" + logFileName );
+        _logFile.setFileName( tempPath + "/" + logFileName );
 
         // Set the tooltip of the open log file folder button to show the unique name of the log file.
-        openLogFileFolderToolButton->setToolTip( openLogFileFolderToolButton->toolTip() + " (" + logFileName + ")" );
+        _uiGuiLoggerDialogForm->openLogFileFolderToolButton->setToolTip( _uiGuiLoggerDialogForm->openLogFileFolderToolButton->toolTip() + " (" + logFileName + ")" );
 
-        logFileInitState = INITIALZED;
+        _logFileInitState = INITIALZED;
     }
 
     // Add the message to the message queue.
-    messageQueue << message;
+    _messageQueue << message;
 
     // If the logging file is initialzed, write all messages contained in the message queue into the file.
-    if ( logFileInitState == INITIALZED ) {
+    if ( _logFileInitState == INITIALZED ) {
         // Write/append the log message to the log file.
-        if ( logFile.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append) ) {
-            QTextStream out(&logFile);
+        if ( _logFile.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append) ) {
+            QTextStream out(&_logFile);
 
-            while ( !messageQueue.isEmpty() ) {
-                out << messageQueue.takeFirst() << "\n";
+            while ( !_messageQueue.isEmpty() ) {
+                out << _messageQueue.takeFirst() << "\n";
             }
 
-            logFile.close();
+            _logFile.close();
         }
     }
 }
--- a/src/UiGuiLogger.h	Sat Oct 02 12:48:56 2010 +0000
+++ b/src/UiGuiLogger.h	Thu Oct 14 19:52:47 2010 +0000
@@ -24,23 +24,13 @@
 
 #include <QDialog>
 #include <QFile>
-#include <QStringList>
-
-#include "ui_UiGuiLoggerDialog.h"
-
-/*!
-    \class UiGuiLogger
-    \brief This class handles any kind of data logging, for debugging and whatever purpose.
 
-    Beneath being able of displaying a dialog window containing all log messages of the
-    current session, a log file in the systems temporary directory is used. Its name
-    is "UiGUI_log.html".
+namespace Ui {
+	class UiGuiLoggerDialog;
+}
 
-    Setting a verbose level allows to only write messages that have the selected minimum
-    priority to the log.
- */
 
-class UiGuiLogger : public QDialog, private Ui::UiGuiLoggerDialog
+class UiGuiLogger : public QDialog
 {
     Q_OBJECT
 
@@ -51,18 +41,20 @@
     static void deleteInstance();
     void setVerboseLevel(int level);
 
+private slots:
+    void openLogFileFolder();
+
 private:
-    enum LogFileInitState { NOTINITIALZED, INITIALIZING, INITIALZED } logFileInitState;
+	Ui::UiGuiLoggerDialog *_uiGuiLoggerDialogForm;
+
+    enum LogFileInitState { NOTINITIALZED, INITIALIZING, INITIALZED } _logFileInitState;
     UiGuiLogger(int verboseLevel);
     void writeToLogFile(const QString &message);
 
-    static UiGuiLogger* instance;
-    QtMsgType verboseLevel;
-    QFile logFile;
-    QStringList messageQueue;
-
-private slots:
-    void openLogFileFolder();
+    static UiGuiLogger* _instance;
+    QtMsgType _verboseLevel;
+    QFile _logFile;
+    QStringList _messageQueue;
 };
 
 #endif // UIGUILOGGER_H
--- a/src/UiGuiSettings.cpp	Sat Oct 02 12:48:56 2010 +0000
+++ b/src/UiGuiSettings.cpp	Thu Oct 14 19:52:47 2010 +0000
@@ -21,6 +21,13 @@
 
 #include "SettingsPaths.h"
 
+#include <QSettings>
+#include <QPoint>
+#include <QSize>
+#include <QDir>
+#include <QDate>
+#include <QStringList>
+#include <QCoreApplication>
 #include <QMetaMethod>
 #include <QMetaProperty>
 #include <QWidget>
@@ -35,16 +42,17 @@
 */
 
 // Inits the single class instance pointer.
-UiGuiSettings* UiGuiSettings::instance = NULL;
+QWeakPointer<UiGuiSettings> UiGuiSettings::_instance;
+
 
 /*!
     \brief The constructor for the settings.
 */
 UiGuiSettings::UiGuiSettings() : QObject() {
     // Create the main application settings object from the UniversalIndentGUI.ini file.
-    qsettings = new QSettings(SettingsPaths::getSettingsPath() + "/UniversalIndentGUI.ini", QSettings::IniFormat, this);
+    _qsettings = new QSettings(SettingsPaths::getSettingsPath() + "/UniversalIndentGUI.ini", QSettings::IniFormat, this);
 
-    indenterDirctoryStr = SettingsPaths::getGlobalFilesPath() + "/indenters";
+    _indenterDirctoryStr = SettingsPaths::getGlobalFilesPath() + "/indenters";
     readAvailableTranslations();
     initSettings();
 }
@@ -53,24 +61,15 @@
 /*!
     \brief Returns the instance of the settings class. If no instance exists, ONE will be created.
  */
-UiGuiSettings* UiGuiSettings::getInstance() {
-    if ( instance == NULL ) {
+QSharedPointer<UiGuiSettings> UiGuiSettings::getInstance() {
+	QSharedPointer<UiGuiSettings> sharedInstance = _instance.toStrongRef();
+    if ( sharedInstance.isNull() ) {
         // Create the settings object, which loads all UiGui settings from a file.
-        instance = new UiGuiSettings();
+        sharedInstance = QSharedPointer<UiGuiSettings>(new UiGuiSettings());
+        _instance = sharedInstance.toWeakRef();
     }
 
-    return instance;
-}
-
-/*!
-    \brief Deletes the existing instance of UiGuiSettings and removes the created temp dir.
- */
-void UiGuiSettings::deleteInstance() {
-    SettingsPaths::cleanAndRemoveTempDir();
-    if ( instance != NULL ) {
-        delete instance;
-        instance = NULL;
-    }
+    return sharedInstance;
 }
 
 
@@ -79,17 +78,17 @@
  */
 UiGuiSettings::~UiGuiSettings() {
     // Convert the language setting from an integer index to a string.
-    int index = qsettings->value("UniversalIndentGUI/language", 0).toInt();
-    if ( index < 0 || index >= availableTranslations.size() )
+    int index = _qsettings->value("UniversalIndentGUI/language", 0).toInt();
+    if ( index < 0 || index >= _availableTranslations.size() )
         index = 0;
 
-    qsettings->setValue( "UniversalIndentGUI/language", availableTranslations.at(index) );
+    _qsettings->setValue( "UniversalIndentGUI/language", _availableTranslations.at(index) );
 }
 
 
 /*!
     \brief Scans the translations directory for available translation files and
-    stores them in the QList \a availableTranslations.
+    stores them in the QList \a _availableTranslations.
  */
 void UiGuiSettings::readAvailableTranslations() {
     QString languageShort;
@@ -109,7 +108,7 @@
         // Remove trailing file extension ".qm".
         languageShort.chop(3);
 
-        availableTranslations.append(languageShort);
+        _availableTranslations.append(languageShort);
     }
 }
 
@@ -118,7 +117,7 @@
     \brief Returns a list of the mnemonics of the available translations.
  */
 QStringList UiGuiSettings::getAvailableTranslations() {
-    return availableTranslations;
+    return _availableTranslations;
 }
 
 
@@ -128,7 +127,7 @@
     If the named setting does not exist, 0 is being returned.
 */
 QVariant UiGuiSettings::getValueByName(QString settingName) {
-    return qsettings->value("UniversalIndentGUI/" + settingName);
+    return _qsettings->value("UniversalIndentGUI/" + settingName);
 }
 
 
@@ -140,53 +139,53 @@
 bool UiGuiSettings::initSettings()
 {
     // Read the version string saved in the settings file.
-    qsettings->setValue( "UniversalIndentGUI/version", qsettings->value("UniversalIndentGUI/version", "") );
+    _qsettings->setValue( "UniversalIndentGUI/version", _qsettings->value("UniversalIndentGUI/version", "") );
 
     // Read windows last size and position from the settings file.
-    qsettings->setValue( "UniversalIndentGUI/maximized", qsettings->value("UniversalIndentGUI/maximized", false) );
-    qsettings->setValue( "UniversalIndentGUI/position", qsettings->value("UniversalIndentGUI/position", QPoint(50, 50)) );
-    qsettings->setValue( "UniversalIndentGUI/size", qsettings->value("UniversalIndentGUI/size", QSize(800, 600)) );
+    _qsettings->setValue( "UniversalIndentGUI/maximized", _qsettings->value("UniversalIndentGUI/maximized", false) );
+    _qsettings->setValue( "UniversalIndentGUI/position", _qsettings->value("UniversalIndentGUI/position", QPoint(50, 50)) );
+    _qsettings->setValue( "UniversalIndentGUI/size", _qsettings->value("UniversalIndentGUI/size", QSize(800, 600)) );
 
     // Read last selected encoding for the opened source code file.
-    qsettings->setValue( "UniversalIndentGUI/encoding", qsettings->value("UniversalIndentGUI/encoding", "UTF-8") );
+    _qsettings->setValue( "UniversalIndentGUI/encoding", _qsettings->value("UniversalIndentGUI/encoding", "UTF-8") );
 
     // Read maximum length of list for recently opened files.
-    qsettings->setValue( "UniversalIndentGUI/recentlyOpenedListSize", qsettings->value("UniversalIndentGUI/recentlyOpenedListSize", 5) );
+    _qsettings->setValue( "UniversalIndentGUI/recentlyOpenedListSize", _qsettings->value("UniversalIndentGUI/recentlyOpenedListSize", 5) );
 
     // Read if last opened source code file should be loaded on startup.
-    qsettings->setValue( "UniversalIndentGUI/loadLastSourceCodeFileOnStartup", qsettings->value("UniversalIndentGUI/loadLastSourceCodeFileOnStartup", true) );
+    _qsettings->setValue( "UniversalIndentGUI/loadLastSourceCodeFileOnStartup", _qsettings->value("UniversalIndentGUI/loadLastSourceCodeFileOnStartup", true) );
 
     // Read last opened source code file from the settings file.
-    qsettings->setValue( "UniversalIndentGUI/lastSourceCodeFile", qsettings->value("UniversalIndentGUI/lastSourceCodeFile",  indenterDirctoryStr+"/example.cpp") );
+    _qsettings->setValue( "UniversalIndentGUI/lastSourceCodeFile", _qsettings->value("UniversalIndentGUI/lastSourceCodeFile",  _indenterDirctoryStr+"/example.cpp") );
 
     // Read last selected indenter from the settings file.
-    int selectedIndenter = qsettings->value("UniversalIndentGUI/selectedIndenter", 0).toInt();
+    int selectedIndenter = _qsettings->value("UniversalIndentGUI/selectedIndenter", 0).toInt();
     if ( selectedIndenter < 0 ) {
         selectedIndenter = 0;
     }
-    qsettings->setValue( "UniversalIndentGUI/selectedIndenter", selectedIndenter );
+    _qsettings->setValue( "UniversalIndentGUI/selectedIndenter", selectedIndenter );
 
     // Read if syntax highlighting is enabled.
-    qsettings->setValue( "UniversalIndentGUI/SyntaxHighlightingEnabled", qsettings->value("UniversalIndentGUI/SyntaxHighlightingEnabled", true) );
+    _qsettings->setValue( "UniversalIndentGUI/SyntaxHighlightingEnabled", _qsettings->value("UniversalIndentGUI/SyntaxHighlightingEnabled", true) );
 
     // Read if white space characters should be displayed.
-    qsettings->setValue( "UniversalIndentGUI/whiteSpaceIsVisible", qsettings->value("UniversalIndentGUI/whiteSpaceIsVisible", false) );
+    _qsettings->setValue( "UniversalIndentGUI/whiteSpaceIsVisible", _qsettings->value("UniversalIndentGUI/whiteSpaceIsVisible", false) );
 
     // Read if indenter parameter tool tips are enabled.
-    qsettings->setValue( "UniversalIndentGUI/indenterParameterTooltipsEnabled", qsettings->value("UniversalIndentGUI/indenterParameterTooltipsEnabled", true) );
+    _qsettings->setValue( "UniversalIndentGUI/indenterParameterTooltipsEnabled", _qsettings->value("UniversalIndentGUI/indenterParameterTooltipsEnabled", true) );
 
     // Read the tab width from the settings file.
-    qsettings->setValue( "UniversalIndentGUI/tabWidth", qsettings->value("UniversalIndentGUI/tabWidth", 4) );
+    _qsettings->setValue( "UniversalIndentGUI/tabWidth", _qsettings->value("UniversalIndentGUI/tabWidth", 4) );
 
     // Read the last selected language and stores the index it has in the list of available translations.
-    qsettings->setValue( "UniversalIndentGUI/language", availableTranslations.indexOf( qsettings->value("UniversalIndentGUI/language", "").toString() ) );
+    _qsettings->setValue( "UniversalIndentGUI/language", _availableTranslations.indexOf( _qsettings->value("UniversalIndentGUI/language", "").toString() ) );
 
     // Read the update check settings from the settings file.
-    qsettings->setValue( "UniversalIndentGUI/CheckForUpdate", qsettings->value("UniversalIndentGUI/CheckForUpdate", true) );
-    qsettings->setValue( "UniversalIndentGUI/LastUpdateCheck", qsettings->value("UniversalIndentGUI/LastUpdateCheck", QDate(1900,1,1)) );
+    _qsettings->setValue( "UniversalIndentGUI/CheckForUpdate", _qsettings->value("UniversalIndentGUI/CheckForUpdate", true) );
+    _qsettings->setValue( "UniversalIndentGUI/LastUpdateCheck", _qsettings->value("UniversalIndentGUI/LastUpdateCheck", QDate(1900,1,1)) );
 
     // Read the main window state.
-    qsettings->setValue( "UniversalIndentGUI/MainWindowState", qsettings->value("UniversalIndentGUI/MainWindowState", QByteArray()) );
+    _qsettings->setValue( "UniversalIndentGUI/MainWindowState", _qsettings->value("UniversalIndentGUI/MainWindowState", QByteArray()) );
 
     return true;
 }
@@ -219,7 +218,7 @@
         }
 
         if ( connectSuccess ) {
-            registeredObjectProperties[obj] = QStringList() << propertyName << settingName;
+            _registeredObjectProperties[obj] = QStringList() << propertyName << settingName;
         }
         else {
             //TODO: Write a debug warning to the log.
@@ -228,12 +227,12 @@
         }
 
         // If setting already exists, set the objects property to the setting value.
-        if ( qsettings->contains("UniversalIndentGUI/" + settingName) ) {
-            mProp.write(obj, qsettings->value("UniversalIndentGUI/" + settingName));
+        if ( _qsettings->contains("UniversalIndentGUI/" + settingName) ) {
+            mProp.write(obj, _qsettings->value("UniversalIndentGUI/" + settingName));
         }
         // Otherwise add the setting and set it to the value of the objects property.
         else {
-            qsettings->setValue("UniversalIndentGUI/" + settingName, mProp.read(obj));
+            _qsettings->setValue("UniversalIndentGUI/" + settingName, mProp.read(obj));
         }
     }
     else {
@@ -278,8 +277,8 @@
         QMetaProperty mProp = metaObject->property(indexOfProp);
 
         // If setting already exists, set the objects property to the setting value.
-        if ( qsettings->contains("UniversalIndentGUI/" + settingName) ) {
-            mProp.write(obj, qsettings->value("UniversalIndentGUI/" + settingName));
+        if ( _qsettings->contains("UniversalIndentGUI/" + settingName) ) {
+            mProp.write(obj, _qsettings->value("UniversalIndentGUI/" + settingName));
         }
         // The setting didn't exist so return that setting the objects property failed.
         else {
@@ -314,7 +313,7 @@
 
 /*!
     \brief Assigns the by \a propertyName defined property's value of \a obj to the by \a settingName defined setting.
-    
+
     If the \a settingName didn't exist yet, it will be created.
 
     Returns true, if the value could be assigned, otherwise returns false, which is the case if the mentioned
@@ -379,14 +378,15 @@
     return success;
 }
 
+
 /*!
     \brief The with a certain property registered \a obj gets unregistered.
  */
 void UiGuiSettings::unregisterObjectProperty(QObject *obj) {
-    if ( registeredObjectProperties.contains(obj) ) {
+    if ( _registeredObjectProperties.contains(obj) ) {
         const QMetaObject *metaObject = obj->metaObject();
-        QString propertyName = registeredObjectProperties[obj].first();
-        QString settingName = registeredObjectProperties[obj].last();
+        QString propertyName = _registeredObjectProperties[obj].first();
+        QString settingName = _registeredObjectProperties[obj].last();
 
         bool connectSuccess = false;
         int indexOfProp = metaObject->indexOfProperty( qPrintable(propertyName) );
@@ -400,7 +400,7 @@
                 connectSuccess = disconnect(obj, qPrintable(SIGNAL() + QString(signal.signature())), this, SLOT(handleObjectPropertyChange()));
             }
         }
-        registeredObjectProperties.remove(obj);
+        _registeredObjectProperties.remove(obj);
     }
 }
 
@@ -431,7 +431,7 @@
         // Since the method can at maximum be invoked with the setting value as argument,
         // only methods taking max one argument are allowed.
         if ( mMethod.parameterTypes().size() <= 1 ) {
-            registeredObjectSlots.insert(obj, QStringList() << normalizedSlotName << settingName);
+            _registeredObjectSlots.insert(obj, QStringList() << normalizedSlotName << settingName);
         }
         else {
             //TODO: Write a debug warning to the log.
@@ -456,7 +456,7 @@
 void UiGuiSettings::unregisterObjectSlot(QObject *obj, const QString &slotName, const QString &settingName) {
     const QMetaObject *metaObject = obj->metaObject();
     QString normalizedSlotName = QMetaObject::normalizedSignature( qPrintable(slotName) );
-    QMutableMapIterator<QObject*, QStringList> it(registeredObjectSlots);
+    QMutableMapIterator<QObject*, QStringList> it(_registeredObjectSlots);
     while (it.hasNext()) {
         it.next();
         if (it.key() == obj && slotName.isEmpty() && settingName.isEmpty())
@@ -475,8 +475,8 @@
     QObject *obj = QObject::sender();
     QString className = obj->metaObject()->className();
     const QMetaObject *metaObject = obj->metaObject();
-    QString propertyName = registeredObjectProperties[obj].first();
-    QString settingName = registeredObjectProperties[obj].last();
+    QString propertyName = _registeredObjectProperties[obj].first();
+    QString settingName = _registeredObjectProperties[obj].last();
 
     int indexOfProp = metaObject->indexOfProperty( qPrintable(propertyName) );
     if ( indexOfProp > -1 ) {
@@ -495,11 +495,11 @@
  */
 void UiGuiSettings::setValueByName(const QString &settingName, const QVariant &value) {
     // Do the updating only, if the setting was really changed.
-    if ( qsettings->value("UniversalIndentGUI/" + settingName) != value ) {
-        qsettings->setValue("UniversalIndentGUI/" + settingName, value);
+    if ( _qsettings->value("UniversalIndentGUI/" + settingName) != value ) {
+        _qsettings->setValue("UniversalIndentGUI/" + settingName, value);
 
         // Set the new value for all registered object properties for settingName.
-        for ( QMap<QObject*, QStringList>::ConstIterator it = registeredObjectProperties.begin(); it != registeredObjectProperties.end(); ++it ) {
+        for ( QMap<QObject*, QStringList>::ConstIterator it = _registeredObjectProperties.begin(); it != _registeredObjectProperties.end(); ++it ) {
             if ( it.value().last() == settingName ) {
                 QObject *obj = it.key();
                 const QMetaObject *metaObject = obj->metaObject();
@@ -514,7 +514,7 @@
         }
 
         // Invoke all registered object methods for settingName.
-        for ( QMap<QObject*, QStringList>::ConstIterator it = registeredObjectSlots.begin(); it != registeredObjectSlots.end(); ++it ) {
+        for ( QMap<QObject*, QStringList>::ConstIterator it = _registeredObjectSlots.begin(); it != _registeredObjectSlots.end(); ++it ) {
             if ( it.value().last() == settingName ) {
                 QObject *obj = it.key();
                 const QMetaObject *metaObject = obj->metaObject();
--- a/src/UiGuiSettings.h	Sat Oct 02 12:48:56 2010 +0000
+++ b/src/UiGuiSettings.h	Thu Oct 14 19:52:47 2010 +0000
@@ -20,27 +20,23 @@
 #ifndef UIGUISETTINGS_H
 #define UIGUISETTINGS_H
 
-//TODO: Move to cpp and add pre declarations.
 #include <QObject>
-#include <QString>
-#include <QSettings>
-#include <QPoint>
-#include <QSize>
-#include <QDir>
-#include <QDate>
 #include <QStringList>
-#include <QCoreApplication>
+#include <QMultiMap>
+#include <QSharedPointer>
+
+class QSettings;
+
 
 class UiGuiSettings : public QObject
 {
     Q_OBJECT
 private:
     UiGuiSettings();
-    static UiGuiSettings* instance;
+    static QWeakPointer<UiGuiSettings> _instance;
 
 public:
-    static UiGuiSettings* getInstance();
-    static void deleteInstance();
+    static QSharedPointer<UiGuiSettings> getInstance();
     ~UiGuiSettings();
 
     bool registerObjectProperty(QObject *obj, const QString &propertyName, const QString &settingName);
@@ -70,18 +66,18 @@
     void readAvailableTranslations();
 
     //! Stores the mnemonics of the available translations.
-    QStringList availableTranslations;
+    QStringList _availableTranslations;
 
     //! The settings file.
-    QSettings *qsettings;
+    QSettings *_qsettings;
 
     //! Maps an QObject to a string list containing the property name and the associated setting name.
-    QMap<QObject*, QStringList> registeredObjectProperties;
+    QMap<QObject*, QStringList> _registeredObjectProperties;
 
     //! Maps QObjects to a string list containing the method name and the associated setting name.
-    QMultiMap<QObject*, QStringList> registeredObjectSlots;
+    QMultiMap<QObject*, QStringList> _registeredObjectSlots;
 
-    QString indenterDirctoryStr;
+    QString _indenterDirctoryStr;
 };
 
 #endif // UIGUISETTINGS_H
--- a/src/UiGuiSettingsDialog.cpp	Sat Oct 02 12:48:56 2010 +0000
+++ b/src/UiGuiSettingsDialog.cpp	Thu Oct 14 19:52:47 2010 +0000
@@ -18,6 +18,9 @@
 ***************************************************************************/
 
 #include "UiGuiSettingsDialog.h"
+#include "ui_UiGuiSettingsDialog.h"
+
+#include "UiGuiSettings.h"
 
 /*!
     \class UiGuiSettingsDialog
@@ -26,18 +29,19 @@
 */
 
 /*!
-    \brief The constructor calls the setup function for the ui created by uic. and adds
+    \brief The constructor calls the setup function for the ui created by uic.
 */
-UiGuiSettingsDialog::UiGuiSettingsDialog(QWidget* parent, UiGuiSettings* settings) : QDialog(parent) {
+UiGuiSettingsDialog::UiGuiSettingsDialog(QWidget* parent, QSharedPointer<UiGuiSettings> settings) : QDialog(parent) {
     // Remember pointer to the UiGuiSettings object.
-    this->settings = settings;
+    _settings = settings;
 
     // Init the user interface created by the UIC.
-    setupUi(this);
+    _settingsDialogForm = new Ui::SettingsDialog();
+    _settingsDialogForm->setupUi(this);
 
     //TODO: This call has to be removed when the properties for the highlighters can be set
     // with the settings dialog.
-    groupBoxSyntaxHighlighterProperties->setToolTip( "(Will be implemented soon)" + groupBoxSyntaxHighlighterProperties->toolTip() );
+    _settingsDialogForm->groupBoxSyntaxHighlighterProperties->setToolTip( "(Will be implemented soon)" + _settingsDialogForm->groupBoxSyntaxHighlighterProperties->toolTip() );
 
     // Connect the accepted signal to own function, to write values back to the UiGuiSettings object.
     connect(this, SIGNAL(accepted()), this, SLOT(writeWidgetValuesToSettings()) );
@@ -55,35 +59,35 @@
  */
 void UiGuiSettingsDialog::initTranslationSelection() {
     // First empty the combo box.
-    languageSelectionComboBox->clear();
+    _settingsDialogForm->languageSelectionComboBox->clear();
 
     // Now add an entry into the box for every language short.
-    foreach (QString languageShort, settings->getAvailableTranslations() ) {
+    foreach (QString languageShort, _settings->getAvailableTranslations() ) {
         // Identify the language mnemonic and set the full name.
         if ( languageShort == "en" ) {
-            languageSelectionComboBox->addItem( QIcon(QString(":/language/language-"+languageShort+".png")), tr("English") );
+            _settingsDialogForm->languageSelectionComboBox->addItem( QIcon(QString(":/language/language-"+languageShort+".png")), tr("English") );
         }
         else if ( languageShort == "fr" ) {
-            languageSelectionComboBox->addItem( QIcon(QString(":/language/language-"+languageShort+".png")), tr("French") );
+            _settingsDialogForm->languageSelectionComboBox->addItem( QIcon(QString(":/language/language-"+languageShort+".png")), tr("French") );
         }
         else if ( languageShort == "de" ) {
-            languageSelectionComboBox->addItem( QIcon(QString(":/language/language-"+languageShort+".png")), tr("German") );
+            _settingsDialogForm->languageSelectionComboBox->addItem( QIcon(QString(":/language/language-"+languageShort+".png")), tr("German") );
         }
         else if ( languageShort == "zh_TW" ) {
-            languageSelectionComboBox->addItem( QIcon(QString(":/language/language-"+languageShort+".png")), tr("Chinese (Taiwan)") );
+            _settingsDialogForm->languageSelectionComboBox->addItem( QIcon(QString(":/language/language-"+languageShort+".png")), tr("Chinese (Taiwan)") );
         }
         else if ( languageShort == "ja_jp" ) {
-            languageSelectionComboBox->addItem( QIcon(QString(":/language/language-"+languageShort+".png")), tr("Japanese") );
+            _settingsDialogForm->languageSelectionComboBox->addItem( QIcon(QString(":/language/language-"+languageShort+".png")), tr("Japanese") );
         }
         else if ( languageShort == "ru" ) {
-            languageSelectionComboBox->addItem( QIcon(QString(":/language/language-"+languageShort+".png")), tr("Russian") );
+            _settingsDialogForm->languageSelectionComboBox->addItem( QIcon(QString(":/language/language-"+languageShort+".png")), tr("Russian") );
         }
         else if ( languageShort == "uk" ) {
-            languageSelectionComboBox->addItem( QIcon(QString(":/language/language-"+languageShort+".png")), tr("Ukrainian") );
+            _settingsDialogForm->languageSelectionComboBox->addItem( QIcon(QString(":/language/language-"+languageShort+".png")), tr("Ukrainian") );
         }
 
         else {
-            languageSelectionComboBox->addItem( tr("Unknown language mnemonic ") + languageShort );
+            _settingsDialogForm->languageSelectionComboBox->addItem( tr("Unknown language mnemonic ") + languageShort );
         }
     }
 }
@@ -96,7 +100,7 @@
  */
 int UiGuiSettingsDialog::showDialog() {
     // Init all settings dialog objects with values from settings.
-    settings->setObjectPropertyToSettingValueRecursive(this);
+    _settings->setObjectPropertyToSettingValueRecursive(this);
 
     // Execute the dialog.
     return exec();
@@ -110,7 +114,7 @@
  */
 void UiGuiSettingsDialog::writeWidgetValuesToSettings() {
     // Write settings dialog object values to settings.
-    settings->setSettingToObjectPropertyValueRecursive(this);
+    _settings->setSettingToObjectPropertyValueRecursive(this);
 }
 
 
@@ -119,14 +123,14 @@
  */
 void UiGuiSettingsDialog::changeEvent(QEvent *event) {
     if (event->type() == QEvent::LanguageChange) {
-        retranslateUi(this);
+        _settingsDialogForm->retranslateUi(this);
         // If this is not explicit set here, Qt < 4.3.0 does not translate the buttons.
-        buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok);
+        _settingsDialogForm->buttonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::NoButton|QDialogButtonBox::Ok);
 
         //TODO: This has to be removed when the properties for the highlighters can be set.
-        groupBoxSyntaxHighlighterProperties->setToolTip( "(Will be implemented soon)" + groupBoxSyntaxHighlighterProperties->toolTip() );
+        _settingsDialogForm->groupBoxSyntaxHighlighterProperties->setToolTip( "(Will be implemented soon)" + _settingsDialogForm->groupBoxSyntaxHighlighterProperties->toolTip() );
 
-        QStringList languageShortList = settings->getAvailableTranslations();
+        QStringList languageShortList = _settings->getAvailableTranslations();
 
         // Now retranslate every entry in the language selection box.
         for (int i = 0; i < languageShortList.size(); i++ ) {
@@ -134,28 +138,28 @@
 
             // Identify the language mnemonic and set the full name.
             if ( languageShort == "en" ) {
-                languageSelectionComboBox->setItemText( i, tr("English") );
+                _settingsDialogForm->languageSelectionComboBox->setItemText( i, tr("English") );
             }
             else if ( languageShort == "fr" ) {
-                languageSelectionComboBox->setItemText( i, tr("French") );
+                _settingsDialogForm->languageSelectionComboBox->setItemText( i, tr("French") );
             }
             else if ( languageShort == "de" ) {
-                languageSelectionComboBox->setItemText( i, tr("German") );
+                _settingsDialogForm->languageSelectionComboBox->setItemText( i, tr("German") );
             }
             else if ( languageShort == "zh_TW" ) {
-                languageSelectionComboBox->setItemText( i, tr("Chinese (Taiwan)") );
+                _settingsDialogForm->languageSelectionComboBox->setItemText( i, tr("Chinese (Taiwan)") );
             }
             else if ( languageShort == "ja_jp" ) {
-                languageSelectionComboBox->setItemText( i, tr("Japanese") );
+                _settingsDialogForm->languageSelectionComboBox->setItemText( i, tr("Japanese") );
             }
             else if ( languageShort == "ru" ) {
-                languageSelectionComboBox->setItemText( i, tr("Russian") );
+                _settingsDialogForm->languageSelectionComboBox->setItemText( i, tr("Russian") );
             }
             else if ( languageShort == "uk" ) {
-                languageSelectionComboBox->setItemText( i, tr("Ukrainian") );
+                _settingsDialogForm->languageSelectionComboBox->setItemText( i, tr("Ukrainian") );
             }
             else {
-                languageSelectionComboBox->setItemText( i, tr("Unknown language mnemonic ") + languageShort );
+                _settingsDialogForm->languageSelectionComboBox->setItemText( i, tr("Unknown language mnemonic ") + languageShort );
             }
         }
     }
--- a/src/UiGuiSettingsDialog.h	Sat Oct 02 12:48:56 2010 +0000
+++ b/src/UiGuiSettingsDialog.h	Thu Oct 14 19:52:47 2010 +0000
@@ -21,15 +21,19 @@
 #define UIGUISETTINGSDIALOG_H
 
 #include <QDialog>
-#include "ui_UiGuiSettingsDialog.h"
-#include "UiGuiSettings.h"
 
-class UiGuiSettingsDialog : public QDialog, private Ui::SettingsDialog
+namespace Ui {
+	class SettingsDialog;
+}
+class UiGuiSettings;
+
+
+class UiGuiSettingsDialog : public QDialog
 {
     Q_OBJECT
 
 public:
-    UiGuiSettingsDialog(QWidget* parent, UiGuiSettings* settings);
+    UiGuiSettingsDialog(QWidget* parent, QSharedPointer<UiGuiSettings> settings);
 
 public slots:
     int showDialog();
@@ -38,10 +42,12 @@
     void writeWidgetValuesToSettings();
 
 private:
+	Ui::SettingsDialog *_settingsDialogForm;
+
     void changeEvent(QEvent *event);
     void initTranslationSelection();
 
-    UiGuiSettings* settings;
+    QSharedPointer<UiGuiSettings> _settings;
 };
 
 #endif // UIGUISETTINGSDIALOG_H
--- a/src/UiGuiSystemInfo.h	Sat Oct 02 12:48:56 2010 +0000
+++ b/src/UiGuiSystemInfo.h	Thu Oct 14 19:52:47 2010 +0000
@@ -22,12 +22,14 @@
 
 class QString;
 
+
 class UiGuiSystemInfo
 {
+public:
+    static QString getOperatingSystem();
+
 private:
     UiGuiSystemInfo();
-public:
-    static QString getOperatingSystem();
 };
 
 #endif // UIGUISYSTEMINFO_H
--- a/src/UpdateCheckDialog.cpp	Sat Oct 02 12:48:56 2010 +0000
+++ b/src/UpdateCheckDialog.cpp	Thu Oct 14 19:52:47 2010 +0000
@@ -18,12 +18,16 @@
  ***************************************************************************/
 
 #include "UpdateCheckDialog.h"
+#include "ui_UpdateCheckDialog.h"
 
+#include "UiGuiSettings.h"
 #include "UiGuiVersion.h"
 
+#include <QMessageBox>
 #include <QDesktopServices>
 #include <QNetworkAccessManager>
 #include <QTimer>
+#include <QDate>
 #include <QUrl>
 #include <QRegExpValidator>
 #include <QNetworkRequest>
@@ -37,29 +41,30 @@
 */
 
 /*!
-    \brief Initializes member variables and stores the version of UiGui and a pointer to the settings object.
+    \brief Initializes member variables and stores the version of UiGui and a pointer to the _settings object.
  */
-UpdateCheckDialog::UpdateCheckDialog(UiGuiSettings *settings, QWidget *parent) : QDialog(parent),
-    manualUpdateRequested(false),
-    currentNetworkReply(NULL),
-    roleOfClickedButton(QDialogButtonBox::InvalidRole)
+UpdateCheckDialog::UpdateCheckDialog(QSharedPointer<UiGuiSettings> settings, QWidget *parent) : QDialog(parent),
+    _manualUpdateRequested(false),
+    _currentNetworkReply(NULL),
+    _roleOfClickedButton(QDialogButtonBox::InvalidRole)
 {
-    setupUi(this);
+	_updateCheckDialogForm = new Ui::UpdateCheckDialog();
+    _updateCheckDialogForm->setupUi(this);
 
-    // Create object for networkAccessManager request and connect it with the request return handler.
-    networkAccessManager = new QNetworkAccessManager(this);
-    connect( networkAccessManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(checkResultsOfFetchedPadXMLFile(QNetworkReply*)) );
+    // Create object for _networkAccessManager request and connect it with the request return handler.
+    _networkAccessManager = new QNetworkAccessManager(this);
+    connect( _networkAccessManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(checkResultsOfFetchedPadXMLFile(QNetworkReply*)) );
 
     // Create a timer object used for the progress bar.
-    updateCheckProgressTimer = new QTimer(this);
-    updateCheckProgressTimer->setInterval(5);
-    connect( updateCheckProgressTimer, SIGNAL(timeout()), this, SLOT(updateUpdateCheckProgressBar()) );
-    updateCheckProgressCounter = 0;
+    _updateCheckProgressTimer = new QTimer(this);
+    _updateCheckProgressTimer->setInterval(5);
+    connect( _updateCheckProgressTimer, SIGNAL(timeout()), this, SLOT(updateUpdateCheckProgressBar()) );
+    _updateCheckProgressCounter = 0;
 
     // Connect the dialogs buttonbox with a button click handler.
-    connect( buttonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(handleUpdateCheckDialogButtonClicked(QAbstractButton*)) );
+    connect( _updateCheckDialogForm->buttonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(handleUpdateCheckDialogButtonClicked(QAbstractButton*)) );
 
-    this->settings = settings;
+    _settings = settings;
 
     // This dialog is always modal.
     setModal(true);
@@ -70,9 +75,9 @@
     \brief On destroy cancels any currently running network request.
  */
 UpdateCheckDialog::~UpdateCheckDialog() {
-    disconnect( networkAccessManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(checkResultsOfFetchedPadXMLFile(QNetworkReply*)) );
-    if (currentNetworkReply != NULL)
-        currentNetworkReply->abort();
+    disconnect( _networkAccessManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(checkResultsOfFetchedPadXMLFile(QNetworkReply*)) );
+    if (_currentNetworkReply != NULL)
+        _currentNetworkReply->abort();
 }
 
 
@@ -83,7 +88,7 @@
     a modal progress indicator dialog will be shown.
  */
 void UpdateCheckDialog::checkForUpdateAndShowDialog() {
-    manualUpdateRequested = true;
+    _manualUpdateRequested = true;
     getPadXMLFile();
     showCheckingForUpdateDialog();
 }
@@ -96,7 +101,7 @@
     gets not interrupted by a dialog box.
  */
 void UpdateCheckDialog::checkForUpdate() {
-    manualUpdateRequested = false;
+    _manualUpdateRequested = false;
     getPadXMLFile();
 }
 
@@ -105,9 +110,9 @@
     \brief This function tries to download the UniversalIndentGui pad file from the SourceForge server.
  */
 void UpdateCheckDialog::getPadXMLFile() {
-    //networkAccessManager->setHost("universalindent.sourceforge.net");
-    //networkAccessManager->get("/universalindentgui_pad.xml");
-    currentNetworkReply = networkAccessManager->get(QNetworkRequest(QUrl("http://universalindent.sourceforge.net/universalindentgui_pad.xml")));
+    //_networkAccessManager->setHost("universalindent.sourceforge.net");
+    //_networkAccessManager->get("/universalindentgui_pad.xml");
+    _currentNetworkReply = _networkAccessManager->get(QNetworkRequest(QUrl("http://universalindent.sourceforge.net/universalindentgui_pad.xml")));
 }
 
 
@@ -120,10 +125,10 @@
     check, a message box with the error will be displayed.
  */
 void UpdateCheckDialog::checkResultsOfFetchedPadXMLFile(QNetworkReply *networkReply) {
-    Q_ASSERT(currentNetworkReply == networkReply);
+    Q_ASSERT(_currentNetworkReply == networkReply);
 
     // Stop the progress bar timer.
-    updateCheckProgressTimer->stop();
+    _updateCheckProgressTimer->stop();
 
     if ( networkReply->error() == QNetworkReply::NoError ) {
         // Try to find the version string.
@@ -146,15 +151,15 @@
                 showNewVersionAvailableDialog(returnedString);
 
                 // If yes clicked, open the download url in the default browser.
-                if ( roleOfClickedButton == QDialogButtonBox::YesRole ) {
-                    QDesktopServices::openUrl( QUrl("networkAccessManager://sourceforge.net/project/showfiles.php?group_id=167482") );
+                if ( _roleOfClickedButton == QDialogButtonBox::YesRole ) {
+                    QDesktopServices::openUrl( QUrl("_networkAccessManager://sourceforge.net/project/showfiles.php?group_id=167482") );
                 }
             }
-            else if ( manualUpdateRequested ) {
+            else if ( _manualUpdateRequested ) {
                 showNoNewVersionAvailableDialog();
             }
             // Set last update check date.
-            settings->setValueByName("LastUpdateCheck", QDate::currentDate());
+            _settings->setValueByName("LastUpdateCheck", QDate::currentDate());
         }
         // In the returned string, the version string could not be found.
         else {
@@ -162,12 +167,12 @@
         }
     }
     // If there was some error while trying to retrieve the update info from server and not cancel was pressed.
-    else if ( roleOfClickedButton != QDialogButtonBox::RejectRole ) {
+    else if ( _roleOfClickedButton != QDialogButtonBox::RejectRole ) {
         QMessageBox::warning(this, tr("Update check error"), tr("There was an error while trying to check for an update! Error was : %1").arg(networkReply->errorString()) );
     }
-    manualUpdateRequested = false;
+    _manualUpdateRequested = false;
     networkReply->deleteLater();
-    currentNetworkReply = NULL;
+    _currentNetworkReply = NULL;
 }
 
 
@@ -180,15 +185,15 @@
  */
 void UpdateCheckDialog::showCheckingForUpdateDialog() {
     // Reset the progress bar.
-    updateCheckProgressCounter = 0;
-    progressBar->setValue(updateCheckProgressCounter);
-    progressBar->setInvertedAppearance( false );
+    _updateCheckProgressCounter = 0;
+    _updateCheckDialogForm->progressBar->setValue(_updateCheckProgressCounter);
+    _updateCheckDialogForm->progressBar->setInvertedAppearance( false );
 
-    updateCheckProgressTimer->start();
-    progressBar->show();
+    _updateCheckProgressTimer->start();
+    _updateCheckDialogForm->progressBar->show();
     setWindowTitle( tr("Checking for update...") );
-    label->setText( tr("Checking whether a newer version is available") );
-    buttonBox->setStandardButtons(QDialogButtonBox::Cancel);
+    _updateCheckDialogForm->label->setText( tr("Checking whether a newer version is available") );
+    _updateCheckDialogForm->buttonBox->setStandardButtons(QDialogButtonBox::Cancel);
     show();
 }
 
@@ -197,10 +202,10 @@
     \brief Displays the dialog with info about the new available version.
  */
 void UpdateCheckDialog::showNewVersionAvailableDialog(QString newVersion) {
-    progressBar->hide();
+    _updateCheckDialogForm->progressBar->hide();
     setWindowTitle( tr("Update available") );
-    label->setText( tr("A newer version of UniversalIndentGUI is available.\nYour version is %1. New version is %2.\nDo you want to go to the download website?").arg(PROGRAM_VERSION_STRING).arg(newVersion) );
-    buttonBox->setStandardButtons(QDialogButtonBox::No|QDialogButtonBox::NoButton|QDialogButtonBox::Yes);
+    _updateCheckDialogForm->label->setText( tr("A newer version of UniversalIndentGUI is available.\nYour version is %1. New version is %2.\nDo you want to go to the download website?").arg(PROGRAM_VERSION_STRING).arg(newVersion) );
+    _updateCheckDialogForm->buttonBox->setStandardButtons(QDialogButtonBox::No|QDialogButtonBox::NoButton|QDialogButtonBox::Yes);
     exec();
 }
 
@@ -209,10 +214,10 @@
     \brief Displays the dialog, that no new version is available.
  */
 void UpdateCheckDialog::showNoNewVersionAvailableDialog() {
-    progressBar->hide();
+    _updateCheckDialogForm->progressBar->hide();
     setWindowTitle( tr("No new update available") );
-    label->setText( tr("You already have the latest version of UniversalIndentGUI.") );
-    buttonBox->setStandardButtons(QDialogButtonBox::Ok);
+    _updateCheckDialogForm->label->setText( tr("You already have the latest version of UniversalIndentGUI.") );
+    _updateCheckDialogForm->buttonBox->setStandardButtons(QDialogButtonBox::Ok);
     exec();
 }
 
@@ -221,19 +226,19 @@
     \brief This slot is called, when a button in the dialog is clicked.
 
     If the clicked button was the cancel button, the user wants to cancel
-    the update check. So the networkAccessManager request is aborted and the timer for the
+    the update check. So the _networkAccessManager request is aborted and the timer for the
     progress bar animation is stopped.
 
     In any case if a button is clicked, the dialog box will be closed.
  */
 void UpdateCheckDialog::handleUpdateCheckDialogButtonClicked(QAbstractButton *clickedButton) {
-    roleOfClickedButton = buttonBox->buttonRole(clickedButton);
+    _roleOfClickedButton = _updateCheckDialogForm->buttonBox->buttonRole(clickedButton);
 
-    if ( roleOfClickedButton == QDialogButtonBox::RejectRole ) {
-        // Abort the networkAccessManager request.
-        currentNetworkReply->abort();
+    if ( _roleOfClickedButton == QDialogButtonBox::RejectRole ) {
+        // Abort the _networkAccessManager request.
+        _currentNetworkReply->abort();
         // Stop the progress bar timer.
-        updateCheckProgressTimer->stop();
+        _updateCheckProgressTimer->stop();
     }
 
     accept();
@@ -245,20 +250,20 @@
  */
 void UpdateCheckDialog::updateUpdateCheckProgressBar() {
     // Depending on the progress bar direction, decrease or increase the progressbar value.
-    if ( progressBar->invertedAppearance() ) {
-        updateCheckProgressCounter--;
+    if ( _updateCheckDialogForm->progressBar->invertedAppearance() ) {
+        _updateCheckProgressCounter--;
     }
     else {
-        updateCheckProgressCounter++;
+        _updateCheckProgressCounter++;
     }
 
     // If the progress bar reaches 0 or 100 as value, swap the animation direction.
-    if ( updateCheckProgressCounter == 0 || updateCheckProgressCounter == 100 ) {
-        progressBar->setInvertedAppearance( !progressBar->invertedAppearance() );
+    if ( _updateCheckProgressCounter == 0 || _updateCheckProgressCounter == 100 ) {
+        _updateCheckDialogForm->progressBar->setInvertedAppearance( !_updateCheckDialogForm->progressBar->invertedAppearance() );
     }
 
     // Update the progress bar value.
-    progressBar->setValue(updateCheckProgressCounter);
+    _updateCheckDialogForm->progressBar->setValue(_updateCheckProgressCounter);
 }
 
 
--- a/src/UpdateCheckDialog.h	Sat Oct 02 12:48:56 2010 +0000
+++ b/src/UpdateCheckDialog.h	Thu Oct 14 19:52:47 2010 +0000
@@ -20,46 +20,53 @@
 #ifndef UPDATECHECKDIALOG_H
 #define UPDATECHECKDIALOG_H
 
-#include <QMessageBox>
+#include <QDialog>
+#include <QDialogButtonBox>
+
+class UiGuiSettings;
+namespace Ui {
+	class UpdateCheckDialog;
+}
+
 class QTimer;
 class QDesktopServices;
 class QNetworkAccessManager;
 class QNetworkReply;
 
-#include "ui_UpdateCheckDialog.h"
-#include "UiGuiSettings.h"
 
-class UpdateCheckDialog : public QDialog, public Ui::UpdateCheckDialog
+class UpdateCheckDialog : public QDialog
 {
     Q_OBJECT
 
 public:
-    UpdateCheckDialog(UiGuiSettings *settings, QWidget *parent=0);
+    UpdateCheckDialog(QSharedPointer<UiGuiSettings> settings, QWidget *parent = NULL);
     ~UpdateCheckDialog();
 
 public slots:
     void checkForUpdateAndShowDialog();
     void checkForUpdate();
 
+private slots:
+    void checkResultsOfFetchedPadXMLFile(QNetworkReply *networkReply);
+    void handleUpdateCheckDialogButtonClicked(QAbstractButton *clickedButton);
+    void updateUpdateCheckProgressBar();
+
 private:
+	Ui::UpdateCheckDialog *_updateCheckDialogForm;
+
     void getPadXMLFile();
     void showCheckingForUpdateDialog();
     void showNewVersionAvailableDialog(QString newVersion);
     void showNoNewVersionAvailableDialog();
-
-    UiGuiSettings *settings;
-    bool manualUpdateRequested;
-    QNetworkAccessManager *networkAccessManager;
-    QNetworkReply *currentNetworkReply;
-    QDialogButtonBox::ButtonRole roleOfClickedButton;
-    QTimer *updateCheckProgressTimer;
-    int updateCheckProgressCounter;
     int convertVersionStringToNumber(QString versionString);
 
-private slots:
-    void checkResultsOfFetchedPadXMLFile(QNetworkReply *networkReply);
-    void handleUpdateCheckDialogButtonClicked(QAbstractButton *clickedButton);
-    void updateUpdateCheckProgressBar();
+    QSharedPointer<UiGuiSettings> _settings;
+    bool _manualUpdateRequested;
+    QNetworkAccessManager *_networkAccessManager;
+    QNetworkReply *_currentNetworkReply;
+    QDialogButtonBox::ButtonRole _roleOfClickedButton;
+    QTimer *_updateCheckProgressTimer;
+    int _updateCheckProgressCounter;
 };
 
 #endif // UPDATECHECKDIALOG_H
--- a/src/main.cpp	Sat Oct 02 12:48:56 2010 +0000
+++ b/src/main.cpp	Thu Oct 14 19:52:47 2010 +0000
@@ -18,7 +18,6 @@
  ***************************************************************************/
 
 #include "MainWindow.h"
-#include <QApplication>
 
 #include "UiGuiIndentServer.h"
 #include "UiGuiLogger.h"
@@ -26,6 +25,11 @@
 #include "UiGuiSettings.h"
 #include "UiGuiVersion.h"
 #include "UiGuiSystemInfo.h"
+#include "IndentHandler.h"
+#include "SettingsPaths.h"
+
+#include <QApplication>
+#include <QTextCodec>
 
 #include <string>
 #include <iostream>
@@ -252,7 +256,7 @@
     delete indentHandler;
 	delete mainWindow;
 
-    UiGuiSettings::deleteInstance();
+    SettingsPaths::cleanAndRemoveTempDir();
     UiGuiLogger::deleteInstance();
 
     return returnValue;