Diffstat (limited to 'noncore/apps/confedit/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/confedit/mainwindow.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/noncore/apps/confedit/mainwindow.cpp b/noncore/apps/confedit/mainwindow.cpp index 58538af..4fe45ba 100644 --- a/noncore/apps/confedit/mainwindow.cpp +++ b/noncore/apps/confedit/mainwindow.cpp | |||
@@ -1,68 +1,62 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | * * | 2 | * * |
3 | * This program is free software; you can redistribute it and/or modify * | 3 | * This program is free software; you can redistribute it and/or modify * |
4 | * it under the terms of the GNU General Public License as published by * | 4 | * it under the terms of the GNU General Public License as published by * |
5 | * the Free Software Foundation; either version 2 of the License, or * | 5 | * the Free Software Foundation; either version 2 of the License, or * |
6 | * (at your option) any later version. * | 6 | * (at your option) any later version. * |
7 | * * | 7 | * * |
8 | ***************************************************************************/ | 8 | ***************************************************************************/ |
9 | 9 | ||
10 | // (c) 2002 Patrick S. Vogt <tille@handhelds.org> | 10 | // (c) 2002 Patrick S. Vogt <tille@handhelds.org> |
11 | 11 | ||
12 | 12 | ||
13 | #include "mainwindow.h" | 13 | #include "mainwindow.h" |
14 | 14 | ||
15 | #include <opie2/omenubar.h> | ||
16 | #include <opie2/omessagebox.h> | ||
17 | #include <opie2/oresource.h> | ||
18 | #include <opie2/oconfig.h> | ||
19 | #include <opie2/otoolbar.h> | ||
20 | #include <opie2/oapplication.h> | ||
21 | #include <qaction.h> | 15 | #include <qaction.h> |
22 | #include <qmessagebox.h> | 16 | #include <qmessagebox.h> |
23 | #include <qpopupmenu.h> | 17 | #include <qpopupmenu.h> |
24 | #include <qtoolbutton.h> | 18 | #include <qtoolbutton.h> |
25 | #include <qstring.h> | 19 | #include <qstring.h> |
26 | #include <qlabel.h> | 20 | #include <qlabel.h> |
27 | #include <qfile.h> | 21 | #include <qfile.h> |
28 | #include <qpushbutton.h> | 22 | #include <qpushbutton.h> |
29 | #include <qlayout.h> | 23 | #include <qlayout.h> |
30 | #include <qlineedit.h> | 24 | #include <qlineedit.h> |
31 | #include <qcursor.h> | 25 | #include <qcursor.h> |
32 | 26 | ||
33 | #include "listviewconfdir.h" | 27 | #include "listviewconfdir.h" |
34 | #include "listviewitemconf.h" | 28 | #include "listviewitemconf.h" |
35 | #include "listviewitemconfigentry.h" | 29 | #include "listviewitemconfigentry.h" |
36 | 30 | ||
37 | 31 | ||
38 | MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) : | 32 | MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) : |
39 | QMainWindow( parent, name, f ), _currentItem(0), _fileItem(0) | 33 | QMainWindow( parent, name, f ), _currentItem(0), _fileItem(0) |
40 | { | 34 | { |
41 | setCaption( tr("Conf File Editor") ); | 35 | setCaption( tr("Conf File Editor") ); |
42 | 36 | ||
43 | //setBaseSize( qApp->globalStrut() ); | 37 | //setBaseSize( qApp->globalStrut() ); |
44 | setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));//, sizePolicy().hasHeightForWidth() ) ); | 38 | setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));//, sizePolicy().hasHeightForWidth() ) ); |
45 | 39 | ||
46 | mainLayout = new QVBoxLayout( this ); | 40 | mainLayout = new QVBoxLayout( this ); |
47 | mainLayout->setSpacing( 0 ); | 41 | mainLayout->setSpacing( 0 ); |
48 | mainLayout->setMargin( 0 ); | 42 | mainLayout->setMargin( 0 ); |
49 | 43 | ||
50 | 44 | ||
51 | qDebug("creating settingList"); | 45 | qDebug("creating settingList"); |
52 | settingList = new ListViewConfDir( QDir::homeDirPath() + "/Settings", this, "settingslist"); | 46 | settingList = new ListViewConfDir( QDir::homeDirPath() + "/Settings", this, "settingslist"); |
53 | settingList->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));//, sizePolicy().hasHeightForWidth() ) ); | 47 | settingList->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));//, sizePolicy().hasHeightForWidth() ) ); |
54 | mainLayout->addWidget( settingList, 0); | 48 | mainLayout->addWidget( settingList, 0); |
55 | 49 | ||
56 | qDebug("creating editor"); | 50 | qDebug("creating editor"); |
57 | editor = new EditWidget(this); | 51 | editor = new EditWidget(this); |
58 | editor->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Maximum));//, sizePolicy().hasHeightForWidth() ) ); | 52 | editor->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Maximum));//, sizePolicy().hasHeightForWidth() ) ); |
59 | mainLayout->addWidget( editor, 1 ); | 53 | mainLayout->addWidget( editor, 1 ); |
60 | editor->layoutType( ListViewItemConf::File ); | 54 | editor->layoutType( ListViewItemConf::File ); |
61 | 55 | ||
62 | makeMenu(); | 56 | makeMenu(); |
63 | 57 | ||
64 | connect(settingList, SIGNAL( pressed(QListViewItem*) ), | 58 | connect(settingList, SIGNAL( pressed(QListViewItem*) ), |
65 | this, SLOT(setCurrent(QListViewItem*))); | 59 | this, SLOT(setCurrent(QListViewItem*))); |
66 | connect( settingList, SIGNAL( clicked( QListViewItem* ) ), | 60 | connect( settingList, SIGNAL( clicked( QListViewItem* ) ), |
67 | this, SLOT( stopTimer( QListViewItem* ) ) ); | 61 | this, SLOT( stopTimer( QListViewItem* ) ) ); |
68 | 62 | ||