| 1 |
/*************************************************************************** |
| 2 |
* Copyright (C) 2012~2012 by CSSlayer * |
| 3 |
* [email protected] * |
| 4 |
* * |
| 5 |
* This program is free software: you can redistribute it and/or modify * |
| 6 |
* it under the terms of the GNU General Public License as published by * |
| 7 |
* the Free Software Foundation, either version 3 of the License, or * |
| 8 |
* (at your option) any later version. * |
| 9 |
* * |
| 10 |
* This program is distributed in the hope that it will be useful, * |
| 11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of * |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
| 13 |
* GNU General Public License for more details. * |
| 14 |
* * |
| 15 |
* You should have received a copy of the GNU General Public License * |
| 16 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. * |
| 17 |
* * |
| 18 |
***************************************************************************/ |
| 19 |
|
| 20 |
#include "editordialog.h" |
| 21 |
#include "common.h" |
| 22 |
#include "ui_editordialog.h" |
| 23 |
|
| 24 |
namespace fcitx { |
| 25 |
EditorDialog::EditorDialog(QWidget *parent) |
| 26 |
: QDialog(parent), m_ui(new Ui::EditorDialog) { |
| 27 |
m_ui->setupUi(this); |
| 28 |
m_ui->keyLabel->setText(_("Keyword:")); |
| 29 |
m_ui->valueLabel->setText(_("Phrase:")); |
| 30 |
} |
| 31 |
|
| 32 |
EditorDialog::~EditorDialog() { delete m_ui; } |
| 33 |
|
| 34 |
void EditorDialog::setKey(const QString &s) { m_ui->keyLineEdit->setText(s); } |
| 35 |
|
| 36 |
void EditorDialog::setValue(const QString &s) { |
| 37 |
m_ui->valueLineEdit->setText(s); |
| 38 |
} |
| 39 |
|
| 40 |
QString EditorDialog::key() const { return m_ui->keyLineEdit->text(); } |
| 41 |
|
| 42 |
QString EditorDialog::value() const { return m_ui->valueLineEdit->text(); } |
| 43 |
} // namespace fcitx |