-rw-r--r-- | noncore/apps/confedit/mainwindow.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/apps/confedit/mainwindow.cpp b/noncore/apps/confedit/mainwindow.cpp index c91c846..e7db86a 100644 --- a/noncore/apps/confedit/mainwindow.cpp +++ b/noncore/apps/confedit/mainwindow.cpp | |||
@@ -12,64 +12,65 @@ | |||
12 | 12 | ||
13 | #include "mainwindow.h" | 13 | #include "mainwindow.h" |
14 | 14 | ||
15 | #include <qpe/qpemenubar.h> | 15 | #include <qpe/qpemenubar.h> |
16 | #include <qpe/qpemessagebox.h> | 16 | #include <qpe/qpemessagebox.h> |
17 | #include <qpe/resource.h> | 17 | #include <qpe/resource.h> |
18 | #include <qpe/config.h> | 18 | #include <qpe/config.h> |
19 | #include <qpe/qpetoolbar.h> | 19 | #include <qpe/qpetoolbar.h> |
20 | #include <qpe/qpeapplication.h> | 20 | #include <qpe/qpeapplication.h> |
21 | #include <qaction.h> | 21 | #include <qaction.h> |
22 | #include <qmessagebox.h> | 22 | #include <qmessagebox.h> |
23 | #include <qpopupmenu.h> | 23 | #include <qpopupmenu.h> |
24 | #include <qtoolbutton.h> | 24 | #include <qtoolbutton.h> |
25 | #include <qstring.h> | 25 | #include <qstring.h> |
26 | #include <qlabel.h> | 26 | #include <qlabel.h> |
27 | #include <qfile.h> | 27 | #include <qfile.h> |
28 | #include <qpushbutton.h> | 28 | #include <qpushbutton.h> |
29 | #include <qlayout.h> | 29 | #include <qlayout.h> |
30 | #include <qlineedit.h> | 30 | #include <qlineedit.h> |
31 | 31 | ||
32 | #include "listviewconfdir.h" | 32 | #include "listviewconfdir.h" |
33 | #include "listviewitemconf.h" | 33 | #include "listviewitemconf.h" |
34 | #include "listviewitemconfigentry.h" | 34 | #include "listviewitemconfigentry.h" |
35 | 35 | ||
36 | #include <stdlib.h> | ||
36 | 37 | ||
37 | MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) : | 38 | MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) : |
38 | QDialog( parent, name, f ), _currentItem(0), _fileItem(0) | 39 | QDialog( parent, name, f ), _currentItem(0), _fileItem(0) |
39 | { | 40 | { |
40 | setCaption( tr("Conf File Editor") ); | 41 | setCaption( tr("Conf File Editor") ); |
41 | 42 | ||
42 | //setBaseSize( qApp->globalStrut() ); | 43 | //setBaseSize( qApp->globalStrut() ); |
43 | setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));//, sizePolicy().hasHeightForWidth() ) ); | 44 | setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));//, sizePolicy().hasHeightForWidth() ) ); |
44 | 45 | ||
45 | mainLayout = new QVBoxLayout( this ); | 46 | mainLayout = new QVBoxLayout( this ); |
46 | mainLayout->setSpacing( 0 ); | 47 | mainLayout->setSpacing( 0 ); |
47 | mainLayout->setMargin( 0 ); | 48 | mainLayout->setMargin( 0 ); |
48 | 49 | ||
49 | 50 | ||
50 | qDebug("creating settingList"); | 51 | qDebug("creating settingList"); |
51 | settingList = new ListViewConfDir( "/root/Settings/", this, "settingslist"); | 52 | settingList = new ListViewConfDir( QString(getenv("HOME")) + "/Settings", this, "settingslist"); |
52 | settingList->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));//, sizePolicy().hasHeightForWidth() ) ); | 53 | settingList->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));//, sizePolicy().hasHeightForWidth() ) ); |
53 | mainLayout->addWidget( settingList, 0); | 54 | mainLayout->addWidget( settingList, 0); |
54 | 55 | ||
55 | qDebug("creating editor"); | 56 | qDebug("creating editor"); |
56 | editor = new EditWidget(this); | 57 | editor = new EditWidget(this); |
57 | editor->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Maximum));//, sizePolicy().hasHeightForWidth() ) ); | 58 | editor->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Maximum));//, sizePolicy().hasHeightForWidth() ) ); |
58 | mainLayout->addWidget( editor, 1 ); | 59 | mainLayout->addWidget( editor, 1 ); |
59 | editor->layoutType( ListViewItemConf::File ); | 60 | editor->layoutType( ListViewItemConf::File ); |
60 | 61 | ||
61 | makeMenu(); | 62 | makeMenu(); |
62 | 63 | ||
63 | connect(settingList, SIGNAL( pressed(QListViewItem*) ), | 64 | connect(settingList, SIGNAL( pressed(QListViewItem*) ), |
64 | this, SLOT(setCurrent(QListViewItem*))); | 65 | this, SLOT(setCurrent(QListViewItem*))); |
65 | connect( settingList, SIGNAL( clicked( QListViewItem* ) ), | 66 | connect( settingList, SIGNAL( clicked( QListViewItem* ) ), |
66 | this, SLOT( stopTimer( QListViewItem* ) ) ); | 67 | this, SLOT( stopTimer( QListViewItem* ) ) ); |
67 | 68 | ||
68 | connect( editor->LineEditGroup, SIGNAL( textChanged(const QString&) ), | 69 | connect( editor->LineEditGroup, SIGNAL( textChanged(const QString&) ), |
69 | SLOT( groupChanged(const QString&) ) ); | 70 | SLOT( groupChanged(const QString&) ) ); |
70 | connect( editor->LineEditKey, SIGNAL( textChanged(const QString&) ), | 71 | connect( editor->LineEditKey, SIGNAL( textChanged(const QString&) ), |
71 | SLOT( keyChanged(const QString&) ) ); | 72 | SLOT( keyChanged(const QString&) ) ); |
72 | connect( editor->LineEditValue, SIGNAL( textChanged(const QString&) ), | 73 | connect( editor->LineEditValue, SIGNAL( textChanged(const QString&) ), |
73 | SLOT( valueChanged(const QString&) ) ); | 74 | SLOT( valueChanged(const QString&) ) ); |
74 | 75 | ||
75 | setCurrent(0); | 76 | setCurrent(0); |