1 | /** @file
|
---|
2 | *
|
---|
3 | * VBox frontends: Qt4 GUI ("VirtualBox"):
|
---|
4 | * VBoxLineTextEdit class declaration
|
---|
5 | */
|
---|
6 |
|
---|
7 | /*
|
---|
8 | * Copyright (C) 2009 Sun Microsystems, Inc.
|
---|
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 (GPL) as published by the Free Software
|
---|
14 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
15 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
16 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
17 | *
|
---|
18 | * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
19 | * Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
20 | * additional information or have any questions.
|
---|
21 | */
|
---|
22 |
|
---|
23 | #ifndef __VBoxLineTextEdit_h__
|
---|
24 | #define __VBoxLineTextEdit_h__
|
---|
25 |
|
---|
26 | /* VBox includes */
|
---|
27 | #include "QIDialog.h"
|
---|
28 | #include "QIWithRetranslateUI.h"
|
---|
29 |
|
---|
30 | /* Qt includes */
|
---|
31 | #include <QPushButton>
|
---|
32 |
|
---|
33 | /* Qt forward declarations */
|
---|
34 | class QTextEdit;
|
---|
35 | class QDialogButtonBox;
|
---|
36 |
|
---|
37 | ////////////////////////////////////////////////////////////////////////////////
|
---|
38 | // VBoxTextEditor
|
---|
39 |
|
---|
40 | class VBoxTextEditor: public QIWithRetranslateUI<QIDialog>
|
---|
41 | {
|
---|
42 | Q_OBJECT;
|
---|
43 |
|
---|
44 | public:
|
---|
45 | VBoxTextEditor (QWidget *aParent = NULL);
|
---|
46 |
|
---|
47 | void setText (const QString& aText);
|
---|
48 | QString text() const;
|
---|
49 |
|
---|
50 | protected:
|
---|
51 | void retranslateUi();
|
---|
52 |
|
---|
53 | private slots:
|
---|
54 | void open();
|
---|
55 |
|
---|
56 | private:
|
---|
57 | /* Private member vars */
|
---|
58 | QTextEdit *mTextEdit;
|
---|
59 | QDialogButtonBox *mButtonBox;
|
---|
60 | QPushButton *mOpenBtn;
|
---|
61 | };
|
---|
62 |
|
---|
63 | ////////////////////////////////////////////////////////////////////////////////
|
---|
64 | // VBoxLineTextEdit
|
---|
65 |
|
---|
66 | class VBoxLineTextEdit: public QIWithRetranslateUI<QPushButton>
|
---|
67 | {
|
---|
68 | Q_OBJECT;
|
---|
69 |
|
---|
70 | public:
|
---|
71 | VBoxLineTextEdit (QWidget *aParent = NULL);
|
---|
72 |
|
---|
73 | void setText (const QString& aText) { mText = aText; }
|
---|
74 | QString text() const { return mText; }
|
---|
75 |
|
---|
76 | protected:
|
---|
77 | void retranslateUi();
|
---|
78 |
|
---|
79 | private slots:
|
---|
80 | void edit();
|
---|
81 |
|
---|
82 | private:
|
---|
83 | /* Private member vars */
|
---|
84 | QString mText;
|
---|
85 | };
|
---|
86 |
|
---|
87 | #endif /* __VBoxLineTextEdit_h__ */
|
---|
88 |
|
---|