summaryrefslogtreecommitdiffstats
path: root/part/kxechoosestringdialog.cpp
blob: f46856bbd5e5c42c59f159f2b41b7ec6b1e24693 (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 <qpushbutton.h>
#include <qcombobox.h>
#include <qlabel.h>

KXEChooseStringDialog::KXEChooseStringDialog(QWidget *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"