From: GiWoong Kim Date: Tue, 5 Aug 2014 02:19:41 +0000 (+0900) Subject: menu: add about dialog contents X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b3cda4625befead460c26be6a28039efc9aa1c1f;p=sdk%2Femulator%2Fqemu.git menu: add about dialog contents Change-Id: Ic24dc3d2e1b53977ee962643a1cd9e8267aa3544 Signed-off-by: GiWoong Kim --- diff --git a/tizen/src/display/qt5_supplement.cpp b/tizen/src/display/qt5_supplement.cpp index 22dc0d7902..c84dc25151 100644 --- a/tizen/src/display/qt5_supplement.cpp +++ b/tizen/src/display/qt5_supplement.cpp @@ -64,6 +64,9 @@ static UIInformation *uiInfo; void qt5_skin_init(void) { + qDebug() << "* Qt version :" << QT_VERSION_STR; + qDebug() << "* working directory :" << QDir::currentPath(); + uiInfo = new UIInformation(); /* parameter parsing */ diff --git a/tizen/src/ui/controllerwidget.cpp b/tizen/src/ui/controllerwidget.cpp index 2978f7f2c4..a425d82512 100644 --- a/tizen/src/ui/controllerwidget.cpp +++ b/tizen/src/ui/controllerwidget.cpp @@ -31,7 +31,7 @@ void ControllerWidget::showEvent(QShowEvent *event) void ControllerWidget::setRegion(QImage baseImage) { - qDebug("set region"); + //qDebug("set region"); QImage region = baseImage.createAlphaMask(); diff --git a/tizen/src/ui/mainwindow.cpp b/tizen/src/ui/mainwindow.cpp index 475e25241f..e89585670a 100644 --- a/tizen/src/ui/mainwindow.cpp +++ b/tizen/src/ui/mainwindow.cpp @@ -235,7 +235,7 @@ void MainWindow::updateSkin() // TODO: temp void MainWindow::setRegion(QImage baseImage) { - qDebug("set region"); + //qDebug("set region"); QImage region = baseImage.createAlphaMask().scaled( baseImage.width() * getUIState()->getScaleFactor(), diff --git a/tizen/src/ui/menu/aboutdialog.cpp b/tizen/src/ui/menu/aboutdialog.cpp index 45e2819e29..c52947e20c 100644 --- a/tizen/src/ui/menu/aboutdialog.cpp +++ b/tizen/src/ui/menu/aboutdialog.cpp @@ -1,18 +1,64 @@ #include "aboutdialog.h" +#define SDK_NAME "Tizen SDK" +#define URL_TIZEN_ORG "https://developer.tizen.org"; + AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent) { setWindowTitle("About Emulator"); + + QVBoxLayout *baseLayout = new QVBoxLayout(this); + baseLayout->setMargin(0); + baseLayout->setSpacing(5); + + /* upside */ + QHBoxLayout *upsideLayout = new QHBoxLayout(); + upsideLayout->setMargin(0); + upsideLayout->setSpacing(5); + + QLabel *imageLabel = new QLabel(this); + imageLabel->setPixmap(QPixmap(":about.png")); + upsideLayout->addWidget(imageLabel); + + QSettings *sdkVersion = new QSettings("../../../sdk.version", QSettings::IniFormat); + QString version = sdkVersion->value("TIZEN_SDK_VERSION").toString(); + if (version.isEmpty() == true) { + version = "Undefined"; + } + + QString aboutText = QString(SDK_NAME) + "\n\n" + + "Version : " + version + '\n' + + "Build ID : " + '\n' //TODO: + + "SDK Snapshot Name : " + '\n' //TODO: + + "\n\nVisit " + URL_TIZEN_ORG; + + QLabel *textLabel = new QLabel(this); + textLabel->setStyleSheet("background-color: white"); + textLabel->setText(aboutText); + upsideLayout->addWidget(textLabel); + + baseLayout->addLayout(upsideLayout); + + /* downside */ + QHBoxLayout *downsideLayout = new QHBoxLayout(); + downsideLayout->setAlignment(Qt::AlignRight); + downsideLayout->setMargin(10); + + QPushButton *okBtn = new QPushButton("OK", this); + connect(okBtn, SIGNAL(clicked()), this, SLOT(close())); + downsideLayout->addWidget(okBtn); + + baseLayout->addLayout(downsideLayout); } void AboutDialog::showEvent(QShowEvent *event) { Q_UNUSED(event) - QWidget *parent = ((QWidget *)this->parent()); - move(parent->geometry().center().x() - (geometry().size().width() / 2), - parent->geometry().center().y() - (geometry().size().height() / 2)); + QWidget *win = ((QWidget *)this->parent()); + move(win->geometry().center().x() - (geometry().size().width() / 2), + win->geometry().center().y() - (geometry().size().height() / 2)); } AboutDialog::~AboutDialog() diff --git a/tizen/src/ui/menu/aboutdialog.h b/tizen/src/ui/menu/aboutdialog.h index 1f23a4cd7e..36a3e5affd 100644 --- a/tizen/src/ui/menu/aboutdialog.h +++ b/tizen/src/ui/menu/aboutdialog.h @@ -1,7 +1,7 @@ #ifndef ABOUTDIALOG_H #define ABOUTDIALOG_H -#include +#include class AboutDialog : public QDialog { diff --git a/tizen/src/ui/resource/about.png b/tizen/src/ui/resource/about.png new file mode 100644 index 0000000000..b276703a7a Binary files /dev/null and b/tizen/src/ui/resource/about.png differ diff --git a/tizen/src/ui/resource/resource.qrc b/tizen/src/ui/resource/resource.qrc index 8b561db5bd..4ec3b7d3be 100644 --- a/tizen/src/ui/resource/resource.qrc +++ b/tizen/src/ui/resource/resource.qrc @@ -20,6 +20,7 @@ mobile-720x1280-3btn/layout.qml + about.png icons/emulator_icon.ico icons/shell.png icons/about.png diff --git a/tizen/src/ui/skincontrollerview.cpp b/tizen/src/ui/skincontrollerview.cpp index 8704bc5bd7..1e4cbf3c04 100644 --- a/tizen/src/ui/skincontrollerview.cpp +++ b/tizen/src/ui/skincontrollerview.cpp @@ -40,7 +40,7 @@ void SkinControllerView::createItems(ControllerLayout *conLayout) void SkinControllerView::resizeEvent(QResizeEvent *event) { - qDebug("resize con view"); + //qDebug("resize con view"); Q_UNUSED(event) } diff --git a/tizen/src/ui/skinview.cpp b/tizen/src/ui/skinview.cpp index c25e5ca4ac..3943e25e00 100644 --- a/tizen/src/ui/skinview.cpp +++ b/tizen/src/ui/skinview.cpp @@ -121,8 +121,10 @@ void SkinView::autoKeyRelease(void) this->keyCodeList.removeLast(); } +#if 0 clear_finger_slot(false); qDebug() << "disable multi-touch"; +#endif } void SkinView::focusOutEvent(QFocusEvent *event) @@ -154,6 +156,7 @@ void SkinView::keyPressEvent(QKeyEvent *event) { qDebug() << "key pressed :" << event->key() << event->text() << event->nativeScanCode() << event->modifiers(); +#if 0 /* TODO: multi-touch */ if (get_emul_max_touch_point() > 1) { /* multi-touch checking */ @@ -168,6 +171,7 @@ void SkinView::keyPressEvent(QKeyEvent *event) qDebug() << "enable multi-touch = mode 1"; } } +#endif if (event->key() == Qt::Key_NumLock) { set_emul_num_lock_state(get_emul_num_lock_state() ^ 1); //toggle @@ -212,6 +216,7 @@ void SkinView::keyReleaseEvent(QKeyEvent *event) { qDebug() << "key released :" << event->key() << event->text() << event->nativeScanCode() << event->modifiers(); +#if 0 /* TODO: multi-touch */ if (event->key() == Qt::Key_Shift && event->modifiers() == Qt::ControlModifier) { get_emul_multi_touch_state()->multitouch_enable = 1; @@ -220,6 +225,7 @@ void SkinView::keyReleaseEvent(QKeyEvent *event) clear_finger_slot(false); qDebug() << "disable multi-touch"; } +#endif if (event->key() == Qt::Key_NumLock || event->key() == Qt::Key_CapsLock) { return;