# HG changeset patch # User Teemu Piippo # Date 1374015318 -10800 # Node ID 3c23aa03190d3f1054c6de324868b37d508b8050 # Parent d0b278fd29d5ea097d15c34c8e895c0dd1f3ae7c SEPARATORS diff -r d0b278fd29d5 -r 3c23aa03190d src/config.cpp --- a/src/config.cpp Wed Jul 17 01:53:57 2013 +0300 +++ b/src/config.cpp Wed Jul 17 01:55:18 2013 +0300 @@ -2,6 +2,8 @@ #include "config.h" #include "ui_configbox.h" +// ============================================================================= +// ----------------------------------------------------------------------------- ConfigBox::ConfigBox( QWidget* parent, Qt::WindowFlags f ) : QDialog( parent, f ) { ui = new Ui_ConfigBox; ui->setupUi( this ); @@ -13,10 +15,14 @@ connect( ui->wad_del, SIGNAL( clicked() ), this, SLOT( delPath() )); } +// ============================================================================= +// ----------------------------------------------------------------------------- ConfigBox::~ConfigBox() { delete ui; } +// ============================================================================= +// ----------------------------------------------------------------------------- void ConfigBox::initFromSettings() { ui->wad_pathsList->clear(); @@ -25,15 +31,21 @@ addPath( it.toString() ); } +// ============================================================================= +// ----------------------------------------------------------------------------- void ConfigBox::addPath() { addPath( ui->wad_pathEntry->text() ); ui->wad_pathEntry->clear(); } +// ============================================================================= +// ----------------------------------------------------------------------------- void ConfigBox::addPath( str path ) { ui->wad_pathsList->addItem( path ); } +// ============================================================================= +// ----------------------------------------------------------------------------- void ConfigBox::findPath() { str path = QFileDialog::getExistingDirectory( this ); if( path.isEmpty() ) @@ -42,6 +54,8 @@ ui->wad_pathEntry->setText( path ); } +// ============================================================================= +// ----------------------------------------------------------------------------- void ConfigBox::delPath() { delete ui->wad_pathsList->currentItem(); }