summaryrefslogtreecommitdiff
path: root/noncore/apps/tableviewer/ui/commonwidgets.cpp
authoralwin <alwin>2004-03-02 12:21:11 (UTC)
committer alwin <alwin>2004-03-02 12:21:11 (UTC)
commitb6b1c97559c0ed9f2e33632272426bf98f289232 (patch) (side-by-side diff)
treed3a9987704770cdf5eb14e1136f6e3ecb2f36a04 /noncore/apps/tableviewer/ui/commonwidgets.cpp
parent0d59c780513da78033f4d9040475dee9db0256d4 (diff)
downloadopie-b6b1c97559c0ed9f2e33632272426bf98f289232.zip
opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.gz
opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.bz2
applied the patch generated by the optimize_connect script from
TT.
Diffstat (limited to 'noncore/apps/tableviewer/ui/commonwidgets.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/tableviewer/ui/commonwidgets.cpp2
1 files changed, 1 insertions, 1 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
@@ -1,88 +1,88 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
** This file is part of Qtopia Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include <qlineedit.h>
#include <qlayout.h>
#include <qlabel.h>
#include <qcombobox.h>
#include <qpe/datebookmonth.h>
#include <qpopupmenu.h>
#include <qspinbox.h>
#include "commonwidgets.h"
DateEdit::DateEdit( QWidget *parent, const char *name, WFlags f )
: QToolButton(parent, name)
{
QPopupMenu *m1 = new QPopupMenu(this);
dateSelector = new DateBookMonth(m1, 0, TRUE);
m1->insertItem(dateSelector);
setPopup(m1);
setPopupDelay(0);
- connect(dateSelector, SIGNAL(dateClicked(int, int, int)),
+ connect(dateSelector, SIGNAL(dateClicked(int,int,int)),
this, SLOT(subValueChanged()));
setText(dateSelector->selectedDate().toString());
}
DateEdit::~DateEdit() {}
QDate DateEdit::date() const
{
return dateSelector->selectedDate();
}
void DateEdit::setDate(QDate d)
{
dateSelector->setDate(d.year(), d.month(), d.day());
setText(d.toString());
}
QSizePolicy DateEdit::sizePolicy() const
{
QSizePolicy sp;
sp.setHorData(QToolButton::sizePolicy().horData());
sp.setVerData(QSizePolicy::Fixed);
return sp;
}
void DateEdit::clear()
{
QDate today = QDate::currentDate();
dateSelector->setDate(today.year(), today.month(), today.day());
setText(today.toString());
}
void DateEdit::subValueChanged()
{
QDate current = dateSelector->selectedDate();
setText(current.toString());
emit valueChanged(current);
}
TimeEdit::TimeEdit( QWidget *parent, const char *name, WFlags f )
: QWidget(parent, name, f)
{
QHBoxLayout *layout = new QHBoxLayout(this, 0);