changeset 6 | 1c3b8676e58c |
parent 5 | 0f2326c2a325 |
child 10 | 232fbd5a2dcb |
5:0f2326c2a325 | 6:1c3b8676e58c |
---|---|
199 }; |
199 }; |
200 |
200 |
201 class FilmstripFlowPrivate |
201 class FilmstripFlowPrivate |
202 { |
202 { |
203 public: |
203 public: |
204 FilmstripFlowPrivate(): m_bgColor(QColor(99,105,115).rgb()), m_buffer(NULL), m_titleBuffer(NULL),m_closeIcon(NULL), m_centerTopSpace(0), m_sideTopSpace(0), m_space(0), m_incIndex(0), m_centerIndex(INVALID_INDEX) {} |
204 FilmstripFlowPrivate(): m_bgColor(QColor(68,88,125).rgb()), m_buffer(NULL), m_titleBuffer(NULL),m_closeIcon(NULL), m_centerTopSpace(0), m_sideTopSpace(0), m_space(0), m_incIndex(0), m_centerIndex(INVALID_INDEX) {} |
205 |
205 |
206 ~FilmstripFlowPrivate() { |
206 ~FilmstripFlowPrivate() { |
207 for (int i = 0; i < m_films.size(); i++) |
207 for (int i = 0; i < m_films.size(); i++) |
208 SAFE_DELETE(m_films[i]); |
208 SAFE_DELETE(m_films[i]); |
209 m_films.clear(); |
209 m_films.clear(); |
573 |
573 |
574 |
574 |
575 void FilmstripMovieFactory::addRectByFrame(FilmstripMovie* movie, QRectF& startRect, QRectF& endRect, qreal x1, qreal y1, qreal x2, qreal y2, bool debug) |
575 void FilmstripMovieFactory::addRectByFrame(FilmstripMovie* movie, QRectF& startRect, QRectF& endRect, qreal x1, qreal y1, qreal x2, qreal y2, bool debug) |
576 { |
576 { |
577 movie->m_movieClips.append(startRect); |
577 movie->m_movieClips.append(startRect); |
578 if (debug) |
|
579 qDebug() << "0:" << startRect; |
|
580 for (int i = 1; i < ANIMATION_MAX_FRAME; i++) { |
578 for (int i = 1; i < ANIMATION_MAX_FRAME; i++) { |
581 if (debug) |
|
582 qDebug() << i << ":" << movie->m_movieClips[i - 1].adjusted(x1, y1, x2, y2); |
|
583 movie->m_movieClips.append(movie->m_movieClips[i - 1].adjusted(x1, y1, x2, y2)); |
579 movie->m_movieClips.append(movie->m_movieClips[i - 1].adjusted(x1, y1, x2, y2)); |
584 } |
580 } |
585 movie->m_movieClips.append(endRect); |
581 movie->m_movieClips.append(endRect); |
586 if (debug) |
|
587 qDebug() << movie->m_movieClips.size() - 1 << ":" << endRect; |
|
588 } |
582 } |
589 |
583 |
590 void FilmstripMovieFactory::createLeftToCenterMovie(FilmstripMovie* movie) |
584 void FilmstripMovieFactory::createLeftToCenterMovie(FilmstripMovie* movie) |
591 { |
585 { |
592 movie->m_movieClips.clear(); |
586 movie->m_movieClips.clear(); |
1220 QPainter painter(d->m_titleBuffer); |
1214 QPainter painter(d->m_titleBuffer); |
1221 painter.fillRect(0,0,d->m_titleBuffer->width(),d->m_titleBuffer->height(),d->m_bgColor); |
1215 painter.fillRect(0,0,d->m_titleBuffer->width(),d->m_titleBuffer->height(),d->m_bgColor); |
1222 |
1216 |
1223 QFont font; |
1217 QFont font; |
1224 font.setBold(true); |
1218 font.setBold(true); |
1225 font.setPixelSize(13); |
1219 font.setPixelSize(20); |
1226 font.setWeight(QFont::Bold); |
1220 font.setWeight(QFont::Bold); |
1227 painter.setPen(QColor(169,169,169)); |
1221 painter.setPen(QColor(255,255,255)); |
1228 painter.setFont(font); |
1222 painter.setFont(font); |
1229 painter.drawText(QPointF(0,s.height() * TITLE_HEIGHT - 3),m_titleName); |
1223 painter.drawText(QPointF(3,s.height() * TITLE_HEIGHT),m_titleName); |
1230 |
1224 |
1231 d->m_sideWindowSize = QSize(WIDTH * L_SIDE_WIDTH_P_C, h * L_SIDE_HEIGHT_P_C); |
1225 d->m_sideWindowSize = QSize(WIDTH * L_SIDE_WIDTH_P_C, h * L_SIDE_HEIGHT_P_C); |
1232 d->m_centerWindowSize = QSize(WIDTH * L_CENTER_WIDTH_P_C, h * L_CENTER_HEIGHT_P_C); |
1226 d->m_centerWindowSize = QSize(WIDTH * L_CENTER_WIDTH_P_C, h * L_CENTER_HEIGHT_P_C); |
1233 d->m_centerTopSpace = h * L_CENTER_TOP_SPACE_P_C; |
1227 d->m_centerTopSpace = h * L_CENTER_TOP_SPACE_P_C; |
1234 d->m_sideTopSpace = h * L_SIDE_TOP_SPACE_P_C ; |
1228 d->m_sideTopSpace = h * L_SIDE_TOP_SPACE_P_C ; |
1271 //! insert a new filmstrip on current's right |
1265 //! insert a new filmstrip on current's right |
1272 void LinearFlowSnippet::showInsertOnLeft() |
1266 void LinearFlowSnippet::showInsertOnLeft() |
1273 { |
1267 { |
1274 //FIXME |
1268 //FIXME |
1275 Q_ASSERT(d); |
1269 Q_ASSERT(d); |
1276 qDebug() << "showInsertOnLeft is not implemented."; |
|
1277 } |
1270 } |
1278 |
1271 |
1279 //! Show the previous item |
1272 //! Show the previous item |
1280 void LinearFlowSnippet::showPrevious() |
1273 void LinearFlowSnippet::showPrevious() |
1281 { |
1274 { |