OSDN Git Service

String fixes
[qt-creator-jp/qt-creator-jp.git] / share / qtcreator / qmldesigner / propertyeditor / QtWebKit / WebViewSpecifics.qml
1 /**************************************************************************
2 **
3 ** This file is part of Qt Creator
4 **
5 ** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
6 **
7 ** Contact: Nokia Corporation (qt-info@nokia.com)
8 **
9 **
10 ** GNU Lesser General Public License Usage
11 **
12 ** This file may be used under the terms of the GNU Lesser General Public
13 ** License version 2.1 as published by the Free Software Foundation and
14 ** appearing in the file LICENSE.LGPL included in the packaging of this file.
15 ** Please review the following information to ensure the GNU Lesser General
16 ** Public License version 2.1 requirements will be met:
17 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
18 **
19 ** In addition, as a special exception, Nokia gives you certain additional
20 ** rights. These rights are described in the Nokia Qt LGPL Exception
21 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
22 **
23 ** Other Usage
24 **
25 ** Alternatively, this file may be used in accordance with the terms and
26 ** conditions contained in a signed written agreement between you and Nokia.
27 **
28 ** If you have questions regarding the use of this file, please contact
29 ** Nokia at qt-info@nokia.com.
30 **
31 **************************************************************************/
32
33 import Qt 4.7
34 import Bauhaus 1.0
35 import "../Qt/"
36
37 QWidget {
38     layout: QVBoxLayout {
39         topMargin: 0
40         bottomMargin: 0
41         leftMargin: 0
42         rightMargin: 0
43         spacing: 0
44
45         GroupBox {
46             maximumHeight: 200;
47
48             finished: finishedNotify;
49             caption: qsTr("WebView")
50             id: webViewSpecifics;
51
52             layout: VerticalLayout {
53                 QWidget {
54                     layout: HorizontalLayout {
55                         leftMargin: 0;
56                         rightMargin: 0;
57                         Label {
58                             text: qsTr("URL")
59                         }
60                         LineEdit {
61                             backendValue: backendValues.url
62                             baseStateFlag: isBaseState;
63                         }
64                     }
65                 }                       
66
67                 IntEditor {
68                     id: preferredWidth;
69                     backendValue: backendValues.preferredWidth;
70                     caption: qsTr("Pref Width")
71                     toolTip: qsTr("Preferred Width")
72                     baseStateFlag: isBaseState;
73                     step: 1;
74                     minimumValue: 0;
75                     maximumValue: 2000;
76                 }
77
78                 IntEditor {
79                     id: webPageWidth;
80                     backendValue: backendValues.preferredHeight;
81                     caption: qsTr("Pref Height")
82                     toolTip: qsTr("Preferred Height")
83                     baseStateFlag: isBaseState;
84                     step: 1;
85                     minimumValue: 0;
86                     maximumValue: 2000;
87                 }
88
89                 QWidget {
90                     layout: HorizontalLayout {
91
92                         Label {
93                             text: qsTr("Scale")
94                             toolTip: qsTr("Contents Scale")
95                         }
96                         DoubleSpinBox {
97                             id: zoomSpinBox;
98                             minimumWidth: 60;
99                             text: ""
100                             backendValue: backendValues.contentsScale;
101                             minimum: 0.01
102                             maximum: 10
103                             singleStep: 0.1
104                             baseStateFlag: isBaseState;
105                             onBackendValueChanged: {
106                                 zoomSlider.value = backendValue.value * 10;
107                             }
108                         }
109                         QSlider {
110                             id: zoomSlider;
111                             orientation: "Qt::Horizontal";
112                             minimum: 1;
113                             maximum: 100;
114                             singleStep: 1;
115                             onValueChanged: {
116                                 backendValues.contentsScale.value = value / 10;
117                             }
118                         }
119                     }
120                 }
121             }
122         }
123     }
124 }