tabWidget = new QTabWidget(this);
/* VM information table */
- QTableWidget *vmInfo = createVmInfoTable();
- tabWidget->addTab(vmInfo, tr(DETAILED_INFO_VMTAB_TITLE));
+ vmInfoTable = createVmInfoTable();
+ tabWidget->addTab(vmInfoTable, tr(DETAILED_INFO_VMTAB_TITLE));
/* shortcut info table */
- QTableWidget *shortcutInfo = createShortcutInfoTable();
- tabWidget->addTab(shortcutInfo, tr(DETAILED_INFO_SHORTCUTTAB_TITLE));
+ shortcutInfoTable = createShortcutInfoTable();
+ tabWidget->addTab(shortcutInfoTable, tr(DETAILED_INFO_SHORTCUTTAB_TITLE));
upsideLayout->addWidget(tabWidget);
baseLayout->addLayout(upsideLayout);
QTableWidget *DetailedInfoDialog::createVmInfoTable()
{
- vmInfoTable = new QTableWidget();
+ QTableWidget *vmInfo = new QTableWidget();
/* horizontal headers */
QStringList headers;
headers << DETAILED_INFO_VMTAB_HEADER1 << DETAILED_INFO_VMTAB_HEADER2;
- vmInfoTable->setColumnCount(headers.count());
- vmInfoTable->setHorizontalHeaderLabels(headers);
- vmInfoTable->horizontalHeader()->setStretchLastSection(true);
- vmInfoTable->verticalHeader()->hide();
+ vmInfo->setColumnCount(headers.count());
+ vmInfo->setHorizontalHeaderLabels(headers);
+ vmInfo->horizontalHeader()->setStretchLastSection(true);
+ vmInfo->verticalHeader()->hide();
- vmInfoTable->setEditTriggers(QAbstractItemView::NoEditTriggers);
- vmInfoTable->setAlternatingRowColors(true);
+ vmInfo->setEditTriggers(QAbstractItemView::NoEditTriggers);
+ vmInfo->setAlternatingRowColors(true);
/* insert table items */
- insertTableRow(vmInfoTable, QString(DETAILED_INFO_VM_NAME),
+ insertTableRow(vmInfo, QString(DETAILED_INFO_VM_NAME),
win->uiInfo->vmName);
- insertTableRow(vmInfoTable, QString(DETAILED_INFO_SKIN_NAME),
+ insertTableRow(vmInfo, QString(DETAILED_INFO_SKIN_NAME),
win->uiInfo->skinName);
- insertTableRow(vmInfoTable, QString(DETAILED_INFO_CPU), "x86");
+ insertTableRow(vmInfo, QString(DETAILED_INFO_CPU), "x86");
- insertTableRow(vmInfoTable, QString(DETAILED_INFO_RAM_SIZE),
+ insertTableRow(vmInfo, QString(DETAILED_INFO_RAM_SIZE),
QString::number(get_ram_size() >> 20) + " MiB");
- insertTableRow(vmInfoTable, QString(DETAILED_INFO_DPY_RESOLUTION),
+ insertTableRow(vmInfo, QString(DETAILED_INFO_DPY_RESOLUTION),
QString::number(win->uiInfo->resolution.width()) + "x" +
QString::number(win->uiInfo->resolution.height()));
- insertTableRow(vmInfoTable, QString(DETAILED_INFO_DPY_DENSITY),
+ insertTableRow(vmInfo, QString(DETAILED_INFO_DPY_DENSITY),
QString::number(get_display_pixel_density()));
QString sharingPath(get_host_directory_sharing_path());
- insertTableRow(vmInfoTable, QString(DETAILED_INFO_HDS_PATH),
+ insertTableRow(vmInfo, QString(DETAILED_INFO_HDS_PATH),
(sharingPath.isEmpty()) ? QString(GENERIC_TEXT_NONE) : sharingPath);
- insertTableRow(vmInfoTable, QString(DETAILED_INFO_CPU_VT),
+ insertTableRow(vmInfo, QString(DETAILED_INFO_CPU_VT),
(get_emul_cpu_accel()) ?
QString(GENERIC_TEXT_ENABLED) : QString(GENERIC_TEXT_DISABLED));
- insertTableRow(vmInfoTable, QString(DETAILED_INFO_GPU_VT),
+ insertTableRow(vmInfo, QString(DETAILED_INFO_GPU_VT),
(is_gpu_accel_enabled()) ?
QString(GENERIC_TEXT_ENABLED) : QString(GENERIC_TEXT_DISABLED));
QString drive_image_file(get_drive_image_file());
if (drive_image_file.isEmpty() == false) {
- insertTableRow(vmInfoTable, QString(DETAILED_INFO_DRIVE_IMAGE_FILE),
+ insertTableRow(vmInfo, QString(DETAILED_INFO_DRIVE_IMAGE_FILE),
drive_image_file, drive_image_file);
}
QString swap_image_file(get_swap_image_file());
if (swap_image_file.isEmpty() == false) {
- insertTableRow(vmInfoTable, QString(DETAILED_INFO_SWAP_IMAGE_FILE),
+ insertTableRow(vmInfo, QString(DETAILED_INFO_SWAP_IMAGE_FILE),
swap_image_file, swap_image_file);
}
QString log_redirect_file(get_log_redirect_file());
if (log_redirect_file.isEmpty() == false) {
- insertTableRow(vmInfoTable, QString(DETAILED_INFO_EMUL_LOG_FILE),
+ insertTableRow(vmInfo, QString(DETAILED_INFO_EMUL_LOG_FILE),
log_redirect_file, log_redirect_file);
}
QString kernel_log_redirect_file(get_kernel_log_redirect_file());
if (kernel_log_redirect_file.isEmpty() == false) {
- insertTableRow(vmInfoTable, QString(DETAILED_INFO_KERNEL_LOG_FILE),
+ insertTableRow(vmInfo, QString(DETAILED_INFO_KERNEL_LOG_FILE),
kernel_log_redirect_file, kernel_log_redirect_file);
}
#if 0
- insertTableRow(vmInfoTable, DETAILED_INFO_TELNET_PORT,
- QString::number(get_emul_serial_port()), index++);
+ insertTableRow(vmInfo, DETAILED_INFO_TELNET_PORT,
+ QString::number(get_emul_serial_port()));
#endif
/* add double click event listener */
- connect(vmInfoTable, SIGNAL(cellDoubleClicked(int, int)),
+ connect(vmInfo, SIGNAL(cellDoubleClicked(int, int)),
this, SLOT(slotCellOpen(int, int)));
- return vmInfoTable;
+ return vmInfo;
}
QTableWidget *DetailedInfoDialog::createShortcutInfoTable()
{
- shortcutInfoTable = new QTableWidget();
+ QTableWidget *shortcutInfo = new QTableWidget();
/* horizontal headers */
QStringList headers;
headers << DETAILED_INFO_SHORTCUTTAB_HEADER1 << DETAILED_INFO_SHORTCUTTAB_HEADER2;
- shortcutInfoTable->setColumnCount(headers.count());
- shortcutInfoTable->setHorizontalHeaderLabels(headers);
- shortcutInfoTable->horizontalHeader()->setStretchLastSection(true);
- shortcutInfoTable->verticalHeader()->hide();
+ shortcutInfo->setColumnCount(headers.count());
+ shortcutInfo->setHorizontalHeaderLabels(headers);
+ shortcutInfo->horizontalHeader()->setStretchLastSection(true);
+ shortcutInfo->verticalHeader()->hide();
- shortcutInfoTable->setEditTriggers(QAbstractItemView::NoEditTriggers);
- shortcutInfoTable->setAlternatingRowColors(true);
+ shortcutInfo->setEditTriggers(QAbstractItemView::NoEditTriggers);
+ shortcutInfo->setAlternatingRowColors(true);
- return shortcutInfoTable;
+ return shortcutInfo;
}
void DetailedInfoDialog::updateShortcutTableItems()
DetailedInfoDialog::~DetailedInfoDialog()
{
qDebug("destroy detailed info dialog");
-
- if (vmInfoTable) {
- delete vmInfoTable;
- vmInfoTable = NULL;
- }
- if (upsideLayout) {
- delete upsideLayout;
- upsideLayout = NULL;
- }
- if (downsideLayout) {
- delete downsideLayout;
- downsideLayout = NULL;
- }
- if (baseLayout) {
- delete baseLayout;
- baseLayout = NULL;
- }
}