lib

KoProperty::PixmapEdit Class Reference

Inheritance diagram for KoProperty::PixmapEdit:

KoProperty::Widget List of all members.

Detailed Description

Definition at line 34 of file pixmapedit.h.


Public Member Functions

 PixmapEdit (Property *property, QWidget *parent=0, const char *name=0)
virtual ~PixmapEdit ()
virtual QVariant value () const
virtual void setValue (const QVariant &value, bool emitChange=true)
virtual void drawViewer (QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value)
void resizeEvent (QResizeEvent *ev)
bool eventFilter (QObject *o, QEvent *ev)

Protected Slots

QString selectPixmapFileName ()
virtual void selectPixmap ()

Protected Member Functions

virtual void setReadOnlyInternal (bool readOnly)

Protected Attributes

QLabel * m_edit
QLabel * m_popup
QPushButton * m_button
QVariant m_recentlyPainted
QPixmap m_pixmap
QPixmap m_scaledPixmap
QPixmap m_previewPixmap

Member Function Documentation

void PixmapEdit::drawViewer ( QPainter *  p,
const QColorGroup &  cg,
const QRect &  r,
const QVariant &  value 
) [virtual]

Function to draw a property viewer when the item editor isn't shown.

Reimplemented from KoProperty::Widget.

Definition at line 124 of file pixmapedit.cpp.

bool PixmapEdit::eventFilter ( QObject *  o,
QEvent *  ev 
) [virtual]

Filters some event for main widget, eg Enter or Esc key presses.

Reimplemented from KoProperty::Widget.

Definition at line 204 of file pixmapedit.cpp.

void PixmapEdit::selectPixmap (  )  [protected, virtual, slot]

Selects a new pixmap using "open" file dialog. Can be reimplemented.

Todo:
err msg

Definition at line 172 of file pixmapedit.cpp.

QString PixmapEdit::selectPixmapFileName (  )  [protected, slot]

Helper used by selectPixmap(). Can be also used by subclassess. Selected path will be stored in "lastVisitedImagePath" config entry within "Recent Dirs" config group of application's settings. This entry can be later reused when file dialogs are opened for selecting image files.

Todo:
download the file if remote, then set fileName properly

Definition at line 145 of file pixmapedit.cpp.

void PixmapEdit::setReadOnlyInternal ( bool  readOnly  )  [protected, virtual]

Called by setReadOnly(bool). For implementation: for read-only you should disable editing in the appropriate widget(s).

Implements KoProperty::Widget.

Definition at line 240 of file pixmapedit.cpp.

void PixmapEdit::setValue ( const QVariant &  value,
bool  emitChange = true 
) [virtual]

Sets the value shown in the item editor widget. Set emitChange to false if you don't want to emit propertyChanged signal.

Implements KoProperty::Widget.

Definition at line 98 of file pixmapedit.cpp.

QVariant PixmapEdit::value (  )  const [virtual]

Returns:
the value currently entered in the item editor widget.

Implements KoProperty::Widget.

Definition at line 92 of file pixmapedit.cpp.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys