~ubuntu-branches/ubuntu/intrepid/digikam/intrepid

« back to all changes in this revision

Viewing changes to digikam/libs/widgets/common/paniconwidget.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2008-07-17 20:25:39 UTC
  • mfrom: (1.2.15 upstream) (3.1.2 lenny)
  • Revision ID: james.westby@ubuntu.com-20080717202539-6n7dtirbkoo7qvhd
Tags: 2:0.9.4-1
* New upstream release
  - digiKam 0.9.4 Release Plan (KDE3) ~ 13 July 08 (Closes: #490144)
* DEB_CONFIGURE_EXTRA_FLAGS := --without-included-sqlite3
* Debhelper compatibility level V7
* Install pixmaps in debian/*.install
* Add debian/digikam.lintian-overrides

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 * Description : a generic widget to display a panel to choose
8
8
 *               a rectangular image area.
9
9
 *
10
 
 * Copyright (C) 2004-2007 by Gilles Caulier <caulier dot gilles at gmail dot com>
 
10
 * Copyright (C) 2004-2008 by Gilles Caulier <caulier dot gilles at gmail dot com>
11
11
 *
12
12
 * This program is free software; you can redistribute it
13
13
 * and/or modify it under the terms of the GNU General
123
123
    repaint(false);
124
124
}
125
125
 
126
 
void PanIconWidget::setRegionSelection(QRect regionSelection)
 
126
void PanIconWidget::setRegionSelection(const QRect& regionSelection)
127
127
{
128
128
    d->regionSelection = regionSelection;
129
129
    m_localRegionSelection.setX( m_rect.x() + (int)((float)d->regionSelection.x() *
142
142
    repaint(false);
143
143
}
144
144
 
145
 
QRect PanIconWidget::getRegionSelection(void)
 
145
QRect PanIconWidget::getRegionSelection()
146
146
{
147
147
    return (d->regionSelection);
148
148
}
149
149
 
150
 
void PanIconWidget::setCursorToLocalRegionSelectionCenter(void)
 
150
void PanIconWidget::setCursorToLocalRegionSelectionCenter()
151
151
{
152
152
    QCursor::setPos(mapToGlobal(m_localRegionSelection.center()));
153
153
}
218
218
    p.end();
219
219
}
220
220
 
221
 
void PanIconWidget::paintEvent( QPaintEvent * )
 
221
void PanIconWidget::paintEvent(QPaintEvent*)
222
222
{
223
223
    bitBlt(this, 0, 0, m_pixmap);
224
224
}
322
322
}
323
323
 
324
324
}  // NameSpace Digikam
325