Subversion Repositories Projects

Rev

Rev 272 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 272 Rev 306
Line 19... Line 19...
19
#include "dlg_Preferences.h"
19
#include "dlg_Preferences.h"
Line 20... Line 20...
20
 
20
 
21
dlg_Preferences::dlg_Preferences(QWidget *parent) : QDialog(parent)
21
dlg_Preferences::dlg_Preferences(QWidget *parent) : QDialog(parent)
22
{
22
{
23
    setupUi(this);
23
    setupUi(this);
24
    connect(pb_DIR_CVS,   SIGNAL(clicked()), this, SLOT(slot_DIR_CVS()));
24
    connect(pb_DIR_CVS,      SIGNAL(clicked()), this, SLOT(slot_DIR_CVS()));
-
 
25
    connect(pb_DIR_SET,      SIGNAL(clicked()), this, SLOT(slot_DIR_SET()));
-
 
26
    connect(pb_DIR_CACHE,    SIGNAL(clicked()), this, SLOT(slot_DIR_CACHE()));
25
    connect(pb_DIR_SET,   SIGNAL(clicked()), this, SLOT(slot_DIR_SET()));
27
    connect(pb_PATH_AVRDUDE, SIGNAL(clicked()), this, SLOT(slot_PATH_AVRDUDE()));
Line 26... Line 28...
26
}
28
}
27
 
29
 
28
void dlg_Preferences::set_Settings(cSettings *Set)
30
void dlg_Preferences::set_Settings(cSettings *Set)
Line 29... Line 31...
29
{
31
{
30
    Settings = Set;
32
    Settings = Set;
-
 
33
 
-
 
34
    le_DIR_CVS->setText(Settings->DIR.Logging);
31
 
35
    le_DIR_SET->setText(Settings->DIR.Parameter);
32
    le_DIR_CVS->setText(Settings->DIR.Logging);
36
    le_DIR_CACHE->setText(Settings->DIR.Cache);
33
    le_DIR_SET->setText(Settings->DIR.Parameter);
37
    le_PATH_AVRDUDE->setText(Settings->DIR.AVRDUDE);
34
    le_TTY->setText(Settings->TTY.Port);
38
    le_TTY->setText(Settings->TTY.Port);
35
    sp_Plotter_Count->setValue(Settings->Data.Plotter_Count);
39
    sp_Plotter_Count->setValue(Settings->Data.Plotter_Count);
Line 77... Line 81...
77
 
81
 
78
    if ((!directory.isEmpty()) && (Settings->DIR.Logging != directory))
82
    if ((!directory.isEmpty()) && (Settings->DIR.Logging != directory))
79
    {
83
    {
80
        Settings->DIR.Logging = directory;
84
        Settings->DIR.Logging = directory;
81
        le_DIR_CVS->setText(Settings->DIR.Logging);
-
 
82
//        Settings->write_Settings();
85
        le_DIR_CVS->setText(Settings->DIR.Logging);
83
    }
86
    }
Line 84... Line 87...
84
}
87
}
85
 
88
 
Line 89... Line 92...
89
 
92
 
90
    if ((!directory.isEmpty()) && (Settings->DIR.Parameter != directory))
93
    if ((!directory.isEmpty()) && (Settings->DIR.Parameter != directory))
91
    {
94
    {
92
        Settings->DIR.Parameter = directory;
95
        Settings->DIR.Parameter = directory;
93
        le_DIR_SET->setText(Settings->DIR.Parameter);
-
 
94
//        Settings->write_Settings();
96
        le_DIR_SET->setText(Settings->DIR.Parameter);
Line 95... Line 97...
95
    }
97
    }
-
 
98
 
-
 
99
}
-
 
100
void dlg_Preferences::slot_DIR_CACHE()
-
 
101
{
-
 
102
    QString directory = QFileDialog::getExistingDirectory(this, trUtf8("Verzeichniss für Karten-Cache"), Settings->DIR.Cache, QFileDialog::DontResolveSymlinks | QFileDialog::ShowDirsOnly);
-
 
103
 
-
 
104
    if ((!directory.isEmpty()) && (Settings->DIR.Cache != directory))
-
 
105
    {
-
 
106
        Settings->DIR.Cache = directory;
-
 
107
        le_DIR_CACHE->setText(Settings->DIR.Cache);
-
 
108
    }
-
 
109
}
-
 
110
 
-
 
111
void dlg_Preferences::slot_PATH_AVRDUDE()
-
 
112
{
-
 
113
    QString directory = QFileDialog::getOpenFileName(this, trUtf8("Pfad zu AVRDUDE"), Settings->DIR.AVRDUDE, tr("AVRDUDE (*)"));
-
 
114
 
-
 
115
 
-
 
116
    if ((!directory.isEmpty()) && (Settings->DIR.AVRDUDE != directory))
-
 
117
    {
-
 
118
        Settings->DIR.AVRDUDE = directory;
-
 
119
        le_PATH_AVRDUDE->setText(Settings->DIR.AVRDUDE);
Line 96... Line 120...
96
 
120
    }
97
}
121
}
98
 
122