summaryrefslogtreecommitdiffstats
path: root/k9author/chapterEdit.cpp
blob: d344b5e15c3a8c57a5f8bd298845a4466aec5b68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file './chapterEdit.ui'
**
** Created: dim. oct. 26 08:56:28 2008
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "chapterEdit.h"

#include <qvariant.h>
#include <qpushbutton.h>
#include <ktimewidget.h>
#include <qlabel.h>
#include <kurlrequester.h>
#include <kpushbutton.h>
#include <qcheckbox.h>
#include <qslider.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include "ktimewidget.h"
#include "kurlrequester.h"
#include "klineedit.h"
#include "kpushbutton.h"

/*
 *  Constructs a chapterEdit as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
chapterEdit::chapterEdit( QWidget* parent, const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{
    if ( !name )
	setName( "chapterEdit" );
    setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) );
    chapterEditLayout = new QGridLayout( this, 1, 1, 11, 6, "chapterEditLayout"); 

    twstart = new KTimeWidget( this, "twstart" );
    twstart->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, twstart->sizePolicy().hasHeightForWidth() ) );

    chapterEditLayout->addWidget( twstart, 1, 2 );

    textLabel1 = new QLabel( this, "textLabel1" );

    chapterEditLayout->addWidget( textLabel1, 1, 1 );

    textLabel3 = new QLabel( this, "textLabel3" );

    chapterEditLayout->addWidget( textLabel3, 0, 1 );

    urFile = new KURLRequester( this, "urFile" );
    urFile->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)5, 0, 0, urFile->sizePolicy().hasHeightForWidth() ) );
    urFile->setMinimumSize( QSize( 200, 0 ) );

    chapterEditLayout->addMultiCellWidget( urFile, 0, 0, 2, 4 );

    bStart = new KPushButton( this, "bStart" );
    bStart->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, bStart->sizePolicy().hasHeightForWidth() ) );

    chapterEditLayout->addWidget( bStart, 1, 3 );
    spacer2 = new QSpacerItem( 16, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    chapterEditLayout->addMultiCell( spacer2, 1, 2, 4, 4 );

    ckBreakStart = new QCheckBox( this, "ckBreakStart" );

    chapterEditLayout->addMultiCellWidget( ckBreakStart, 2, 2, 2, 3 );
    spacer1 = new QSpacerItem( 21, 60, QSizePolicy::Minimum, QSizePolicy::Expanding );
    chapterEditLayout->addItem( spacer1, 6, 2 );

    textLabel2 = new QLabel( this, "textLabel2" );

    chapterEditLayout->addWidget( textLabel2, 4, 1 );

    ckBreakEnd = new QCheckBox( this, "ckBreakEnd" );

    chapterEditLayout->addMultiCellWidget( ckBreakEnd, 5, 5, 2, 3 );

    twend = new KTimeWidget( this, "twend" );
    twend->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, twend->sizePolicy().hasHeightForWidth() ) );

    chapterEditLayout->addWidget( twend, 4, 2 );
    spacer3 = new QSpacerItem( 20, 31, QSizePolicy::Minimum, QSizePolicy::Fixed );
    chapterEditLayout->addItem( spacer3, 3, 2 );

    layout3 = new QGridLayout( 0, 1, 1, 0, 6, "layout3"); 

    lPosition = new QLabel( this, "lPosition" );
    lPosition->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, lPosition->sizePolicy().hasHeightForWidth() ) );

    layout3->addWidget( lPosition, 1, 1 );

    slider = new QSlider( this, "slider" );
    slider->setOrientation( QSlider::Horizontal );

    layout3->addWidget( slider, 1, 0 );

    image = new QLabel( this, "image" );
    image->setMinimumSize( QSize( 320, 200 ) );
    image->setPaletteBackgroundColor( QColor( 0, 0, 0 ) );
    image->setScaledContents( TRUE );

    layout3->addMultiCellWidget( image, 0, 0, 0, 1 );

    chapterEditLayout->addMultiCellLayout( layout3, 0, 6, 0, 0 );

    bEnd = new KPushButton( this, "bEnd" );
    bEnd->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, bEnd->sizePolicy().hasHeightForWidth() ) );

    chapterEditLayout->addWidget( bEnd, 4, 3 );

    bTitleButton = new QPushButton( this, "bTitleButton" );
    bTitleButton->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, bTitleButton->sizePolicy().hasHeightForWidth() ) );

    chapterEditLayout->addWidget( bTitleButton, 7, 0 );
    languageChange();
    resize( QSize(627, 300).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( urFile, SIGNAL( urlSelected(const QString&) ), this, SLOT( urlSelected(const QString&) ) );
    connect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) );
    connect( slider, SIGNAL( valueChanged(int) ), this, SLOT( sliderChanged() ) );
    connect( bStart, SIGNAL( clicked() ), this, SLOT( bStartClick() ) );
    connect( bEnd, SIGNAL( clicked() ), this, SLOT( bEndClick() ) );
    connect( twstart, SIGNAL( valueChanged(const QTime&) ), this, SLOT( startChanged(const QTime&) ) );
    connect( twend, SIGNAL( valueChanged(const QTime&) ), this, SLOT( endChanged(const QTime&) ) );
    connect( ckBreakEnd, SIGNAL( clicked() ), this, SLOT( ckBreakEndClick() ) );
    connect( ckBreakStart, SIGNAL( clicked() ), this, SLOT( ckBreakStartClick() ) );
    connect( bTitleButton, SIGNAL( clicked() ), this, SLOT( bTitleButtonClick() ) );
}

/*
 *  Destroys the object and frees any allocated resources
 */
chapterEdit::~chapterEdit()
{
    // no need to delete child widgets, Qt does it all for us
}

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void chapterEdit::languageChange()
{
    setCaption( tr2i18n( "Chapter properties" ) );
    textLabel1->setText( tr2i18n( "start" ) );
    textLabel3->setText( tr2i18n( "video" ) );
    urFile->setFilter( tr2i18n( "*.avi\n"
"*.mpeg" ) );
    bStart->setText( tr2i18n( "set Current Frame" ) );
    ckBreakStart->setText( tr2i18n( "break continuity" ) );
    textLabel2->setText( tr2i18n( "end" ) );
    ckBreakEnd->setText( tr2i18n( "break continuity" ) );
    lPosition->setText( tr2i18n( "--:--:--" ) );
    bEnd->setText( tr2i18n( "set Current Frame" ) );
    bTitleButton->setText( tr2i18n( "set Title button" ) );
}

void chapterEdit::urlSelected(const QString&)
{
    qWarning( "chapterEdit::urlSelected(const QString&): Not implemented yet" );
}

void chapterEdit::sliderReleased()
{
    qWarning( "chapterEdit::sliderReleased(): Not implemented yet" );
}

void chapterEdit::sliderChanged()
{
    qWarning( "chapterEdit::sliderChanged(): Not implemented yet" );
}

void chapterEdit::bStartClick()
{
    qWarning( "chapterEdit::bStartClick(): Not implemented yet" );
}

void chapterEdit::startChanged(const QTime&)
{
    qWarning( "chapterEdit::startChanged(const QTime&): Not implemented yet" );
}

void chapterEdit::endChanged(const QTime&)
{
    qWarning( "chapterEdit::endChanged(const QTime&): Not implemented yet" );
}

void chapterEdit::bEndClick()
{
    qWarning( "chapterEdit::bEndClick(): Not implemented yet" );
}

void chapterEdit::ckBreakStartClick()
{
    qWarning( "chapterEdit::ckBreakStartClick(): Not implemented yet" );
}

void chapterEdit::ckBreakEndClick()
{
    qWarning( "chapterEdit::ckBreakEndClick(): Not implemented yet" );
}

void chapterEdit::bTitleButtonClick()
{
    qWarning( "chapterEdit::bTitleButtonClick(): Not implemented yet" );
}

#include "chapterEdit.moc"