Yingdi Yu | d95c564 | 2013-10-20 19:43:10 -0700 | [diff] [blame^] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
| 2 | /* |
| 3 | * Copyright (c) 2013, Regents of the University of California |
| 4 | * Yingdi Yu |
| 5 | * |
| 6 | * BSD license, See the LICENSE file for more information |
| 7 | * |
| 8 | * Author: Yingdi Yu <yingdi@cs.ucla.edu> |
| 9 | */ |
| 10 | |
Yingdi Yu | ab557b4 | 2013-10-18 19:03:08 -0700 | [diff] [blame] | 11 | #include "warningdialog.h" |
| 12 | #include "ui_warningdialog.h" |
| 13 | |
Yingdi Yu | d95c564 | 2013-10-20 19:43:10 -0700 | [diff] [blame^] | 14 | using namespace std; |
| 15 | |
Yingdi Yu | ab557b4 | 2013-10-18 19:03:08 -0700 | [diff] [blame] | 16 | WarningDialog::WarningDialog(QWidget *parent) : |
| 17 | QDialog(parent), |
| 18 | ui(new Ui::WarningDialog) |
| 19 | { |
Yingdi Yu | d95c564 | 2013-10-20 19:43:10 -0700 | [diff] [blame^] | 20 | ui->setupUi(this); |
| 21 | |
| 22 | connect(ui->okButton, SIGNAL(clicked()), |
| 23 | this, SLOT(onOkClicked())); |
Yingdi Yu | ab557b4 | 2013-10-18 19:03:08 -0700 | [diff] [blame] | 24 | } |
| 25 | |
| 26 | WarningDialog::~WarningDialog() |
| 27 | { |
| 28 | delete ui; |
| 29 | } |
| 30 | |
Yingdi Yu | d95c564 | 2013-10-20 19:43:10 -0700 | [diff] [blame^] | 31 | void |
| 32 | WarningDialog::setMsg(const string& msg) |
| 33 | { ui->message->setText(QApplication::translate("WarningDialog",msg.c_str(), 0, QApplication::UnicodeUTF8)); } |
| 34 | |
| 35 | void |
| 36 | WarningDialog::onOkClicked() |
| 37 | { this->hide(); } |
| 38 | |
Yingdi Yu | ab557b4 | 2013-10-18 19:03:08 -0700 | [diff] [blame] | 39 | #if WAF |
| 40 | #include "warningdialog.moc" |
| 41 | #include "warningdialog.cpp.moc" |
| 42 | #endif |