VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/ui/VBoxSnapshotDetailsDlg.ui.h@ 2671

Last change on this file since 2671 was 382, checked in by vboxsync, 18 years ago

export to OSE again

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.5 KB
Line 
1/**
2 *
3 * VBox frontends: Qt GUI ("VirtualBox"):
4 * "Snapshot details" dialog UI include (Qt Designer)
5 */
6
7/*
8 * Copyright (C) 2006 InnoTek Systemberatung GmbH
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.virtualbox.org. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
13 * General Public License as published by the Free Software Foundation,
14 * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
15 * distribution. VirtualBox OSE is distributed in the hope that it will
16 * be useful, but WITHOUT ANY WARRANTY of any kind.
17 *
18 * If you received this file as part of a commercial VirtualBox
19 * distribution, then only the terms of your commercial VirtualBox
20 * license agreement apply instead of the previous paragraph.
21 */
22
23/****************************************************************************
24** ui.h extension file, included from the uic-generated form implementation.
25**
26** If you wish to add, delete or rename functions or slots use
27** Qt Designer which will update this file, preserving your code. Create an
28** init() function in place of a constructor, and a destroy() function in
29** place of a destructor.
30*****************************************************************************/
31
32
33void VBoxSnapshotDetailsDlg::init()
34{
35 setIcon (QPixmap::fromMimeSource ("settings_16px.png"));
36
37 txeSummary->setPaper (this->backgroundBrush());
38 txeSummary->setLinkUnderline (false);
39
40 // filter out Enter keys in order to direct them to the default dlg button
41 QIKeyFilter *ef = new QIKeyFilter (this, Key_Enter);
42 ef->watchOn (txeSummary);
43
44 txeSummary->setFocus();
45}
46
47void VBoxSnapshotDetailsDlg::getFromSnapshot (const CSnapshot &s)
48{
49 csnapshot = s;
50 CMachine machine = s.GetMachine();
51
52 // get properties
53 leName->setText (s.GetName());
54 txeDescription->setText (s.GetDescription());
55
56 // compose summary
57 txeSummary->setText (
58 vboxGlobal().detailsReport (machine, false /* isNewVM */,
59 false /* withLinks */));
60 setCaption (tr ("Details of %1 (%2)")
61 .arg (csnapshot.GetName()).arg (machine.GetName()));
62}
63
64void VBoxSnapshotDetailsDlg::putBackToSnapshot()
65{
66 AssertReturn (!csnapshot.isNull(), (void) 0);
67
68 csnapshot.SetName (leName->text());
69 csnapshot.SetDescription (txeDescription->text());
70}
71
72void VBoxSnapshotDetailsDlg::leName_textChanged (const QString &aText)
73{
74 buttonOk->setEnabled (!aText.stripWhiteSpace().isEmpty());
75}
76
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette