ImagePicker Class Reference

#include <image-dialog.h>

Inheritance diagram for ImagePicker:

BoxPicker LinePicker PointPicker List of all members.

Public Slots

virtual void pointSelected (int x, int y, bool right)

Public Member Functions

 ImagePicker (ImageValue *i)
virtual Valuevalue ()=0

Protected Member Functions

virtual void nextPoint (PointValue point, bool right)=0

Private Attributes

int size_x
int size_y
ImageValueimage

Detailed Description

Definition at line 19 of file image-dialog.h.


Constructor & Destructor Documentation

ImagePicker::ImagePicker ImageValue i  ) 
 

Definition at line 17 of file image-dialog.cpp.

References ImageValue::getQImage(), ImageValue::height_direct(), image, pointSelected(), size_x, size_y, and ImageValue::width_direct().

00017                                        : QDialog(NULL,"image-picker",TRUE)
00018 {
00019   image = i;
00020   QGridLayout *tot = new QGridLayout( this, 1, 1, 11, 6, "layout"); 
00021   // we want to scroll around if necessary
00022   QScrollView* sv = new QScrollView(this);
00023   tot->addWidget(sv,0,0);
00024   QVBox* big_box = new QVBox(sv->viewport());
00025   sv->addChild(big_box);
00026   ImageLabel* child1 = new ImageLabel(big_box);
00027   const QPixmap pm(i->getQImage(false));
00028   size_x = image->width_direct();
00029   size_y = image->height_direct();
00030   child1->setPixmap(pm);
00031   connect(child1,SIGNAL(pointSelected(int,int,bool)),this, SLOT(pointSelected(int,int,bool)));
00032 }


Member Function Documentation

virtual void ImagePicker::nextPoint PointValue  point,
bool  right
[protected, pure virtual]
 

Implemented in BoxPicker, LinePicker, and PointPicker.

Referenced by pointSelected().

void ImagePicker::pointSelected int  x,
int  y,
bool  right
[virtual, slot]
 

Definition at line 34 of file image-dialog.cpp.

References ImageValue::dcsToOcs(), image, nextPoint(), size_x, and size_y.

Referenced by ImagePicker().

00035 {
00036   if (x>=size_x ||
00037       x<0 ||
00038       y>=size_y ||
00039       y <0)
00040     return;
00041   PointValue point = image->dcsToOcs(DirectPoint(x,y));
00042   nextPoint(point,right);
00043 }

virtual Value* ImagePicker::value  )  [pure virtual]
 

Implemented in BoxPicker, LinePicker, and PointPicker.


Member Data Documentation

ImageValue* ImagePicker::image [private]
 

Definition at line 25 of file image-dialog.h.

Referenced by ImagePicker(), and pointSelected().

int ImagePicker::size_x [private]
 

Definition at line 21 of file image-dialog.h.

Referenced by ImagePicker(), and pointSelected().

int ImagePicker::size_y [private]
 

Definition at line 24 of file image-dialog.h.

Referenced by ImagePicker(), and pointSelected().


The documentation for this class was generated from the following files:
Generated on Mon Jun 5 22:08:43 2006 for iis by  doxygen 1.4.6