#include "aboutdialog.h"
+#include "build_info.h"
#define SDK_NAME "Tizen SDK"
-#define URL_TIZEN_ORG "https://developer.tizen.org";
+#define URL_TIZEN_ORG "<a href=\"https://developer.tizen.org\">https://developer.tizen.org</a>";
AboutDialog::AboutDialog(QWidget *parent) :
QDialog(parent)
/* upside */
QHBoxLayout *upsideLayout = new QHBoxLayout();
upsideLayout->setMargin(0);
- upsideLayout->setSpacing(5);
+ upsideLayout->setSpacing(0);
QLabel *imageLabel = new QLabel(this);
imageLabel->setPixmap(QPixmap(":about.png"));
QSettings sdkVersion("../../../sdk.version", QSettings::IniFormat);
QString version = sdkVersion.value("TIZEN_SDK_VERSION").toString();
if (version.isEmpty() == true) {
+ qWarning("failed to load SDK version");
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;
+ QString SnapshotName = "Undefined";
+ QFile file("../../../install-manager/installmanager.conf");
+ if (file.open(QIODevice::ReadOnly | QIODevice::Text) == true) {
+ QTextStream in(&file);
+ while (!in.atEnd()) {
+ QString line = in.readLine();
+ if (line.startsWith("Snapshot-Path", Qt::CaseInsensitive) == true) {
+ QStringList snapshotPath = line.split(":", QString::SkipEmptyParts)[1].split("/");
+ SnapshotName = snapshotPath.last().trimmed();
+ qDebug() << "Snapshot Name :" << SnapshotName;
+ }
+ }
+
+ file.close();
+ } else {
+ qWarning("failed to load snapshot name");
+ }
+
+ QString aboutText = QString(SDK_NAME) + "<p>"
+ + "Version : " + version + "<br>"
+ + "Build Date : " + QString(build_date) + "<br>"
+ + "SDK Snapshot Name : " + SnapshotName + "<p><br>"
+ + "Visit " + URL_TIZEN_ORG;
QLabel *textLabel = new QLabel(this);
textLabel->setStyleSheet("background-color: white");
+ textLabel->setTextFormat(Qt::RichText);
+ //textLabel->setTextInteractionFlags(Qt::TextSelectableByMouse);
+ textLabel->setOpenExternalLinks(true);
+ textLabel->setMargin(10);
textLabel->setText(aboutText);
upsideLayout->addWidget(textLabel);
connect(action, SIGNAL(triggered(bool)), this, SLOT(slotTopMost(bool)));
/* = Rotate menu = */
- QMenu *rotateMenu = addMenu(QIcon(QPixmap(":/icons/rotate.png")), "Rotate");
- QActionGroup *rotateGroup = new QActionGroup(this);
- rotateMapper = new QSignalMapper(this);
- connect(rotateMapper, SIGNAL(mapped(int)), this, SLOT(slotRotate(int)));
-
- action = rotateMenu->addAction("Portrait");
- action->setActionGroup(rotateGroup);
- action->setCheckable(true);
- rotateMapper->setMapping(action, 0);
- connect(action, SIGNAL(triggered()), rotateMapper, SLOT(map()));
-
- action = rotateMenu->addAction("Landscape");
- action->setActionGroup(rotateGroup);
- action->setCheckable(true);
- rotateMapper->setMapping(action, 270);
- connect(action, SIGNAL(triggered()), rotateMapper, SLOT(map()));
-
- action = rotateMenu->addAction("Reverse Portrait");
- action->setActionGroup(rotateGroup);
- action->setCheckable(true);
- rotateMapper->setMapping(action, 180);
- connect(action, SIGNAL(triggered()), rotateMapper, SLOT(map()));
-
- action = rotateMenu->addAction("Reverse Landscape");
- action->setActionGroup(rotateGroup);
- action->setCheckable(true);
- rotateMapper->setMapping(action, 90);
- connect(action, SIGNAL(triggered()), rotateMapper, SLOT(map()));
-
- action = (QAction *)rotateMapper->mapping(win->getUIState()->formAngle);
- action->setChecked(true);
+ if (win->uiInfo->formList.count() > 1) {
+ QMenu *rotateMenu = addMenu(QIcon(QPixmap(":/icons/rotate.png")), "&Rotate");
+ QActionGroup *rotateGroup = new QActionGroup(this);
+ rotateMapper = new QSignalMapper(this);
+ connect(rotateMapper, SIGNAL(mapped(int)), this, SLOT(slotRotate(int)));
+
+ action = rotateMenu->addAction("Portrait");
+ action->setActionGroup(rotateGroup);
+ action->setCheckable(true);
+ rotateMapper->setMapping(action, 0);
+ connect(action, SIGNAL(triggered()), rotateMapper, SLOT(map()));
+
+ action = rotateMenu->addAction("Landscape");
+ action->setActionGroup(rotateGroup);
+ action->setCheckable(true);
+ rotateMapper->setMapping(action, 270);
+ connect(action, SIGNAL(triggered()), rotateMapper, SLOT(map()));
+
+ action = rotateMenu->addAction("Reverse Portrait");
+ action->setActionGroup(rotateGroup);
+ action->setCheckable(true);
+ rotateMapper->setMapping(action, 180);
+ connect(action, SIGNAL(triggered()), rotateMapper, SLOT(map()));
+
+ action = rotateMenu->addAction("Reverse Landscape");
+ action->setActionGroup(rotateGroup);
+ action->setCheckable(true);
+ rotateMapper->setMapping(action, 90);
+ connect(action, SIGNAL(triggered()), rotateMapper, SLOT(map()));
+
+ action = (QAction *)rotateMapper->mapping(win->getUIState()->formAngle);
+ action->setChecked(true);
+ }
/* =============== */
/* = Scale menu = */
- QMenu *scaleMenu = addMenu(QIcon(QPixmap(":/icons/scale.png")), "Scale");
+ QMenu *scaleMenu = addMenu(QIcon(QPixmap(":/icons/scale.png")), "&Scale");
QActionGroup *scaleGroup = new QActionGroup(this);
scaleMapper = new QSignalMapper(this);
connect(scaleMapper, SIGNAL(mapped(int)), this, SLOT(slotScale(int)));
}
/* = Advanced menu = */
- QMenu *advancedMenu = addMenu(QIcon(QPixmap(":/icons/advanced.png")), "Advanced");
+ QMenu *advancedMenu = addMenu(QIcon(QPixmap(":/icons/advanced.png")), "Ad&vanced");
#if 0
/* Advanced > Screen Shot menu */
/* Advanced > About menu */
aboutDialog = new AboutDialog(win);
- action = advancedMenu->addAction("About");
+ action = advancedMenu->addAction("&About");
action->setIcon(QIcon(QPixmap(":/icons/about.png")));
connect(action, SIGNAL(triggered()), this, SLOT(slotAbout()));
/* Advanced > Force Close menu */
- action = advancedMenu->addAction("Force Close");
+ action = advancedMenu->addAction("&Force Close");
action->setIcon(QIcon(QPixmap(":/icons/force_close.png")));
connect(action, SIGNAL(triggered()), this, SLOT(slotForceClose()));
/* ================= */
/* Shell menu */
- action = addAction("Shell");
+ action = addAction("S&hell");
action->setIcon(QIcon(QPixmap(":/icons/shell.png")));
connect(action, SIGNAL(triggered()), this, SLOT(slotShell()));
/* Control Panel menu */
- action = addAction("Control Panel");
+ action = addAction("Control &Panel");
action->setIcon(QIcon(QPixmap(":/icons/control_panel.png")));
connect(action, SIGNAL(triggered()), this, SLOT(slotControlPanel()));
return;
}
- qint32 basePort = get_emul_vm_base_port();
+ MainWindow *win = (MainWindow *)this->parent();
+ qint32 basePort = win->uiInfo->basePort;
QString sdbPort = QString::number(basePort + 1);
QString sdbSerial = "emulator-" + sdbPort;
- QString vmName = get_emul_vm_name();
+ QString vmName = win->uiInfo->vmName;
QString sdbPath;
#ifdef CONFIG_WIN32
sdbPath = "..\\..\\ansicon.exe";
{
MainWindow *win = ((MainWindow *)this->parent());
- setWindowTitle("Detailed Info - " + win->uiInfo->vmName);
+ setWindowTitle("Detailed Info");
QVBoxLayout *baseLayout = new QVBoxLayout(this);
baseLayout->setMargin(10);
/* VM information table */
QTableWidget *infoTable = new QTableWidget(this);
- infoTable->setRowCount(12);
+ infoTable->setRowCount(11);
infoTable->setColumnCount(2);
infoTable->setEditTriggers(QAbstractItemView::NoEditTriggers);
infoTable->setAlternatingRowColors(true);
item = new QTableWidgetItem("Ram Size");
infoTable->setItem(index, 0, item);
- item = new QTableWidgetItem("0"); // TODO:
+ item = new QTableWidgetItem(get_emul_ram_size());
infoTable->setItem(index++, 1, item);
item = new QTableWidgetItem("Display Resolution");
+ "x" + QString::number(win->uiInfo->resolution.height()));
infoTable->setItem(index++, 1, item);
+#if 0
item = new QTableWidgetItem("Display Density");
infoTable->setItem(index, 0, item);
item = new QTableWidgetItem("0"); // TODO:
infoTable->setItem(index++, 1, item);
+#endif
item = new QTableWidgetItem("File Sharing Path");
infoTable->setItem(index, 0, item);
item = new QTableWidgetItem(get_log_path());
infoTable->setItem(index++, 1, item);
+ /* temp */
+ item = new QTableWidgetItem("Logging Telnet Port");
+ infoTable->setItem(index, 0, item);
+ item = new QTableWidgetItem(QString::number(win->uiInfo->basePort + 4));
+ infoTable->setItem(index++, 1, item);
+
int tableHeight = infoTable->horizontalHeader()->height();
for (int i = 0; i < infoTable->rowCount(); i++) {
tableHeight += infoTable->rowHeight(i);