-rw-r--r-- | noncore/apps/tableviewer/db/common.cpp | 2 | ||||
-rw-r--r-- | noncore/apps/tableviewer/db/csvsource.cpp | 1 | ||||
-rw-r--r-- | noncore/apps/tableviewer/ui/commonwidgets.cpp | 6 | ||||
-rw-r--r-- | noncore/apps/tableviewer/ui/tvbrowseview.cpp | 4 | ||||
-rw-r--r-- | noncore/apps/tableviewer/ui/tveditview.cpp | 4 | ||||
-rw-r--r-- | noncore/apps/tableviewer/ui/tvfilterview.cpp | 4 | ||||
-rw-r--r-- | noncore/apps/tableviewer/ui/tvkeyedit.cpp | 4 | ||||
-rw-r--r-- | noncore/apps/tableviewer/ui/tvlistview.cpp | 4 |
8 files changed, 15 insertions, 14 deletions
diff --git a/noncore/apps/tableviewer/db/common.cpp b/noncore/apps/tableviewer/db/common.cpp index 71844a5..dbf9370 100644 --- a/noncore/apps/tableviewer/db/common.cpp +++ b/noncore/apps/tableviewer/db/common.cpp | |||
@@ -670,25 +670,25 @@ bool TVVariant::close(TVVariant n) | |||
670 | return FALSE; | 670 | return FALSE; |
671 | } | 671 | } |
672 | 672 | ||
673 | /*! | 673 | /*! |
674 | \class Key | 674 | \class Key |
675 | \brief document me! | 675 | \brief document me! |
676 | 676 | ||
677 | document me! | 677 | document me! |
678 | */ | 678 | */ |
679 | 679 | ||
680 | Key::Key() : kname(), kexample(), kflags(0) { } | 680 | Key::Key() : kname(), kexample(), kflags(0) { } |
681 | 681 | ||
682 | Key::Key(QString name, TVVariant example, int flags = 0) : | 682 | Key::Key(QString name, TVVariant example, int flags) : |
683 | kname(name), kexample(example), kflags(flags) { } | 683 | kname(name), kexample(example), kflags(flags) { } |
684 | 684 | ||
685 | Key::Key(const Key &other) | 685 | Key::Key(const Key &other) |
686 | { | 686 | { |
687 | kname = other.kname; | 687 | kname = other.kname; |
688 | kexample = other.kexample; | 688 | kexample = other.kexample; |
689 | kflags = other.kflags; | 689 | kflags = other.kflags; |
690 | } | 690 | } |
691 | 691 | ||
692 | Key& Key::operator=(const Key& key) | 692 | Key& Key::operator=(const Key& key) |
693 | { | 693 | { |
694 | kname = key.kname; | 694 | kname = key.kname; |
diff --git a/noncore/apps/tableviewer/db/csvsource.cpp b/noncore/apps/tableviewer/db/csvsource.cpp index 2561b4b..ea36300 100644 --- a/noncore/apps/tableviewer/db/csvsource.cpp +++ b/noncore/apps/tableviewer/db/csvsource.cpp | |||
@@ -89,24 +89,25 @@ QStringList readElem(QString in) | |||
89 | } | 89 | } |
90 | /* we have our current elem */ | 90 | /* we have our current elem */ |
91 | out << elem.stripWhiteSpace(); | 91 | out << elem.stripWhiteSpace(); |
92 | firstChar = TRUE; | 92 | firstChar = TRUE; |
93 | quotedElem = FALSE; | 93 | quotedElem = FALSE; |
94 | /* skip till a , or end of line */ | 94 | /* skip till a , or end of line */ |
95 | while (index < in.length() && in[index] != ',') index++; | 95 | while (index < in.length() && in[index] != ',') index++; |
96 | if(index == in.length()) | 96 | if(index == in.length()) |
97 | return out; | 97 | return out; |
98 | else | 98 | else |
99 | index++; | 99 | index++; |
100 | } | 100 | } |
101 | return out; | ||
101 | } | 102 | } |
102 | 103 | ||
103 | bool DBCsv::openSource(QIODevice *inDev) | 104 | bool DBCsv::openSource(QIODevice *inDev) |
104 | { | 105 | { |
105 | QTextStream tsIn(inDev); | 106 | QTextStream tsIn(inDev); |
106 | QString in = tsIn.readLine().stripWhiteSpace(); | 107 | QString in = tsIn.readLine().stripWhiteSpace(); |
107 | QStringList keys; | 108 | QStringList keys; |
108 | 109 | ||
109 | keys = readElem(in); | 110 | keys = readElem(in); |
110 | 111 | ||
111 | QMap<int,int> keyIndexes; | 112 | QMap<int,int> keyIndexes; |
112 | 113 | ||
diff --git a/noncore/apps/tableviewer/ui/commonwidgets.cpp b/noncore/apps/tableviewer/ui/commonwidgets.cpp index bf4c36f..4c47951 100644 --- a/noncore/apps/tableviewer/ui/commonwidgets.cpp +++ b/noncore/apps/tableviewer/ui/commonwidgets.cpp | |||
@@ -19,25 +19,25 @@ | |||
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include <qlineedit.h> | 21 | #include <qlineedit.h> |
22 | #include <qlayout.h> | 22 | #include <qlayout.h> |
23 | #include <qlabel.h> | 23 | #include <qlabel.h> |
24 | #include <qcombobox.h> | 24 | #include <qcombobox.h> |
25 | 25 | ||
26 | #include <qpe/datebookmonth.h> | 26 | #include <qpe/datebookmonth.h> |
27 | #include <qpopupmenu.h> | 27 | #include <qpopupmenu.h> |
28 | #include <qspinbox.h> | 28 | #include <qspinbox.h> |
29 | #include "commonwidgets.h" | 29 | #include "commonwidgets.h" |
30 | 30 | ||
31 | DateEdit::DateEdit( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ) | 31 | DateEdit::DateEdit( QWidget *parent, const char *name, WFlags f ) |
32 | : QToolButton(parent, name) | 32 | : QToolButton(parent, name) |
33 | { | 33 | { |
34 | QPopupMenu *m1 = new QPopupMenu(this); | 34 | QPopupMenu *m1 = new QPopupMenu(this); |
35 | dateSelector = new DateBookMonth(m1, 0, TRUE); | 35 | dateSelector = new DateBookMonth(m1, 0, TRUE); |
36 | m1->insertItem(dateSelector); | 36 | m1->insertItem(dateSelector); |
37 | setPopup(m1); | 37 | setPopup(m1); |
38 | setPopupDelay(0); | 38 | setPopupDelay(0); |
39 | 39 | ||
40 | connect(dateSelector, SIGNAL(dateClicked(int, int, int)), | 40 | connect(dateSelector, SIGNAL(dateClicked(int, int, int)), |
41 | this, SLOT(subValueChanged())); | 41 | this, SLOT(subValueChanged())); |
42 | 42 | ||
43 | setText(dateSelector->selectedDate().toString()); | 43 | setText(dateSelector->selectedDate().toString()); |
@@ -73,25 +73,25 @@ void DateEdit::clear() | |||
73 | dateSelector->setDate(today.year(), today.month(), today.day()); | 73 | dateSelector->setDate(today.year(), today.month(), today.day()); |
74 | setText(today.toString()); | 74 | setText(today.toString()); |
75 | } | 75 | } |
76 | 76 | ||
77 | void DateEdit::subValueChanged() | 77 | void DateEdit::subValueChanged() |
78 | { | 78 | { |
79 | QDate current = dateSelector->selectedDate(); | 79 | QDate current = dateSelector->selectedDate(); |
80 | 80 | ||
81 | setText(current.toString()); | 81 | setText(current.toString()); |
82 | emit valueChanged(current); | 82 | emit valueChanged(current); |
83 | } | 83 | } |
84 | 84 | ||
85 | TimeEdit::TimeEdit( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ) | 85 | TimeEdit::TimeEdit( QWidget *parent, const char *name, WFlags f ) |
86 | : QWidget(parent, name, f) | 86 | : QWidget(parent, name, f) |
87 | { | 87 | { |
88 | QHBoxLayout *layout = new QHBoxLayout(this, 0); | 88 | QHBoxLayout *layout = new QHBoxLayout(this, 0); |
89 | 89 | ||
90 | layout->addWidget(hourKey = new QSpinBox(1, 12, 1, this)); | 90 | layout->addWidget(hourKey = new QSpinBox(1, 12, 1, this)); |
91 | hourKey->setWrapping(true); | 91 | hourKey->setWrapping(true); |
92 | hourKey->setMinimumWidth(30); | 92 | hourKey->setMinimumWidth(30); |
93 | hourKey->setMaximumWidth(35); | 93 | hourKey->setMaximumWidth(35); |
94 | 94 | ||
95 | layout->addWidget(new QLabel(" : ", this)); | 95 | layout->addWidget(new QLabel(" : ", this)); |
96 | layout->addWidget(minuteKey = new QSpinBox(0, 59, 1, this)); | 96 | layout->addWidget(minuteKey = new QSpinBox(0, 59, 1, this)); |
97 | minuteKey->setWrapping(true); | 97 | minuteKey->setWrapping(true); |
@@ -181,25 +181,25 @@ void TimeEdit::clear() | |||
181 | secondKey->setValue(0); | 181 | secondKey->setValue(0); |
182 | minuteKey->setValue(0); | 182 | minuteKey->setValue(0); |
183 | hourKey->setValue(12); | 183 | hourKey->setValue(12); |
184 | 184 | ||
185 | ampm->setCurrentItem(0); | 185 | ampm->setCurrentItem(0); |
186 | } | 186 | } |
187 | 187 | ||
188 | void TimeEdit::subValueChanged() | 188 | void TimeEdit::subValueChanged() |
189 | { | 189 | { |
190 | emit valueChanged(time()); | 190 | emit valueChanged(time()); |
191 | } | 191 | } |
192 | 192 | ||
193 | IntEdit::IntEdit( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ) | 193 | IntEdit::IntEdit( QWidget *parent, const char *name, WFlags f ) |
194 | : QSpinBox(INT_MIN, INT_MAX, 1, parent, name) | 194 | : QSpinBox(INT_MIN, INT_MAX, 1, parent, name) |
195 | { | 195 | { |
196 | setValue(0); | 196 | setValue(0); |
197 | } | 197 | } |
198 | 198 | ||
199 | 199 | ||
200 | IntEdit::~IntEdit() {} | 200 | IntEdit::~IntEdit() {} |
201 | 201 | ||
202 | int IntEdit::value() | 202 | int IntEdit::value() |
203 | { | 203 | { |
204 | return cleanText().toInt(); | 204 | return cleanText().toInt(); |
205 | } | 205 | } |
diff --git a/noncore/apps/tableviewer/ui/tvbrowseview.cpp b/noncore/apps/tableviewer/ui/tvbrowseview.cpp index 9bfc791..f5f2555 100644 --- a/noncore/apps/tableviewer/ui/tvbrowseview.cpp +++ b/noncore/apps/tableviewer/ui/tvbrowseview.cpp | |||
@@ -28,26 +28,26 @@ | |||
28 | \class TVBrowseView | 28 | \class TVBrowseView |
29 | \brief The widget describing how to draw the browse view user interface | 29 | \brief The widget describing how to draw the browse view user interface |
30 | 30 | ||
31 | This widget allows for the user to browse through the table, one element | 31 | This widget allows for the user to browse through the table, one element |
32 | at a time, or search on a single key. Its main goal is to show a | 32 | at a time, or search on a single key. Its main goal is to show a |
33 | single element in a readable format and make it easy for the user to | 33 | single element in a readable format and make it easy for the user to |
34 | rapidly find specific elements in the table. | 34 | rapidly find specific elements in the table. |
35 | */ | 35 | */ |
36 | 36 | ||
37 | /*! | 37 | /*! |
38 | Constructs a new TVBrowseView widget | 38 | Constructs a new TVBrowseView widget |
39 | */ | 39 | */ |
40 | TVBrowseView::TVBrowseView(TableState *t, QWidget* parent = 0, const char *name = 0, | 40 | TVBrowseView::TVBrowseView(TableState *t, QWidget* parent, const char *name, |
41 | WFlags fl =0) | 41 | WFlags fl ) |
42 | { | 42 | { |
43 | if (!name) | 43 | if (!name) |
44 | setName("BrowseView"); | 44 | setName("BrowseView"); |
45 | 45 | ||
46 | // setSizePolicy(QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding, 0, 0, sizePolicy().hasHeightForWidth() ) ); | 46 | // setSizePolicy(QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding, 0, 0, sizePolicy().hasHeightForWidth() ) ); |
47 | QVBoxLayout *vlayout = new QVBoxLayout(this); | 47 | QVBoxLayout *vlayout = new QVBoxLayout(this); |
48 | textViewDisplay = new QTextBrowser(this, "textViewDisplay"); | 48 | textViewDisplay = new QTextBrowser(this, "textViewDisplay"); |
49 | vlayout->addWidget( textViewDisplay ); | 49 | vlayout->addWidget( textViewDisplay ); |
50 | 50 | ||
51 | keyEntry = new TVBrowseKeyEntry(this, "keyEntry"); | 51 | keyEntry = new TVBrowseKeyEntry(this, "keyEntry"); |
52 | vlayout->addWidget( keyEntry ); | 52 | vlayout->addWidget( keyEntry ); |
53 | 53 | ||
diff --git a/noncore/apps/tableviewer/ui/tveditview.cpp b/noncore/apps/tableviewer/ui/tveditview.cpp index ba2bd06..23e2b42 100644 --- a/noncore/apps/tableviewer/ui/tveditview.cpp +++ b/noncore/apps/tableviewer/ui/tveditview.cpp | |||
@@ -31,26 +31,26 @@ | |||
31 | #include "commonwidgets.h" | 31 | #include "commonwidgets.h" |
32 | 32 | ||
33 | #include <qlayout.h> | 33 | #include <qlayout.h> |
34 | #include <qgrid.h> | 34 | #include <qgrid.h> |
35 | #include <qvbox.h> | 35 | #include <qvbox.h> |
36 | #include <qlineedit.h> | 36 | #include <qlineedit.h> |
37 | #include <qcheckbox.h> | 37 | #include <qcheckbox.h> |
38 | #include <qlist.h> | 38 | #include <qlist.h> |
39 | #include <qlabel.h> | 39 | #include <qlabel.h> |
40 | #include <qscrollview.h> | 40 | #include <qscrollview.h> |
41 | #include <qsignalmapper.h> | 41 | #include <qsignalmapper.h> |
42 | 42 | ||
43 | TVEditView::TVEditView(TableState *s, DataElem *d, QWidget* parent = 0, | 43 | TVEditView::TVEditView(TableState *s, DataElem *d, QWidget* parent, |
44 | const char *name = 0, WFlags fl =0) : QDialog(parent, name, true, fl) | 44 | const char *name, WFlags fl ) : QDialog(parent, name, true, fl) |
45 | { | 45 | { |
46 | if (!name) | 46 | if (!name) |
47 | setName("TVEditView"); | 47 | setName("TVEditView"); |
48 | 48 | ||
49 | QVBoxLayout *layout = new QVBoxLayout(this, 0); /* only so that will resize | 49 | QVBoxLayout *layout = new QVBoxLayout(this, 0); /* only so that will resize |
50 | correctly in other | 50 | correctly in other |
51 | widgets */ | 51 | widgets */ |
52 | 52 | ||
53 | toggles = new QSignalMapper(this); | 53 | toggles = new QSignalMapper(this); |
54 | QScrollView *sv = new QScrollView(this, 0); | 54 | QScrollView *sv = new QScrollView(this, 0); |
55 | sv->setResizePolicy(QScrollView::AutoOneFit); | 55 | sv->setResizePolicy(QScrollView::AutoOneFit); |
56 | 56 | ||
diff --git a/noncore/apps/tableviewer/ui/tvfilterview.cpp b/noncore/apps/tableviewer/ui/tvfilterview.cpp index 72d39d6..0182127 100644 --- a/noncore/apps/tableviewer/ui/tvfilterview.cpp +++ b/noncore/apps/tableviewer/ui/tvfilterview.cpp | |||
@@ -17,26 +17,26 @@ | |||
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include "tvfilterview.h" | 20 | #include "tvfilterview.h" |
21 | #include <qtoolbutton.h> | 21 | #include <qtoolbutton.h> |
22 | #include <qcombobox.h> | 22 | #include <qcombobox.h> |
23 | #include <qlistview.h> | 23 | #include <qlistview.h> |
24 | #include <qlayout.h> | 24 | #include <qlayout.h> |
25 | #include <qheader.h> | 25 | #include <qheader.h> |
26 | #include <qpushbutton.h> | 26 | #include <qpushbutton.h> |
27 | #include <qlabel.h> | 27 | #include <qlabel.h> |
28 | 28 | ||
29 | TVFilterView::TVFilterView(TableState *t, QWidget* parent = 0, | 29 | TVFilterView::TVFilterView(TableState *t, QWidget* parent, |
30 | const char *name = 0, WFlags fl =0) : QDialog(parent, name, TRUE, fl) | 30 | const char *name, WFlags fl ) : QDialog(parent, name, TRUE, fl) |
31 | { | 31 | { |
32 | if ( !name ) | 32 | if ( !name ) |
33 | setName( "Filter View" ); | 33 | setName( "Filter View" ); |
34 | 34 | ||
35 | QVBoxLayout *vlayout = new QVBoxLayout(this); | 35 | QVBoxLayout *vlayout = new QVBoxLayout(this); |
36 | 36 | ||
37 | display = new QListView(this, "display"); | 37 | display = new QListView(this, "display"); |
38 | display->addColumn("Key"); | 38 | display->addColumn("Key"); |
39 | display->addColumn("Constraint"); | 39 | display->addColumn("Constraint"); |
40 | display->addColumn("Value"); | 40 | display->addColumn("Value"); |
41 | display->header()->setClickEnabled(FALSE); | 41 | display->header()->setClickEnabled(FALSE); |
42 | display->header()->setResizeEnabled(FALSE); | 42 | display->header()->setResizeEnabled(FALSE); |
diff --git a/noncore/apps/tableviewer/ui/tvkeyedit.cpp b/noncore/apps/tableviewer/ui/tvkeyedit.cpp index fb7b7fe..4849e87 100644 --- a/noncore/apps/tableviewer/ui/tvkeyedit.cpp +++ b/noncore/apps/tableviewer/ui/tvkeyedit.cpp | |||
@@ -83,26 +83,26 @@ public: | |||
83 | 83 | ||
84 | inline int getPos() const | 84 | inline int getPos() const |
85 | { | 85 | { |
86 | return position; | 86 | return position; |
87 | } | 87 | } |
88 | 88 | ||
89 | private: | 89 | private: |
90 | QString name; | 90 | QString name; |
91 | TVVariant::KeyType keyType; | 91 | TVVariant::KeyType keyType; |
92 | int position; | 92 | int position; |
93 | }; | 93 | }; |
94 | 94 | ||
95 | TVKeyEdit::TVKeyEdit(TableState *t, QWidget* parent = 0, const char *name = 0, | 95 | TVKeyEdit::TVKeyEdit(TableState *t, QWidget* parent, const char *name, |
96 | WFlags fl = 0) : TVKeyEdit_gen(parent, name, true, fl) | 96 | WFlags fl) : TVKeyEdit_gen(parent, name, true, fl) |
97 | { | 97 | { |
98 | int i; | 98 | int i; |
99 | ts = t; | 99 | ts = t; |
100 | 100 | ||
101 | if(!ts) return; | 101 | if(!ts) return; |
102 | if(!ts->kRep) return; | 102 | if(!ts->kRep) return; |
103 | 103 | ||
104 | working_state = *ts->kRep; | 104 | working_state = *ts->kRep; |
105 | 105 | ||
106 | i = 1; | 106 | i = 1; |
107 | keyTypeEdit->insertItem(TVVariant::typeToName((TVVariant::KeyType)i)); | 107 | keyTypeEdit->insertItem(TVVariant::typeToName((TVVariant::KeyType)i)); |
108 | i++; | 108 | i++; |
diff --git a/noncore/apps/tableviewer/ui/tvlistview.cpp b/noncore/apps/tableviewer/ui/tvlistview.cpp index 82d67c6..b25e813 100644 --- a/noncore/apps/tableviewer/ui/tvlistview.cpp +++ b/noncore/apps/tableviewer/ui/tvlistview.cpp | |||
@@ -76,26 +76,26 @@ private: | |||
76 | 76 | ||
77 | TVListViewItem::TVListViewItem(QListView *parent, DataElem *d) | 77 | TVListViewItem::TVListViewItem(QListView *parent, DataElem *d) |
78 | : QListViewItem(parent) | 78 | : QListViewItem(parent) |
79 | { | 79 | { |
80 | data_reference = d; | 80 | data_reference = d; |
81 | } | 81 | } |
82 | 82 | ||
83 | TVListViewItem::~TVListViewItem() | 83 | TVListViewItem::~TVListViewItem() |
84 | { | 84 | { |
85 | data_reference = 0; | 85 | data_reference = 0; |
86 | } | 86 | } |
87 | 87 | ||
88 | TVListView::TVListView(TableState *t, QWidget* parent = 0, | 88 | TVListView::TVListView(TableState *t, QWidget* parent, |
89 | const char *name = 0, WFlags fl =0) : QWidget(parent, name, fl) | 89 | const char *name, WFlags fl ) : QWidget(parent, name, fl) |
90 | { | 90 | { |
91 | if (!name) | 91 | if (!name) |
92 | setName("TVListView"); | 92 | setName("TVListView"); |
93 | 93 | ||
94 | // the next two lines need to be rationalized. | 94 | // the next two lines need to be rationalized. |
95 | resize(318,457); | 95 | resize(318,457); |
96 | setSizePolicy(QSizePolicy((QSizePolicy::SizeType)7, | 96 | setSizePolicy(QSizePolicy((QSizePolicy::SizeType)7, |
97 | (QSizePolicy::SizeType)7, sizePolicy().hasHeightForWidth())); | 97 | (QSizePolicy::SizeType)7, sizePolicy().hasHeightForWidth())); |
98 | setCaption(tr("List View")); | 98 | setCaption(tr("List View")); |
99 | 99 | ||
100 | QVBoxLayout *layout = new QVBoxLayout(this); | 100 | QVBoxLayout *layout = new QVBoxLayout(this); |
101 | layout->setSpacing(0); | 101 | layout->setSpacing(0); |