summaryrefslogtreecommitdiffstats
path: root/part/kxechoosestringdialog.cpp
blob: 180b865ac8eac24d6ab34fd48146b9deacf57ab3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/***************************************************************************
                          kxechoosestringdialog.cpp  -  description
                          -------------------------
    begin                : Fri Jul 20 2001
    copyright            : (C) 2001, 2002, 2003 by The KXMLEditor Team
    email                : lvanek@users.sourceforge.net
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#include "kxechoosestringdialog.h"

#include <tqpushbutton.h>
#include <tqcombobox.h>
#include <tqlabel.h>

KXEChooseStringDialog::KXEChooseStringDialog(TQWidget *parent,
																 const char *name,
																 const char *szCaption,
																 const char *szPrompt)
	: KXEChooseStringDialogBase(parent, name, true)
{
	m_pComboBox->setEditable(true);
	m_pComboBox->setFocus();
	m_pPushButtonOk->setDefault(true);
	setCaption(szCaption);
	m_pTextLabel->setText(szPrompt);
}

/** Called, when user press OK button */
void KXEChooseStringDialog::slotOk()
{
	m_strChoosedText = m_pComboBox->currentText();
	accept();
}

#include "kxechoosestringdialog.moc"