kexiaddparamdialog.cpp
1/* This file is part of the KDE project
2 Copyright (C) 2002 Joseph Wenninger <jowenn@kde.org>
3
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this program; see the file COPYING. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#include <tdelocale.h>
21#include <kcombobox.h>
22#include <klineedit.h>
23#include <tqvbox.h>
24#include <kexidataprovider.h>
25#include "kexiaddparamdialog.h"
26#include "kexiaddparamdialog.moc"
27#include "kexiaddparamwidget.h"
28
29KexiAddParamDialog::KexiAddParamDialog(TQWidget *parent)
30 : KDialogBase(parent, "kexiaddparamdialog", true, i18n("Add Parameter"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true)
31{
32 m_wid=new KexiAddParamWidget(makeVBoxMainWidget());
33 for (int i=1;i<=KexiDataProvider::Parameter::maxType;i++)
34 m_wid->typecombo->insertItem(KexiDataProvider::Parameter::typeDescription[i]);
35}
36
37KexiAddParamDialog::~KexiAddParamDialog()
38{
39}
40
41TQString KexiAddParamDialog::parameterName() {
42 return m_wid->paramname->text();
43}
44
45int KexiAddParamDialog::parameterType() {
46 return m_wid->typecombo->currentItem()+1;
47}