Changeset View
Changeset View
Standalone View
Standalone View
document/kpDocument.cpp
Show First 20 Lines • Show All 364 Lines • ▼ Show 20 Line(s) | 364 | { | |||
---|---|---|---|---|---|
365 | return m_image; | 365 | return m_image; | ||
366 | } | 366 | } | ||
367 | 367 | | |||
368 | //--------------------------------------------------------------------- | 368 | //--------------------------------------------------------------------- | ||
369 | 369 | | |||
370 | // public | 370 | // public | ||
371 | void kpDocument::setImage (const kpImage &image) | 371 | void kpDocument::setImage (const kpImage &image) | ||
372 | { | 372 | { | ||
373 | m_oldWidth = width (), m_oldHeight = height (); | 373 | m_oldWidth = width (); | ||
374 | m_oldHeight = height (); | ||||
374 | 375 | | |||
375 | *m_image = image; | 376 | *m_image = image; | ||
376 | 377 | | |||
377 | if (m_oldWidth == width () && m_oldHeight == height ()) | 378 | if (m_oldWidth == width () && m_oldHeight == height ()) | ||
378 | slotContentsChanged (image.rect ()); | 379 | slotContentsChanged (image.rect ()); | ||
379 | else | 380 | else | ||
380 | slotSizeChanged (width (), height ()); | 381 | slotSizeChanged (width (), height ()); | ||
381 | } | 382 | } | ||
Show All 31 Lines | |||||
413 | //--------------------------------------------------------------------- | 414 | //--------------------------------------------------------------------- | ||
414 | 415 | | |||
415 | void kpDocument::resize (int w, int h, const kpColor &backgroundColor) | 416 | void kpDocument::resize (int w, int h, const kpColor &backgroundColor) | ||
416 | { | 417 | { | ||
417 | #if DEBUG_KP_DOCUMENT | 418 | #if DEBUG_KP_DOCUMENT | ||
418 | qCDebug(kpLogDocument) << "kpDocument::resize (" << w << "," << h << ")"; | 419 | qCDebug(kpLogDocument) << "kpDocument::resize (" << w << "," << h << ")"; | ||
419 | #endif | 420 | #endif | ||
420 | 421 | | |||
421 | m_oldWidth = width (), m_oldHeight = height (); | 422 | m_oldWidth = width (); | ||
423 | m_oldHeight = height (); | ||||
422 | 424 | | |||
423 | #if DEBUG_KP_DOCUMENT && 1 | 425 | #if DEBUG_KP_DOCUMENT && 1 | ||
424 | qCDebug(kpLogDocument) << "\toldWidth=" << m_oldWidth | 426 | qCDebug(kpLogDocument) << "\toldWidth=" << m_oldWidth | ||
425 | << " oldHeight=" << m_oldHeight | 427 | << " oldHeight=" << m_oldHeight | ||
426 | << endl; | 428 | << endl; | ||
427 | #endif | 429 | #endif | ||
428 | 430 | | |||
429 | if (w == m_oldWidth && h == m_oldHeight) | 431 | if (w == m_oldWidth && h == m_oldHeight) | ||
Show All 35 Lines |