author | llornkcor <llornkcor> | 2006-07-09 18:56:40 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2006-07-09 18:56:40 (UTC) |
commit | 36dece4760b1ac1799929221b49eb3bee98c2367 (patch) (unidiff) | |
tree | a45f66d2d90bd9fbbff8e8903cd1cb9323c39f6e /noncore/multimedia/camera2/camerasettings.cpp | |
parent | 604065c6e662cb3894acf03abadafacc3ab52913 (diff) | |
download | opie-36dece4760b1ac1799929221b49eb3bee98c2367.zip opie-36dece4760b1ac1799929221b49eb3bee98c2367.tar.gz opie-36dece4760b1ac1799929221b49eb3bee98c2367.tar.bz2 |
initial commit to add video4linux camera app from qtopia 2, needs more work
Diffstat (limited to 'noncore/multimedia/camera2/camerasettings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/camera2/camerasettings.cpp | 166 |
1 files changed, 166 insertions, 0 deletions
diff --git a/noncore/multimedia/camera2/camerasettings.cpp b/noncore/multimedia/camera2/camerasettings.cpp new file mode 100644 index 0000000..d284128 --- a/dev/null +++ b/noncore/multimedia/camera2/camerasettings.cpp | |||
@@ -0,0 +1,166 @@ | |||
1 | /**************************************************************************** | ||
2 | ** Form implementation generated from reading ui file 'camerasettings.ui' | ||
3 | ** | ||
4 | ** Created: Mon Jul 10 04:21:25 2006 | ||
5 | ** by: The User Interface Compiler (uic) | ||
6 | ** | ||
7 | ** WARNING! All changes made in this file will be lost! | ||
8 | ****************************************************************************/ | ||
9 | #include "camerasettings.h" | ||
10 | |||
11 | #include <qcombobox.h> | ||
12 | #include <qgroupbox.h> | ||
13 | #include <qlabel.h> | ||
14 | #include <qpushbutton.h> | ||
15 | #include <qslider.h> | ||
16 | #include <qtopia/locationcombo.h> | ||
17 | #include <qlayout.h> | ||
18 | #include <qvariant.h> | ||
19 | #include <qtooltip.h> | ||
20 | #include <qwhatsthis.h> | ||
21 | |||
22 | /* | ||
23 | * Constructs a CameraSettings which is a child of 'parent', with the | ||
24 | * name 'name' and widget flags set to 'f' | ||
25 | * | ||
26 | * The dialog will by default be modeless, unless you set 'modal' to | ||
27 | * TRUE to construct a modal dialog. | ||
28 | */ | ||
29 | CameraSettings::CameraSettings( QWidget* parent, const char* name, bool modal, WFlags fl ) | ||
30 | : QDialog( parent, name, modal, fl ) | ||
31 | { | ||
32 | if ( !name ) | ||
33 | setName( "CameraSettings" ); | ||
34 | resize( 324, 465 ); | ||
35 | setCaption( tr( "Settings" ) ); | ||
36 | CameraSettingsLayout = new QVBoxLayout( this ); | ||
37 | CameraSettingsLayout->setSpacing( 6 ); | ||
38 | CameraSettingsLayout->setMargin( 11 ); | ||
39 | |||
40 | location = new LocationCombo( this, "location" ); | ||
41 | CameraSettingsLayout->addWidget( location ); | ||
42 | |||
43 | photo = new QGroupBox( this, "photo" ); | ||
44 | photo->setTitle( tr( "Photo" ) ); | ||
45 | photo->setColumnLayout(0, Qt::Vertical ); | ||
46 | photo->layout()->setSpacing( 0 ); | ||
47 | photo->layout()->setMargin( 0 ); | ||
48 | photoLayout = new QVBoxLayout( photo->layout() ); | ||
49 | photoLayout->setAlignment( Qt::AlignTop ); | ||
50 | photoLayout->setSpacing( 2 ); | ||
51 | photoLayout->setMargin( 4 ); | ||
52 | |||
53 | Layout1 = new QHBoxLayout; | ||
54 | Layout1->setSpacing( 6 ); | ||
55 | Layout1->setMargin( 0 ); | ||
56 | |||
57 | TextLabel1 = new QLabel( photo, "TextLabel1" ); | ||
58 | TextLabel1->setText( tr( "Size" ) ); | ||
59 | Layout1->addWidget( TextLabel1 ); | ||
60 | |||
61 | photo_size = new QComboBox( FALSE, photo, "photo_size" ); | ||
62 | photo_size->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, photo_size->sizePolicy().hasHeightForWidth() ) ); | ||
63 | Layout1->addWidget( photo_size ); | ||
64 | photoLayout->addLayout( Layout1 ); | ||
65 | |||
66 | Layout2 = new QHBoxLayout; | ||
67 | Layout2->setSpacing( 6 ); | ||
68 | Layout2->setMargin( 0 ); | ||
69 | |||
70 | TextLabel2 = new QLabel( photo, "TextLabel2" ); | ||
71 | TextLabel2->setText( tr( "Quality" ) ); | ||
72 | Layout2->addWidget( TextLabel2 ); | ||
73 | |||
74 | photo_quality = new QSlider( photo, "photo_quality" ); | ||
75 | photo_quality->setMinValue( 0 ); | ||
76 | photo_quality->setMaxValue( 100 ); | ||
77 | photo_quality->setValue( 75 ); | ||
78 | photo_quality->setOrientation( QSlider::Horizontal ); | ||
79 | Layout2->addWidget( photo_quality ); | ||
80 | |||
81 | photo_quality_n = new QLabel( photo, "photo_quality_n" ); | ||
82 | photo_quality_n->setText( tr( "75" ) ); | ||
83 | Layout2->addWidget( photo_quality_n ); | ||
84 | photoLayout->addLayout( Layout2 ); | ||
85 | CameraSettingsLayout->addWidget( photo ); | ||
86 | |||
87 | video = new QGroupBox( this, "video" ); | ||
88 | video->setTitle( tr( "Video" ) ); | ||
89 | video->setColumnLayout(0, Qt::Vertical ); | ||
90 | video->layout()->setSpacing( 0 ); | ||
91 | video->layout()->setMargin( 0 ); | ||
92 | videoLayout = new QVBoxLayout( video->layout() ); | ||
93 | videoLayout->setAlignment( Qt::AlignTop ); | ||
94 | videoLayout->setSpacing( 2 ); | ||
95 | videoLayout->setMargin( 4 ); | ||
96 | |||
97 | Layout1_2 = new QHBoxLayout; | ||
98 | Layout1_2->setSpacing( 6 ); | ||
99 | Layout1_2->setMargin( 0 ); | ||
100 | |||
101 | TextLabel1_2 = new QLabel( video, "TextLabel1_2" ); | ||
102 | TextLabel1_2->setText( tr( "Size" ) ); | ||
103 | Layout1_2->addWidget( TextLabel1_2 ); | ||
104 | |||
105 | video_size = new QComboBox( FALSE, video, "video_size" ); | ||
106 | video_size->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, video_size->sizePolicy().hasHeightForWidth() ) ); | ||
107 | Layout1_2->addWidget( video_size ); | ||
108 | videoLayout->addLayout( Layout1_2 ); | ||
109 | |||
110 | Layout2_2 = new QHBoxLayout; | ||
111 | Layout2_2->setSpacing( 6 ); | ||
112 | Layout2_2->setMargin( 0 ); | ||
113 | |||
114 | TextLabel2_2 = new QLabel( video, "TextLabel2_2" ); | ||
115 | TextLabel2_2->setText( tr( "Quality" ) ); | ||
116 | Layout2_2->addWidget( TextLabel2_2 ); | ||
117 | |||
118 | video_quality = new QSlider( video, "video_quality" ); | ||
119 | video_quality->setMinValue( 0 ); | ||
120 | video_quality->setMaxValue( 100 ); | ||
121 | video_quality->setValue( 75 ); | ||
122 | video_quality->setOrientation( QSlider::Horizontal ); | ||
123 | Layout2_2->addWidget( video_quality ); | ||
124 | |||
125 | video_quality_n = new QLabel( video, "video_quality_n" ); | ||
126 | video_quality_n->setText( tr( "75" ) ); | ||
127 | Layout2_2->addWidget( video_quality_n ); | ||
128 | videoLayout->addLayout( Layout2_2 ); | ||
129 | |||
130 | Layout6 = new QHBoxLayout; | ||
131 | Layout6->setSpacing( 6 ); | ||
132 | Layout6->setMargin( 0 ); | ||
133 | |||
134 | TextLabel4 = new QLabel( video, "TextLabel4" ); | ||
135 | TextLabel4->setText( tr( "Frame rate" ) ); | ||
136 | Layout6->addWidget( TextLabel4 ); | ||
137 | |||
138 | video_framerate = new QSlider( video, "video_framerate" ); | ||
139 | video_framerate->setMinValue( 1 ); | ||
140 | video_framerate->setMaxValue( 60 ); | ||
141 | video_framerate->setValue( 5 ); | ||
142 | video_framerate->setOrientation( QSlider::Horizontal ); | ||
143 | Layout6->addWidget( video_framerate ); | ||
144 | |||
145 | TextLabel6 = new QLabel( video, "TextLabel6" ); | ||
146 | TextLabel6->setText( tr( "5" ) ); | ||
147 | Layout6->addWidget( TextLabel6 ); | ||
148 | videoLayout->addLayout( Layout6 ); | ||
149 | CameraSettingsLayout->addWidget( video ); | ||
150 | QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); | ||
151 | CameraSettingsLayout->addItem( spacer ); | ||
152 | |||
153 | // signals and slots connections | ||
154 | connect( photo_quality, SIGNAL( valueChanged(int) ), photo_quality_n, SLOT( setNum(int) ) ); | ||
155 | connect( video_quality, SIGNAL( valueChanged(int) ), video_quality_n, SLOT( setNum(int) ) ); | ||
156 | connect( video_framerate, SIGNAL( valueChanged(int) ), TextLabel6, SLOT( setNum(int) ) ); | ||
157 | } | ||
158 | |||
159 | /* | ||
160 | * Destroys the object and frees any allocated resources | ||
161 | */ | ||
162 | CameraSettings::~CameraSettings() | ||
163 | { | ||
164 | // no need to delete child widgets, Qt does it all for us | ||
165 | } | ||
166 | |||