-rw-r--r-- | noncore/apps/tableviewer/ui/commonwidgets.cpp | 2 | ||||
-rw-r--r-- | noncore/apps/tableviewer/ui/tvbrowseview.cpp | 4 | ||||
-rw-r--r-- | noncore/apps/tableviewer/ui/tvfilterview.cpp | 2 | ||||
-rw-r--r-- | noncore/apps/tableviewer/ui/tvlistview.cpp | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/noncore/apps/tableviewer/ui/commonwidgets.cpp b/noncore/apps/tableviewer/ui/commonwidgets.cpp index 4c47951..e82018c 100644 --- a/noncore/apps/tableviewer/ui/commonwidgets.cpp +++ b/noncore/apps/tableviewer/ui/commonwidgets.cpp | |||
@@ -16,49 +16,49 @@ | |||
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
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, const char *name, WFlags f ) | 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()); |
44 | } | 44 | } |
45 | 45 | ||
46 | 46 | ||
47 | DateEdit::~DateEdit() {} | 47 | DateEdit::~DateEdit() {} |
48 | 48 | ||
49 | QDate DateEdit::date() const | 49 | QDate DateEdit::date() const |
50 | { | 50 | { |
51 | return dateSelector->selectedDate(); | 51 | return dateSelector->selectedDate(); |
52 | } | 52 | } |
53 | 53 | ||
54 | void DateEdit::setDate(QDate d) | 54 | void DateEdit::setDate(QDate d) |
55 | { | 55 | { |
56 | dateSelector->setDate(d.year(), d.month(), d.day()); | 56 | dateSelector->setDate(d.year(), d.month(), d.day()); |
57 | setText(d.toString()); | 57 | setText(d.toString()); |
58 | } | 58 | } |
59 | 59 | ||
60 | QSizePolicy DateEdit::sizePolicy() const | 60 | QSizePolicy DateEdit::sizePolicy() const |
61 | { | 61 | { |
62 | QSizePolicy sp; | 62 | QSizePolicy sp; |
63 | sp.setHorData(QToolButton::sizePolicy().horData()); | 63 | sp.setHorData(QToolButton::sizePolicy().horData()); |
64 | sp.setVerData(QSizePolicy::Fixed); | 64 | sp.setVerData(QSizePolicy::Fixed); |
diff --git a/noncore/apps/tableviewer/ui/tvbrowseview.cpp b/noncore/apps/tableviewer/ui/tvbrowseview.cpp index 22bac55..8a65ed1 100644 --- a/noncore/apps/tableviewer/ui/tvbrowseview.cpp +++ b/noncore/apps/tableviewer/ui/tvbrowseview.cpp | |||
@@ -33,50 +33,50 @@ | |||
33 | at a time, or search on a single key. Its main goal is to show a | 33 | at a time, or search on a single key. Its main goal is to show a |
34 | single element in a readable format and make it easy for the user to | 34 | single element in a readable format and make it easy for the user to |
35 | rapidly find specific elements in the table. | 35 | rapidly find specific elements in the table. |
36 | */ | 36 | */ |
37 | 37 | ||
38 | /*! | 38 | /*! |
39 | Constructs a new TVBrowseView widget | 39 | Constructs a new TVBrowseView widget |
40 | */ | 40 | */ |
41 | TVBrowseView::TVBrowseView(TableState *t, QWidget* parent, const char *name, | 41 | TVBrowseView::TVBrowseView(TableState *t, QWidget* parent, const char *name, |
42 | WFlags fl ) | 42 | WFlags fl ) |
43 | { | 43 | { |
44 | if (!name) | 44 | if (!name) |
45 | setName("BrowseView"); | 45 | setName("BrowseView"); |
46 | 46 | ||
47 | // setSizePolicy(QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding, 0, 0, sizePolicy().hasHeightForWidth() ) ); | 47 | // setSizePolicy(QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding, 0, 0, sizePolicy().hasHeightForWidth() ) ); |
48 | QVBoxLayout *vlayout = new QVBoxLayout(this); | 48 | QVBoxLayout *vlayout = new QVBoxLayout(this); |
49 | textViewDisplay = new QTextBrowser(this, "textViewDisplay"); | 49 | textViewDisplay = new QTextBrowser(this, "textViewDisplay"); |
50 | vlayout->addWidget( textViewDisplay ); | 50 | vlayout->addWidget( textViewDisplay ); |
51 | 51 | ||
52 | keyEntry = new TVBrowseKeyEntry(this, "keyEntry"); | 52 | keyEntry = new TVBrowseKeyEntry(this, "keyEntry"); |
53 | vlayout->addWidget( keyEntry ); | 53 | vlayout->addWidget( keyEntry ); |
54 | 54 | ||
55 | /* connect the signals down */ | 55 | /* connect the signals down */ |
56 | 56 | ||
57 | connect(keyEntry, SIGNAL(searchOnKey(int, TVVariant)), | 57 | connect(keyEntry, SIGNAL(searchOnKey(int,TVVariant)), |
58 | this, SIGNAL(searchOnKey(int, TVVariant))); | 58 | this, SIGNAL(searchOnKey(int,TVVariant))); |
59 | connect(keyEntry, SIGNAL(sortChanged(int)), | 59 | connect(keyEntry, SIGNAL(sortChanged(int)), |
60 | this, SIGNAL(sortChanged(int))); | 60 | this, SIGNAL(sortChanged(int))); |
61 | 61 | ||
62 | ts = t; | 62 | ts = t; |
63 | keyEntry->setTableState(t); | 63 | keyEntry->setTableState(t); |
64 | } | 64 | } |
65 | 65 | ||
66 | /*! | 66 | /*! |
67 | Destroys the TVBrowseView widget | 67 | Destroys the TVBrowseView widget |
68 | */ | 68 | */ |
69 | TVBrowseView::~TVBrowseView() | 69 | TVBrowseView::~TVBrowseView() |
70 | { | 70 | { |
71 | } | 71 | } |
72 | 72 | ||
73 | void TVBrowseView::rebuildData() | 73 | void TVBrowseView::rebuildData() |
74 | { | 74 | { |
75 | if(!ts) | 75 | if(!ts) |
76 | return; | 76 | return; |
77 | if(!ts->current_elem) { | 77 | if(!ts->current_elem) { |
78 | /* also disable buttons */ | 78 | /* also disable buttons */ |
79 | textViewDisplay->setText(""); | 79 | textViewDisplay->setText(""); |
80 | return; | 80 | return; |
81 | } | 81 | } |
82 | 82 | ||
diff --git a/noncore/apps/tableviewer/ui/tvfilterview.cpp b/noncore/apps/tableviewer/ui/tvfilterview.cpp index b03e846..22f1fb7 100644 --- a/noncore/apps/tableviewer/ui/tvfilterview.cpp +++ b/noncore/apps/tableviewer/ui/tvfilterview.cpp | |||
@@ -68,49 +68,49 @@ TVFilterView::TVFilterView(TableState *t, QWidget* parent, | |||
68 | QHBoxLayout *hlayout2 = new QHBoxLayout; | 68 | QHBoxLayout *hlayout2 = new QHBoxLayout; |
69 | 69 | ||
70 | keyNameCombo = new QComboBox(FALSE, this, "key name"); | 70 | keyNameCombo = new QComboBox(FALSE, this, "key name"); |
71 | keyNameCombo->setEnabled(FALSE); | 71 | keyNameCombo->setEnabled(FALSE); |
72 | hlayout2->addWidget(keyNameCombo); | 72 | hlayout2->addWidget(keyNameCombo); |
73 | 73 | ||
74 | QLabel *label = new QLabel(this); | 74 | QLabel *label = new QLabel(this); |
75 | label->setText("has value"); | 75 | label->setText("has value"); |
76 | hlayout2->addWidget(label); | 76 | hlayout2->addWidget(label); |
77 | 77 | ||
78 | keyEntry = new TVFilterKeyEntry(this, "key entry"); | 78 | keyEntry = new TVFilterKeyEntry(this, "key entry"); |
79 | keyEntry->setEnabled(FALSE); | 79 | keyEntry->setEnabled(FALSE); |
80 | 80 | ||
81 | vlayout->addLayout(hlayout2); | 81 | vlayout->addLayout(hlayout2); |
82 | vlayout->addWidget(keyEntry); | 82 | vlayout->addWidget(keyEntry); |
83 | 83 | ||
84 | connect(newFilterButton, SIGNAL( clicked() ), this, SLOT( newTerm() )); | 84 | connect(newFilterButton, SIGNAL( clicked() ), this, SLOT( newTerm() )); |
85 | connect(deleteFilterButton, SIGNAL( clicked() ), this, SLOT( deleteTerm())); | 85 | connect(deleteFilterButton, SIGNAL( clicked() ), this, SLOT( deleteTerm())); |
86 | connect(clearFilterButton, SIGNAL( clicked() ), this, SLOT( clearTerms())); | 86 | connect(clearFilterButton, SIGNAL( clicked() ), this, SLOT( clearTerms())); |
87 | 87 | ||
88 | connect(keyEntry, SIGNAL(valueChanged()), this, SLOT( updateTerm() )); | 88 | connect(keyEntry, SIGNAL(valueChanged()), this, SLOT( updateTerm() )); |
89 | connect(keyNameCombo, SIGNAL(activated(int)), this, SLOT( updateTerm() )); | 89 | connect(keyNameCombo, SIGNAL(activated(int)), this, SLOT( updateTerm() )); |
90 | 90 | ||
91 | connect(display, SIGNAL(selectionChanged(QListViewItem*)), this, | 91 | connect(display, SIGNAL(selectionChanged(QListViewItem*)), this, |
92 | SLOT(setTerm(QListViewItem *))); | 92 | SLOT(setTerm(QListViewItem*))); |
93 | 93 | ||
94 | ts = t; | 94 | ts = t; |
95 | current = 0; | 95 | current = 0; |
96 | terms.setAutoDelete(true); | 96 | terms.setAutoDelete(true); |
97 | do_filter = false; | 97 | do_filter = false; |
98 | 98 | ||
99 | #ifdef Q_WS_QWS | 99 | #ifdef Q_WS_QWS |
100 | QPEApplication::showDialog( this ); | 100 | QPEApplication::showDialog( this ); |
101 | #endif | 101 | #endif |
102 | } | 102 | } |
103 | 103 | ||
104 | /*! | 104 | /*! |
105 | Destroys the TVFilterView widget | 105 | Destroys the TVFilterView widget |
106 | */ | 106 | */ |
107 | TVFilterView::~TVFilterView() | 107 | TVFilterView::~TVFilterView() |
108 | { | 108 | { |
109 | } | 109 | } |
110 | 110 | ||
111 | void TVFilterView::rebuildData() | 111 | void TVFilterView::rebuildData() |
112 | { | 112 | { |
113 | } | 113 | } |
114 | 114 | ||
115 | void TVFilterView::reset() | 115 | void TVFilterView::reset() |
116 | { | 116 | { |
diff --git a/noncore/apps/tableviewer/ui/tvlistview.cpp b/noncore/apps/tableviewer/ui/tvlistview.cpp index b25e813..b10ff1d 100644 --- a/noncore/apps/tableviewer/ui/tvlistview.cpp +++ b/noncore/apps/tableviewer/ui/tvlistview.cpp | |||
@@ -83,50 +83,50 @@ TVListViewItem::TVListViewItem(QListView *parent, DataElem *d) | |||
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, | 88 | TVListView::TVListView(TableState *t, QWidget* parent, |
89 | const char *name, WFlags fl ) : 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); |
102 | layout->setMargin(0); | 102 | layout->setMargin(0); |
103 | 103 | ||
104 | listViewDisplay = new TVListViewPrivate(this, "listViewDisplay"); | 104 | listViewDisplay = new TVListViewPrivate(this, "listViewDisplay"); |
105 | layout->addWidget(listViewDisplay); | 105 | layout->addWidget(listViewDisplay); |
106 | 106 | ||
107 | connect(listViewDisplay, SIGNAL(currentChanged(QListViewItem *)), this, | 107 | connect(listViewDisplay, SIGNAL(currentChanged(QListViewItem*)), this, |
108 | SLOT(setCurrent(QListViewItem *))); | 108 | SLOT(setCurrent(QListViewItem*))); |
109 | connect(listViewDisplay, SIGNAL(sortChanged(int)), this, | 109 | connect(listViewDisplay, SIGNAL(sortChanged(int)), this, |
110 | SLOT(setSorting(int))); | 110 | SLOT(setSorting(int))); |
111 | 111 | ||
112 | listViewDisplay->setShowSortIndicator(true); | 112 | listViewDisplay->setShowSortIndicator(true); |
113 | 113 | ||
114 | it = new QListViewItemIterator(listViewDisplay); | 114 | it = new QListViewItemIterator(listViewDisplay); |
115 | ts = t; | 115 | ts = t; |
116 | } | 116 | } |
117 | 117 | ||
118 | TVListView::~TVListView() | 118 | TVListView::~TVListView() |
119 | { | 119 | { |
120 | } | 120 | } |
121 | 121 | ||
122 | void TVListView::addItem(DataElem *d) | 122 | void TVListView::addItem(DataElem *d) |
123 | { | 123 | { |
124 | TVListViewItem *i = new TVListViewItem(listViewDisplay, d); | 124 | TVListViewItem *i = new TVListViewItem(listViewDisplay, d); |
125 | 125 | ||
126 | delete it; | 126 | delete it; |
127 | it = new QListViewItemIterator(i); | 127 | it = new QListViewItemIterator(i); |
128 | } | 128 | } |
129 | 129 | ||
130 | /* remove current (it) item */ | 130 | /* remove current (it) item */ |
131 | void TVListView::removeItem() | 131 | void TVListView::removeItem() |
132 | { | 132 | { |