| 1 |
/*************************************************************************** |
| 2 |
* Copyright (C) 2013~2013 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 "batchdialog.h" |
| 21 |
#include "common.h" |
| 22 |
#include "ui_batchdialog.h" |
| 23 |
#include <QIcon> |
| 24 |
|
| 25 |
namespace fcitx { |
| 26 |
BatchDialog::BatchDialog(QWidget *parent) |
| 27 |
: QDialog(parent), m_ui(new Ui::BatchDialog) { |
| 28 |
m_ui->setupUi(this); |
| 29 |
m_ui->iconLabel->setPixmap( |
| 30 |
QIcon::fromTheme("dialog-information").pixmap(22, 22)); |
| 31 |
m_ui->infoLabel->setText(_("Use <Keyword> <Phrase> format on every line.")); |
| 32 |
} |
| 33 |
|
| 34 |
BatchDialog::~BatchDialog() { delete m_ui; } |
| 35 |
|
| 36 |
void BatchDialog::setText(const QString &s) { |
| 37 |
m_ui->plainTextEdit->setPlainText(s); |
| 38 |
} |
| 39 |
|
| 40 |
QString BatchDialog::text() const { return m_ui->plainTextEdit->toPlainText(); } |
| 41 |
} // namespace fcitx |