ResizeImageView

class ResizeImageView : public QDialog

The ResizeImageView class provides the feature to resize the image inserted into the project by taking width and height from user.

See also

on_widthSpinBox_valueChanged(), QPair<double,double> getNewSize(), on_Cancel_clicked(), on_Ok_clicked(), on_hightSpinBox_valueChanged()

Public Functions

explicit ResizeImageView(QWidget *parent = 0, double imageWidth = 100.0, double imageHight = 100.0)

This Class is used to Resize the image.

1)Sets the Window title as “Resize Image Size” 2)Sets up the user interface for the specified widget. 3)Maximum limit of width is kept as 1500 units and minimum as 20 units 4)Maximum limit of height is kept as 1500 units and minimum as 20 units 5)Ok and Cancel button are kept in order to perform desired tasks. 6)Translated version of sourceText is set to “Resize Image” 7)several flags are set thus giving hints on the behavior of the window. The behavior is platform-dependent

Parameters:
  • parent

  • imageWidth

  • imageHight

~ResizeImageView()

Destructor.

Public Static Functions

static QPair<double, double> getNewSize(QWidget *parent = 0, double imageWidth = 100.0, double imageHight = 100.0)

This function creates an object for ResizeImageview class and passes the width and height provided by the user as input.

Parameters:
  • parent

  • imageWidth

  • imageHight

Private Slots

void on_widthSpinBox_valueChanged(double arg1)

This function changes the height of the hightSpinBox when width is changed.

Parameters:

width

void on_hightSpinBox_valueChanged(double arg1)

This function changes the width of the widthSpinBox when height is changed.

Parameters:

height

void on_Ok_clicked()

This function called when ok is clicked for resizing.

This function called when cancle is clicked for resizing.

See also

accept()

See also

reject()