Subversion Repositories Projects

Rev

Rev 159 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
159 KeyOz 1
/***************************************************************************
2
 *   Copyright (C) 2008 by Manuel Schrape                                  *
3
 *   manuel.schrape@gmx.de                                                 *
4
 *                                                                         *
5
 *   This program is free software; you can redistribute it and/or modify  *
6
 *   it under the terms of the GNU General Public License as published by  *
7
 *   the Free Software Foundation; either version 2 of the License.        *
8
 *                                                                         *
9
 *   This program is distributed in the hope that it will be useful,       *
10
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
11
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
12
 *   GNU General Public License for more details.                          *
13
 *                                                                         *
14
 *   You should have received a copy of the GNU General Public License     *
15
 *   along with this program; if not, write to the                         *
16
 *   Free Software Foundation, Inc.,                                       *
17
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
18
 ***************************************************************************/
19
#include "dlg_Preferences.h"
20
 
21
dlg_Preferences::dlg_Preferences(QWidget *parent) : QDialog(parent)
22
{
23
    setupUi(this);
163 KeyOz 24
    connect(pb_DIR_CVS,   SIGNAL(clicked()), this, SLOT(slot_DIR_CVS()));
25
    connect(pb_DIR_SET,   SIGNAL(clicked()), this, SLOT(slot_DIR_SET()));
159 KeyOz 26
}
27
 
163 KeyOz 28
void dlg_Preferences::set_Settings(cSettings *Set)
29
{
30
    Settings = Set;
159 KeyOz 31
 
163 KeyOz 32
    le_DIR_CVS->setText(Settings->DIR.Logging);
33
    le_DIR_SET->setText(Settings->DIR.Parameter);
34
}
35
 
36
cSettings *dlg_Preferences::get_Settings()
37
{
38
    return Settings;
39
}
40
 
41
// Configuration -> Verzeichnisse
42
/////////////////////////////////
43
void dlg_Preferences::slot_DIR_CVS()
44
{
45
    QString directory = QFileDialog::getExistingDirectory(this, "Verzeichniss fuer CSV-Logdateien", Settings->DIR.Logging, QFileDialog::DontResolveSymlinks | QFileDialog::ShowDirsOnly);
46
 
47
    if ((!directory.isEmpty()) && (Settings->DIR.Logging != directory))
48
    {
49
        Settings->DIR.Logging = directory;
50
        le_DIR_CVS->setText(Settings->DIR.Logging);
51
//        Settings->write_Settings();
52
    }
53
}
54
 
55
void dlg_Preferences::slot_DIR_SET()
56
{
57
    QString directory = QFileDialog::getExistingDirectory(this, "Verzeichniss fuer Settings-Dateien", Settings->DIR.Parameter, QFileDialog::DontResolveSymlinks | QFileDialog::ShowDirsOnly);
58
 
59
    if ((!directory.isEmpty()) && (Settings->DIR.Parameter != directory))
60
    {
61
        Settings->DIR.Parameter = directory;
62
        le_DIR_SET->setText(Settings->DIR.Parameter);
63
//        Settings->write_Settings();
64
    }
65
 
66
}
159 KeyOz 67
dlg_Preferences::~dlg_Preferences()
68
{
69
}
70
 
71