|
a/src/qtgui/confgui/confgui.cpp |
|
b/src/qtgui/confgui/confgui.cpp |
|
... |
|
... |
20 |
|
20 |
|
21 |
#include <qglobal.h>
|
21 |
#include <qglobal.h>
|
22 |
#include <QHBoxLayout>
|
22 |
#include <QHBoxLayout>
|
23 |
#include <QVBoxLayout>
|
23 |
#include <QVBoxLayout>
|
24 |
#include <QFrame>
|
24 |
#include <QFrame>
|
25 |
#include <QFileDialog>
|
|
|
26 |
#include <QListWidget>
|
25 |
#include <QListWidget>
|
27 |
|
26 |
|
28 |
#include <qobject.h>
|
27 |
#include <qobject.h>
|
29 |
#include <qlayout.h>
|
28 |
#include <qlayout.h>
|
30 |
#include <qsize.h>
|
29 |
#include <qsize.h>
|
|
... |
|
... |
41 |
|
40 |
|
42 |
#include "confgui.h"
|
41 |
#include "confgui.h"
|
43 |
#include "smallut.h"
|
42 |
#include "smallut.h"
|
44 |
#include "debuglog.h"
|
43 |
#include "debuglog.h"
|
45 |
#include "rcldb.h"
|
44 |
#include "rcldb.h"
|
|
|
45 |
#include "guiutils.h"
|
46 |
|
46 |
|
47 |
#include <list>
|
47 |
#include <list>
|
48 |
using std::list;
|
48 |
using std::list;
|
49 |
|
49 |
|
50 |
namespace confgui {
|
50 |
namespace confgui {
|
|
... |
|
... |
265 |
m_le->setText(QString::fromLocal8Bit(s.c_str()));
|
265 |
m_le->setText(QString::fromLocal8Bit(s.c_str()));
|
266 |
}
|
266 |
}
|
267 |
|
267 |
|
268 |
void ConfParamFNW::showBrowserDialog()
|
268 |
void ConfParamFNW::showBrowserDialog()
|
269 |
{
|
269 |
{
|
270 |
QString s = m_isdir ?
|
270 |
QString s = myGetFileName(m_isdir);
|
271 |
QFileDialog::getExistingDirectory() : QFileDialog::getSaveFileName();
|
|
|
272 |
if (!s.isEmpty())
|
271 |
if (!s.isEmpty())
|
273 |
m_le->setText(s);
|
272 |
m_le->setText(s);
|
274 |
}
|
273 |
}
|
275 |
|
274 |
|
276 |
class SmallerListWidget: public QListWidget
|
275 |
class SmallerListWidget: public QListWidget
|
277 |
{
|
276 |
{
|
278 |
public:
|
277 |
public:
|
|
... |
|
... |
398 |
}
|
397 |
}
|
399 |
|
398 |
|
400 |
// "Add entry" dialog for a file name list
|
399 |
// "Add entry" dialog for a file name list
|
401 |
void ConfParamDNLW::showInputDialog()
|
400 |
void ConfParamDNLW::showInputDialog()
|
402 |
{
|
401 |
{
|
403 |
QString s = QFileDialog::getExistingDirectory();
|
402 |
QString s = myGetFileName(true);
|
404 |
if (!s.isEmpty()) {
|
403 |
if (!s.isEmpty()) {
|
405 |
QList<QListWidgetItem *>items =
|
404 |
QList<QListWidgetItem *>items =
|
406 |
m_lb->findItems(s, Qt::MatchFixedString|Qt::MatchCaseSensitive);
|
405 |
m_lb->findItems(s, Qt::MatchFixedString|Qt::MatchCaseSensitive);
|
407 |
if (items.empty()) {
|
406 |
if (items.empty()) {
|
408 |
m_lb->insertItem(0, s);
|
407 |
m_lb->insertItem(0, s);
|