--- /dev/null
+/*
+ * Qt UI
+ *
+ * Copyright (C) 2015 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * GiWoong Kim <giwoong.kim@samsung.com>
+ * Sangho Park <sangho1206.park@samsung.com>
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+#ifndef PROPERTYKEYWORD_H
+#define PROPERTYKEYWORD_H
+
+#define SKIN_PROPERTY_NAME "skin.name"
+#define SKIN_PROPERTY_WINDOW_X "window.x"
+#define SKIN_PROPERTY_WINDOW_Y "window.y"
+#define SKIN_PROPERTY_WINDOW_SCALE "window.scale"
+#define SKIN_PROPERTY_WINDOW_TOPMOST "window.ontop"
+#define SKIN_PROPERTY_CONTROLLER_INDEX "controller.index"
+#define SKIN_PROPERTY_CONTROLLER_DOCK "controller.dock"
+
+#endif // PROPERTYKEYWORD_H
#include <QApplication>
#include "qt5_supplement.h"
+#include "propertykeyword.h"
#include "mainwindow.h"
#include "layout/hardwarekey.h"
#include "xmllayoutparser.h"
static UIInformation *uiInfo;
#define GUI_PROPERTIES_FILE_NAME "gui.property"
-#define SKIN_PROPERTY_WINDOW_X "window.x"
-#define SKIN_PROPERTY_WINDOW_Y "window.y"
-#define SKIN_PROPERTY_WINDOW_SCALE "window.scale"
-#define SKIN_PROPERTY_WINDOW_TOPMOST "window.ontop"
-#define SKIN_PROPERTY_CONTROLLER_INDEX "controller.index"
-#define SKIN_PROPERTY_CONTROLLER_DOCK "controller.dock"
-
#define SKIN_INFO_FILE_NAME "info.ini"
#define FORM_FILE_NAME "layout.xml"
#define CON_FORM_SUBPATH "controller"
/* read skin information */
QSettings skinInfo(uiInfo->skinPath + SKIN_INFO_FILE_NAME,
QSettings::IniFormat);
- QString skinName = skinInfo.value("skin.name").toString();
+ QString skinName = skinInfo.value(SKIN_PROPERTY_NAME).toString();
if (skinName.isEmpty() == true) {
skinName = "Undefined";
}
--- /dev/null
+/*
+ * Qt UI
+ *
+ * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * GiWoong Kim <giwoong.kim@samsung.com>
+ * Sangho Park <sangho1206.park@samsung.com>
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+#ifndef XMLLAYOUTKEYWORD_H
+#define XMLLAYOUTKEYWORD_H
+
+#define NAME_ATTR_KEYWORD "name"
+#define PROP_ATTR_KEYWORD "property"
+#define DEFAULT_ATTR_KEYWORD "default"
+#define COLOR_RED_ATTR_KEYWORD "R"
+#define COLOR_GREEN_ATTR_KEYWORD "G"
+#define COLOR_BLUE_ATTR_KEYWORD "B"
+#define REGION_LEFT_ATTR_KEYWORD "left"
+#define REGION_TOP_ATTR_KEYWORD "top"
+#define REGION_WIDTH_ATTR_KEYWORD "width"
+#define REGION_HEIGHT_ATTR_KEYWORD "height"
+
+#define EMULATOR_UI_KEYWORD "EmulatorUI"
+#define CONTROLLER_UI_KEYWORD "ControllerUI"
+#define LAYOUTVER_KEYWORD "layoutVersion"
+#define COLOR_KEYWORD "color"
+#define REGION_KEYWORD "region"
+#define ANGLE_KEYWORD "angle"
+#define DISPLAY_KEYWORD "display"
+#define NORMAL_IMG_KEYWORD "normalImage"
+#define PRESSED_IMG_KEYWORD "pressedImage"
+#define MASK_IMG_KEYWORD "maskImage"
+#define ROTARY_IMG_KEYWORD "rotaryImage"
+#define KEYLIST_KEYWORD "keyList"
+#define KEY_KEYWORD "key"
+#define KEYCODE_KEYWORD "keycode"
+#define TOOLTIP_KEYWORD "tooltip"
+#define SHORTCUT_KEYWORD "shortcut"
+#define HOVER_KEYWORD "hover"
+#define FACTORLIST_KEYWORD "factorList"
+#define FACTOR_KEYWORD "factor"
+#define FORM_KEYWORD "form"
+#define FORMLIST_KEYWORD "formList"
+#define SHORTCUT_KEYWORD "shortcut"
+#define MENULIST_KEYWORD "menuList"
+
+#define SEPARATOR_MENU_KEYWORD "separator"
+#define ADVANCED_MENU_KEYWORD "advancedItem"
+#define INFO_MENU_KEYWORD "infoItem"
+#define ONTOP_MENU_KEYWORD "onTopItem"
+#define SWITCH_MENU_KEYWORD "switchItem"
+#define SCALE_MENU_KEYWORD "scaleItem"
+#define CONTROLLER_MENU_KEYWORD "controllerItem"
+#define HOSTKBD_MENU_KEYWORD "hostKeyboardItem"
+#define SHELL_MENU_KEYWORD "shellItem"
+#define ECP_MENU_KEYWORD "controlPanelItem"
+#define SCREENSHOT_MENU_KEYWORD "screenShotItem"
+#define ABOUT_MENU_KEYWORD "aboutItem"
+#define FORCECLOSE_MENU_KEYWORD "forceCloseItem"
+#define CLOSE_MENU_KEYWORD "closeItem"
+
+#endif // XMLLAYOUTKEYWORD_H
*/
#include "xmllayoutparser.h"
+#include "xmllayoutkeyword.h"
#include "skinpainter.h"
#include "controller/generalpurposecon.h"
-#define NAME_ATTR_KEYWORD "name"
-#define PROP_ATTR_KEYWORD "property"
-#define DEFAULT_ATTR_KEYWORD "default"
-
-#define LAYOUTVER_KEYWORD "layoutVersion"
-#define COLOR_KEYWORD "color"
-#define REGION_KEYWORD "region"
-#define DISPLAY_KEYWORD "display"
-#define NORMAL_IMG_KEYWORD "normalImage"
-#define PRESSED_IMG_KEYWORD "pressedImage"
-#define MASK_IMG_KEYWORD "maskImage"
-#define ROTARY_IMG_KEYWORD "rotaryImage"
-#define KEYLIST_KEYWORD "keyList"
-#define HOVER_KEYWORD "hover"
-#define FORM_KEYWORD "form"
-#define FORMLIST_KEYWORD "formList"
-#define SHORTCUT_KEYWORD "shortcut"
-#define MENULIST_KEYWORD "menuList"
-
/* Qt Qlayout has a minimum size */
#define QT_LAYOUT_MINIMUM (73)
xml.tokenType() == QXmlStreamReader::StartElement) {
QXmlStreamAttributes attributes = xml.attributes();
- if (attributes.hasAttribute("R")) {
- red = attributes.value("R").toString().toInt();
+ if (attributes.hasAttribute(COLOR_RED_ATTR_KEYWORD)) {
+ red = attributes.value(COLOR_RED_ATTR_KEYWORD).toString().toInt();
qDebug() << red;
}
- if (attributes.hasAttribute("G")) {
- green = attributes.value("G").toString().toInt();
+ if (attributes.hasAttribute(COLOR_GREEN_ATTR_KEYWORD)) {
+ green = attributes.value(COLOR_GREEN_ATTR_KEYWORD).toString().toInt();
qDebug() << green;
}
- if (attributes.hasAttribute("B")) {
- blue = attributes.value("B").toString().toUInt();
+ if (attributes.hasAttribute(COLOR_BLUE_ATTR_KEYWORD)) {
+ blue = attributes.value(COLOR_BLUE_ATTR_KEYWORD).toString().toUInt();
qDebug() << blue;
}
}
xml.tokenType() == QXmlStreamReader::StartElement) {
QXmlStreamAttributes attributes = xml.attributes();
- if (attributes.hasAttribute("left")) {
- left = attributes.value("left").toString().toInt();
+ if (attributes.hasAttribute(REGION_LEFT_ATTR_KEYWORD)) {
+ left = attributes.value(REGION_LEFT_ATTR_KEYWORD).toString().toInt();
}
- if (attributes.hasAttribute("top")) {
- top = attributes.value("top").toString().toInt();
+ if (attributes.hasAttribute(REGION_TOP_ATTR_KEYWORD)) {
+ top = attributes.value(REGION_TOP_ATTR_KEYWORD).toString().toInt();
}
- if (attributes.hasAttribute("width")) {
- width = attributes.value("width").toString().toUInt();
+ if (attributes.hasAttribute(REGION_WIDTH_ATTR_KEYWORD)) {
+ width = attributes.value(REGION_WIDTH_ATTR_KEYWORD).toString().toUInt();
}
- if (attributes.hasAttribute("height")) {
- height = attributes.value("height").toString().toUInt();
+ if (attributes.hasAttribute(REGION_HEIGHT_ATTR_KEYWORD)) {
+ height = attributes.value(REGION_HEIGHT_ATTR_KEYWORD).toString().toUInt();
}
}
qDebug("- rect : (%d,%d %dx%d)",
displayRect.x(), displayRect.y(),
displayRect.width(), displayRect.height());
- } else if (xml.name() == "angle") {
+ } else if (xml.name() == ANGLE_KEYWORD) {
/* angle */
angle = xml.readElementText().toInt();
} else if (xml.name() == MASK_IMG_KEYWORD) {
QXmlStreamReader::TokenType token = xml.readNext();
- while (xml.atEnd() == false && (xml.name() == "key" &&
+ while (xml.atEnd() == false && (xml.name() == KEY_KEYWORD &&
token == QXmlStreamReader::EndElement) == false) /* ~ </key> */
{
if (token == QXmlStreamReader::StartElement) {
if (xml.name() == REGION_KEYWORD) {
/* region */
keyRegion = parseRegion(xml);
- } else if (xml.name() == "keycode") {
+ } else if (xml.name() == KEYCODE_KEYWORD) {
/* keycode */
keycode = xml.readElementText().toInt();
- } else if (xml.name() == "tooltip") {
+ } else if (xml.name() == TOOLTIP_KEYWORD) {
/* tooltip */
keyTooptip = xml.readElementText();
- } else if (xml.name() == "shortcut") {
+ } else if (xml.name() == SHORTCUT_KEYWORD) {
/* shortcut */
keySequence = xml.readElementText();
}
token == QXmlStreamReader::EndElement) == false) /* ~ </keyList> */
{
if (token == QXmlStreamReader::StartElement) {
- if (xml.name() == "key") {
+ if (xml.name() == KEY_KEYWORD) {
hwKey = parseKey(xml);
if (hwKey != NULL) {
list.append(hwKey);
token == QXmlStreamReader::EndElement) == false) /* ~ </factorList> */
{
if (token == QXmlStreamReader::StartElement) {
- if (xml.name() == "factor") {
+ if (xml.name() == FACTOR_KEYWORD) {
QString value = xml.attributes().value(NAME_ATTR_KEYWORD).toString();
map.insert(xml.readElementText().toInt(), value);
}
if (token == QXmlStreamReader::StartElement) {
if (xml.name() == SHORTCUT_KEYWORD) {
parseShortcut(xml, item->getShortcutMap());
- } else if (xml.name() == "factorList") {
+ } else if (xml.name() == FACTORLIST_KEYWORD) {
int defaultFactor = 0;
int cnt = parseFactorList(xml, item->getFactorMap(), &defaultFactor);
qDebug("- scale factorList : %d", cnt);
token == QXmlStreamReader::EndElement) == false) /* ~ </menuList> */
{
if (token == QXmlStreamReader::StartElement) {
- if (xml.name() == "separator") {
+ if (xml.name() == SEPARATOR_MENU_KEYWORD) {
item = new MenuItem(MenuItemType::separator, NULL);
if (item != NULL) {
list.append(item);
}
- } else if (xml.name() == "advancedItem") {
+ } else if (xml.name() == ADVANCED_MENU_KEYWORD) {
item = (MenuItem *)parseAdvancedMenuItem(xml);
if (item != NULL) {
list.append(item);
}
- } else if (xml.name() == "infoItem") {
+ } else if (xml.name() == INFO_MENU_KEYWORD) {
item = parseGeneralMenuItem(xml, MenuItemType::infoItem);
if (item != NULL) {
list.append(item);
}
- } else if (xml.name() == "onTopItem") {
+ } else if (xml.name() == ONTOP_MENU_KEYWORD) {
item = parseGeneralMenuItem(xml, MenuItemType::onTopItem);
if (item != NULL) {
list.append(item);
}
- } else if (xml.name() == "switchItem") {
+ } else if (xml.name() == SWITCH_MENU_KEYWORD) {
item = parseGeneralMenuItem(xml, MenuItemType::switchItem);
if (item != NULL) {
list.append(item);
}
- } else if (xml.name() == "scaleItem") {
+ } else if (xml.name() == SCALE_MENU_KEYWORD) {
item = (MenuItem *)parseScaleMenuItem(xml);
if (item != NULL) {
list.append(item);
}
- } else if (xml.name() == "controllerItem") {
+ } else if (xml.name() == CONTROLLER_MENU_KEYWORD) {
item = parseGeneralMenuItem(xml, MenuItemType::controllerItem);
if (item != NULL) {
list.append(item);
}
- } else if (xml.name() == "hostKeyboardItem") {
+ } else if (xml.name() == HOSTKBD_MENU_KEYWORD) {
item = parseGeneralMenuItem(xml, MenuItemType::hostKeyboardItem);
if (item != NULL) {
list.append(item);
}
- } else if (xml.name() == "shellItem") {
+ } else if (xml.name() == SHELL_MENU_KEYWORD) {
item = parseGeneralMenuItem(xml, MenuItemType::shellItem);
if (item != NULL) {
list.append(item);
}
- } else if (xml.name() == "controlPanelItem") {
+ } else if (xml.name() == ECP_MENU_KEYWORD) {
item = parseGeneralMenuItem(xml, MenuItemType::controlPanelItem);
if (item != NULL) {
list.append(item);
}
- } else if (xml.name() == "screenShotItem") {
+ } else if (xml.name() == SCREENSHOT_MENU_KEYWORD) {
item = parseGeneralMenuItem(xml, MenuItemType::screenShotItem);
if (item != NULL) {
list.append(item);
}
- } else if (xml.name() == "aboutItem") {
+ } else if (xml.name() == ABOUT_MENU_KEYWORD) {
item = parseGeneralMenuItem(xml, MenuItemType::aboutItem);
if (item != NULL) {
list.append(item);
}
- } else if (xml.name() == "forceCloseItem") {
+ } else if (xml.name() == FORCECLOSE_MENU_KEYWORD) {
item = parseGeneralMenuItem(xml, MenuItemType::forceCloseItem);
if (item != NULL) {
list.append(item);
}
- } else if (xml.name() == "closeItem") {
+ } else if (xml.name() == CLOSE_MENU_KEYWORD) {
item = parseGeneralMenuItem(xml, MenuItemType::closeItem);
if (item != NULL) {
list.append(item);
}
if (token == QXmlStreamReader::StartElement) {
- if (xml.name() == "EmulatorUI") {
+ if (xml.name() == EMULATOR_UI_KEYWORD) {
continue;
}
}
if (token == QXmlStreamReader::StartElement) {
- if (xml.name() == "ControllerUI") {
+ if (xml.name() == CONTROLLER_UI_KEYWORD) {
continue;
}
*/
#include "keyboardshortcut.h"
+#include "resource/maru_strings.h"
#include "mainwindow.h"
KeyboardShortcut::KeyboardShortcut(QWidget *parent) : QWidget(parent)
*/
#include "aboutdialog.h"
+#include "resource/maru_strings.h"
#include "build_info.h"
#define SDK_NAME "Tizen SDK"
AboutDialog::AboutDialog(QWidget *parent) :
QDialog(parent, Qt::WindowTitleHint | Qt::WindowCloseButtonHint | Qt::WindowStaysOnTopHint)
{
- setWindowTitle("About Emulator");
+ setWindowTitle(ABOUT_TITLE);
QVBoxLayout *baseLayout = new QVBoxLayout(this);
baseLayout->setMargin(0);
*/
QString aboutText = QString(SDK_NAME) + "<p>"
- + "Version : " + version + "<br>"
+ + ABOUT_VERSION_TEXT + " : " + version + "<br>"
/* + "Snapshot : " + SnapshotName + "<br>" */
- + "Build Date : " + QString(build_date) + "<p><br>"
- + "Visit " + URL_TIZEN_ORG;
+ + ABOUT_BUILD_DATE_TEXT + " : " + QString(build_date) + "<p><br>"
+ + ABOUT_VISIT_TEXT + " " + URL_TIZEN_ORG;
QLabel *textLabel = new QLabel(this);
textLabel->setStyleSheet("background-color: white");
*/
#include "contextmenu.h"
+#include "resource/maru_strings.h"
#include "emulator_common.h"
#include "mainwindow.h"
#include "uiutil.h"
*/
#include "detailedinfodialog.h"
+#include "resource/maru_strings.h"
#include "mainwindow.h"
extern int _qemu_argc;
tabWidget = new QTabWidget(this);
QWidget *vmInfo = new QWidget;
QWidget *shortcutInfo = new QWidget;
- tabWidget->addTab(vmInfo, tr("VM Info"));
- tabWidget->addTab(shortcutInfo, tr("Shortcut Info"));
+ tabWidget->addTab(vmInfo, tr(DETAILED_INFO_VMTAB_TITLE));
+ tabWidget->addTab(shortcutInfo, tr(DETAILED_INFO_SHORTCUTTAB_TITLE));
connect(tabWidget, SIGNAL(currentChanged(int)), this, SLOT(slotSetMaximumSize(int)));
/* VM information table */
vmInfoTable->verticalHeader()->hide();
QStringList header;
- header << "Feature" << "Value";
+ header << DETAILED_INFO_VMTAB_HEADER1 << DETAILED_INFO_VMTAB_HEADER2;
vmInfoTable->setHorizontalHeaderLabels(header);
/* shortcut info table */
shortcutInfoTable->verticalHeader()->hide();
header.clear();
- header << "Function" << "Key sequence";
+ header << DETAILED_INFO_SHORTCUTTAB_HEADER1 << DETAILED_INFO_SHORTCUTTAB_HEADER2;
shortcutInfoTable->setHorizontalHeaderLabels(header);
/* table items */
int index = 0;
- setDataTable(vmInfoTable, "VM Name", win->uiInfo->vmName, index++);
- setDataTable(vmInfoTable, "Skin Name", win->uiInfo->skinName, index++);
- setDataTable(vmInfoTable, "CPU", "x86", index++);
- setDataTable(vmInfoTable, "Ram Size", QString(get_emul_ram_size()) + " MB", index++);
- setDataTable(vmInfoTable, "Display Resolution",
- QString::number(win->uiInfo->resolution.width()) + "x" +
- QString::number(win->uiInfo->resolution.height()), index++);
+ setDataTable(vmInfoTable, DETAILED_INFO_VM_NAME,
+ win->uiInfo->vmName, index++);
+ setDataTable(vmInfoTable, DETAILED_INFO_SKIN_NAME,
+ win->uiInfo->skinName, index++);
+ setDataTable(vmInfoTable, DETAILED_INFO_CPU, "x86", index++);
+ setDataTable(vmInfoTable, DETAILED_INFO_RAM_SIZE,
+ QString(get_emul_ram_size()) + " MB", index++);
+ setDataTable(vmInfoTable, DETAILED_INFO_DPY_RESOLUTION,
+ QString::number(win->uiInfo->resolution.width()) + "x" +
+ QString::number(win->uiInfo->resolution.height()), index++);
#if 0
setDataTable(vmInfoTable, "Display Density", "0"/* TODO: */, index++);
#endif
QString sharingPath(get_emul_file_sharing_path());
- setDataTable(vmInfoTable, "File Sharing Path", (sharingPath.isEmpty()) ? "None" : sharingPath, index++);
- setDataTable(vmInfoTable, "CPU Virtualization", (get_emul_cpu_accel()) ? "Enabled" : "Disabled", index++);
- setDataTable(vmInfoTable, "GPU Virtualization", (get_emul_gpu_accel()) ? "Enabled" : "Disabled", index++);
+ setDataTable(vmInfoTable, DETAILED_INFO_HDS_PATH,
+ (sharingPath.isEmpty()) ? "None" : sharingPath, index++);
+ setDataTable(vmInfoTable, DETAILED_INFO_CPU_VT,
+ (get_emul_cpu_accel()) ? "Enabled" : "Disabled", index++);
+ setDataTable(vmInfoTable, DETAILED_INFO_GPU_VT,
+ (get_emul_gpu_accel()) ? "Enabled" : "Disabled", index++);
for (int i = 0; i < imagePathList.size(); i++) {
- setDataTable(vmInfoTable, "Image Path " + QString::number(i + 1),
- imagePathList[i], index++);
+ setDataTable(vmInfoTable, QString(DETAILED_INFO_IMAGE_PATH) + " " +
+ QString::number(i + 1), imagePathList[i], index++);
item->setToolTip(imagePathList[i]);
}
- setDataTable(vmInfoTable, "Log Path", get_log_path(), index++);
+ setDataTable(vmInfoTable, DETAILED_INFO_LOG_PATH, get_log_path(), index++);
item->setToolTip(get_log_path());
/* temp */
- setDataTable(vmInfoTable, "Logging Telnet Port", QString::number(get_emul_serial_port()), index++);
+ setDataTable(vmInfoTable, DETAILED_INFO_TELNET_PORT,
+ QString::number(get_emul_serial_port()), index++);
/* add double click event listener */
- connect(vmInfoTable, SIGNAL(cellDoubleClicked(int, int)), this, SLOT(slotDoubleClicked(int, int)));
+ connect(vmInfoTable, SIGNAL(cellDoubleClicked(int, int)),
+ this, SLOT(slotDoubleClicked(int, int)));
int tableHeight = vmInfoTable->horizontalHeader()->height();
for (int i = 0; i < vmInfoTable->rowCount(); i++) {
return;
item = vmInfoTable->item(nRow, 0);
- if (item->text().compare("File Sharing Path", Qt::CaseInsensitive) == 0 ||
- item->text().startsWith("Image Path") == true ||
- item->text().compare("Log Path", Qt::CaseInsensitive) == 0) {
+ if (item->text().compare(DETAILED_INFO_HDS_PATH, Qt::CaseInsensitive) == 0 ||
+ item->text().startsWith(DETAILED_INFO_IMAGE_PATH) == true ||
+ item->text().compare(DETAILED_INFO_LOG_PATH, Qt::CaseInsensitive) == 0) {
/* get path name */
item = vmInfoTable->item(nRow, nCol);
if (item->text().compare("None", Qt::CaseInsensitive) == 0 ||
#include "input/keyboardshortcut.h"
-#define DETAILED_INFO_TITLE "Detailed Info"
#define TABLE_BORDER_SIZE 2
#define TAB_BORDER_SIZE 4
#define DIALOG_HORIZ_SPACE 20
#include <qtoolbutton.h>
#include "screenshotdialog.h"
+#include "resource/maru_strings.h"
#include "screenshotview.h"
#include "mainwindow.h"
toolBar = new QToolBar(this);
/* Save */
- actionSave = new QAction("&Save", this);
+ actionSave = new QAction(SCREENSHOT_SAVE_TEXT, this);
actionSave->setShortcuts(QKeySequence::Save);
actionSave->setIcon(QIcon(":/icons/save_screenshot_dialog.png"));
- actionSave->setToolTip("Save to file");
+ actionSave->setToolTip(SCREENSHOT_SAVE_TOOLTIP);
connect(actionSave, SIGNAL(triggered()), this, SLOT(slotSave()));
toolBar->addAction(actionSave);
/* Copy */
- actionCopy = new QAction("&Copy", this);
+ actionCopy = new QAction(SCREENSHOT_COPY_TEXT, this);
actionCopy->setShortcuts(QKeySequence::Copy);
actionCopy->setIcon(QIcon(":/icons/copy_screenshot_dialog.png"));
- actionCopy->setToolTip("Copy to clipboard");
+ actionCopy->setToolTip(SCREENSHOT_COPY_TOOLTIP);
connect(actionCopy, SIGNAL(triggered()), this, SLOT(slotCopy()));
toolBar->addAction(actionCopy);
/* Refresh */
- actionRefresh = new QAction("&Refresh", this);
+ actionRefresh = new QAction(SCREENSHOT_REFRESH_TEXT, this);
actionRefresh->setShortcuts(QKeySequence::Refresh);
actionRefresh->setIcon(QIcon(":/icons/refresh_screenshot_dialog.png"));
- actionRefresh->setToolTip("Refresh Image");
+ actionRefresh->setToolTip(SCREENSHOT_REFRESH_TOOLTIP);
connect(actionRefresh, SIGNAL(triggered()),
win->getPopupMenu(), SLOT(slotRequestScreenshot()));
toolBar->addAction(actionRefresh);
--- /dev/null
+/*
+ * Qt UI
+ *
+ * Copyright (C) 2015 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * GiWoong Kim <giwoong.kim@samsung.com>
+ * Sangho Park <sangho1206.park@samsung.com>
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+#ifndef MARU_STRINGS_H
+#define MARU_STRINGS_H
+
+/* detailed info dialog */
+#define DETAILED_INFO_TITLE "Detailed Info"
+#define DETAILED_INFO_VMTAB_TITLE "VM Info"
+#define DETAILED_INFO_SHORTCUTTAB_TITLE "Shortcut Info"
+#define DETAILED_INFO_VMTAB_HEADER1 "Feature"
+#define DETAILED_INFO_VMTAB_HEADER2 "Value"
+#define DETAILED_INFO_SHORTCUTTAB_HEADER1 "Function"
+#define DETAILED_INFO_SHORTCUTTAB_HEADER2 "Key sequence"
+
+#define DETAILED_INFO_VM_NAME "VM Name"
+#define DETAILED_INFO_SKIN_NAME "Skin Name"
+#define DETAILED_INFO_CPU "CPU"
+#define DETAILED_INFO_RAM_SIZE "Ram Size"
+#define DETAILED_INFO_DPY_RESOLUTION "Display Resolution"
+#define DETAILED_INFO_HDS_PATH "File Sharing Path"
+#define DETAILED_INFO_CPU_VT "CPU Virtualization"
+#define DETAILED_INFO_GPU_VT "GPU Virtualization"
+#define DETAILED_INFO_IMAGE_PATH "Image Path"
+#define DETAILED_INFO_LOG_PATH "Log Path"
+#define DETAILED_INFO_TELNET_PORT "Logging Telnet Port"
+
+/* screen shot dialog */
+#define SCREENSHOT_SAVE_TEXT "&Save"
+#define SCREENSHOT_SAVE_TOOLTIP "Save to file"
+#define SCREENSHOT_COPY_TEXT "&Copy"
+#define SCREENSHOT_COPY_TOOLTIP "Copy to clipboard"
+#define SCREENSHOT_REFRESH_TEXT "&Refresh"
+#define SCREENSHOT_REFRESH_TOOLTIP "Refresh Image"
+
+/* about dialog */
+#define ABOUT_TITLE "About Emulator"
+#define ABOUT_VERSION_TEXT "Version"
+#define ABOUT_BUILD_DATE_TEXT "Build Date"
+#define ABOUT_VISIT_TEXT "Visit"
+
+#endif // MARU_STRINGS_H