tychoBCGEN  0.5
 All Data Structures Namespaces Files Functions Variables
Public Slots | Public Member Functions | Private Attributes
colormask Class Reference

#include <colormask.h>

Inheritance diagram for colormask:
image_stack

Public Slots

void make_color_mask_action ()
void update_color_mask_parameter ()
void set_color_sliders ()
void set_color_spin_boxes ()
void enable_checkbox_red ()
void enable_checkbox_green ()
void enable_checkbox_blue ()
void close_color_mask_window ()

Public Member Functions

 colormask (QWidget *parent=0)
 ~colormask ()

Private Attributes

Ui::colormaskui

Additional Inherited Members

- Data Fields inherited from image_stack
QVector< QImage > imagestack
QImage image
QImage image1
QImage wind_emitter
QImage wind_emitter_save

Detailed Description

Definition at line 13 of file colormask.h.


Constructor & Destructor Documentation

colormask::colormask ( QWidget *  parent = 0)
explicit

Definition at line 27 of file colormask.cpp.

References Ui_colormask::blue_checkbox, Ui_colormask::blue_low, Ui_colormask::blue_low_2, Ui_colormask::blue_up, Ui_colormask::blue_up_2, Ui_colormask::close, close_color_mask_window(), enable_checkbox_blue(), enable_checkbox_green(), enable_checkbox_red(), Ui_colormask::green_checkbox, Ui_colormask::green_low, Ui_colormask::green_low_2, Ui_colormask::green_up, Ui_colormask::green_up_2, make_color_mask_action(), Ui_colormask::red_checkbox, Ui_colormask::red_low, Ui_colormask::red_low_2, Ui_colormask::red_up, Ui_colormask::red_up_2, set_color_sliders(), set_color_spin_boxes(), Ui_colormask::setupUi(), and ui.

:
QDialog(parent),
{
QTimer *timer = new QTimer(this);
ui->setupUi(this);
connect(ui->close, SIGNAL(clicked()), this, SLOT(close_color_mask_window()));
connect(timer, SIGNAL(timeout()), this, SLOT(make_color_mask_action()));
timer->start(200);
//colormask sliders and spinboxes
connect(ui->red_low, SIGNAL(valueChanged(int)), this, SLOT(set_color_sliders()));
connect(ui->green_low, SIGNAL(valueChanged(int)), this, SLOT(set_color_sliders()));
connect(ui->blue_low, SIGNAL(valueChanged(int)), this, SLOT(set_color_sliders()));
connect(ui->red_low_2, SIGNAL(valueChanged(int)), this, SLOT(set_color_spin_boxes()));
connect(ui->green_low_2, SIGNAL(valueChanged(int)), this, SLOT(set_color_spin_boxes()));
connect(ui->blue_low_2, SIGNAL(valueChanged(int)), this, SLOT(set_color_spin_boxes()));
connect(ui->red_up, SIGNAL(valueChanged(int)), this, SLOT(set_color_sliders()));
connect(ui->green_up, SIGNAL(valueChanged(int)), this, SLOT(set_color_sliders()));
connect(ui->blue_up, SIGNAL(valueChanged(int)), this, SLOT(set_color_sliders()));
connect(ui->red_up_2, SIGNAL(valueChanged(int)), this, SLOT(set_color_spin_boxes()));
connect(ui->green_up_2, SIGNAL(valueChanged(int)), this, SLOT(set_color_spin_boxes()));
connect(ui->blue_up_2, SIGNAL(valueChanged(int)), this, SLOT(set_color_spin_boxes()));
connect(ui->red_checkbox, SIGNAL(stateChanged(int)), this, SLOT(enable_checkbox_red()));
connect(ui->green_checkbox, SIGNAL(stateChanged(int)), this, SLOT(enable_checkbox_green()));
connect(ui->blue_checkbox, SIGNAL(stateChanged(int)), this, SLOT(enable_checkbox_blue()));
}
colormask::~colormask ( )

Definition at line 61 of file colormask.cpp.

References ui.

{
delete ui;
}

Member Function Documentation

void colormask::close_color_mask_window ( )
slot

Definition at line 191 of file colormask.cpp.

Referenced by colormask().

{
this->close();
}
void colormask::enable_checkbox_blue ( )
slot

Definition at line 175 of file colormask.cpp.

References Ui_colormask::blue_checkbox, blue_checked, Ui_colormask::blue_low, Ui_colormask::blue_up, Ui_colormask::blue_up_2, ui, and update_color_mask_parameter().

Referenced by colormask().

{
if (ui->blue_checkbox->isChecked()){
ui->blue_up_2->setValue(ui->blue_low->value());
ui->blue_up_2->setDisabled(true);
ui->blue_up->setValue(ui->blue_low->value());
ui->blue_up->setDisabled(true);
blue_checked = true;
}
else{
ui->blue_up_2->setEnabled(true);
ui->blue_up->setEnabled(true);
blue_checked = false;
}
}
void colormask::enable_checkbox_green ( )
slot

Definition at line 159 of file colormask.cpp.

References Ui_colormask::green_checkbox, green_checked, Ui_colormask::green_low, Ui_colormask::green_up, Ui_colormask::green_up_2, ui, and update_color_mask_parameter().

Referenced by colormask().

{
if (ui->green_checkbox->isChecked()){
ui->green_up_2->setValue(ui->green_low->value());
ui->green_up_2->setDisabled(true);
ui->green_up->setValue(ui->green_low->value());
ui->green_up->setDisabled(true);
green_checked = true;
}
else{
ui->green_up_2->setEnabled(true);
ui->green_up->setEnabled(true);
green_checked = false;
}
}
void colormask::enable_checkbox_red ( )
slot

Definition at line 143 of file colormask.cpp.

References Ui_colormask::red_checkbox, red_checked, Ui_colormask::red_low, Ui_colormask::red_up, Ui_colormask::red_up_2, ui, and update_color_mask_parameter().

Referenced by colormask().

{
if (ui->red_checkbox->isChecked()){
ui->red_up_2->setValue(ui->red_low->value());
ui->red_up_2->setDisabled(true);
ui->red_up->setValue(ui->red_low->value());
ui->red_up->setDisabled(true);
red_checked = true;
}
else{
ui->red_up_2->setEnabled(true);
ui->red_up->setEnabled(true);
red_checked = false;
}
}
void colormask::make_color_mask_action ( )
slot

Definition at line 66 of file colormask.cpp.

References Ui_colormask::blue_low, Ui_colormask::blue_up, Ui_colormask::bluevalue, Ui_colormask::green_low, Ui_colormask::green_up, Ui_colormask::greenvalue, pick_blue, pick_green, pick_red, Ui_colormask::red_low, Ui_colormask::red_up, Ui_colormask::redvalue, and ui.

Referenced by colormask().

{
ui->redvalue->setText(QString::number(pick_red));
ui->greenvalue->setText(QString::number(pick_green));
ui->bluevalue->setText(QString::number(pick_blue));
ui->red_low->setRange(0,pick_red);
ui->green_low->setRange(0,pick_green);
ui->blue_low->setRange(0,pick_blue);
ui->red_up->setRange(0,255-pick_red);
ui->green_up->setRange(0,255-pick_green);
ui->blue_up->setRange(0,255-pick_blue);
}
void colormask::set_color_sliders ( )
slot

Definition at line 95 of file colormask.cpp.

References Ui_colormask::blue_checkbox, Ui_colormask::blue_low, Ui_colormask::blue_low_2, Ui_colormask::blue_up, Ui_colormask::blue_up_2, Ui_colormask::green_checkbox, Ui_colormask::green_low, Ui_colormask::green_low_2, Ui_colormask::green_up, Ui_colormask::green_up_2, Ui_colormask::red_checkbox, Ui_colormask::red_low, Ui_colormask::red_low_2, Ui_colormask::red_up, Ui_colormask::red_up_2, ui, and update_color_mask_parameter().

Referenced by colormask().

{
ui->red_low_2->setValue(ui->red_low->value());
ui->green_low_2->setValue(ui->green_low->value());
ui->blue_low_2->setValue(ui->blue_low->value());
if (ui->red_checkbox->isChecked()){
ui->red_up_2->setValue(ui->red_low->value());
ui->red_up->setDisabled(true);
}
else{
ui->red_up_2->setValue(ui->red_up->value());
ui->red_up->setEnabled(true);
}
if (ui->green_checkbox->isChecked()){
ui->green_up_2->setValue(ui->green_low->value());
ui->green_up->setDisabled(true);
}
else{
ui->green_up_2->setValue(ui->green_up->value());
ui->green_up->setEnabled(true);
}
if (ui->blue_checkbox->isChecked()){
ui->blue_up_2->setValue(ui->blue_low->value());
ui->blue_up->setDisabled(true);
}
else{
ui->blue_up_2->setValue(ui->blue_up->value());
ui->blue_up->setEnabled(true);
}
}
void colormask::set_color_spin_boxes ( )
slot

Definition at line 129 of file colormask.cpp.

References Ui_colormask::blue_low, Ui_colormask::blue_low_2, Ui_colormask::blue_up, Ui_colormask::blue_up_2, Ui_colormask::green_low, Ui_colormask::green_low_2, Ui_colormask::green_up, Ui_colormask::green_up_2, Ui_colormask::red_low, Ui_colormask::red_low_2, Ui_colormask::red_up, Ui_colormask::red_up_2, ui, and update_color_mask_parameter().

Referenced by colormask().

{
ui->red_low->setValue(ui->red_low_2->value());
ui->green_low->setValue(ui->green_low_2->value());
ui->blue_low->setValue(ui->blue_low_2->value());
ui->red_up->setValue(ui->red_up_2->value());
ui->green_up->setValue(ui->green_up_2->value());
ui->blue_up->setValue(ui->blue_up_2->value());
}
void colormask::update_color_mask_parameter ( )
slot

Definition at line 82 of file colormask.cpp.

References blue_low, Ui_colormask::blue_low, blue_up, Ui_colormask::blue_up, colormask_counter, green_low, Ui_colormask::green_low, green_up, Ui_colormask::green_up, red_low, Ui_colormask::red_low, red_up, Ui_colormask::red_up, ui, and value.

Referenced by enable_checkbox_blue(), enable_checkbox_green(), enable_checkbox_red(), set_color_sliders(), and set_color_spin_boxes().

{
red_low = ui->red_low->value();
red_up = ui->red_up->value();
green_low = ui->green_low->value();
green_up = ui->green_up->value();
blue_low = ui->blue_low->value();
blue_up = ui->blue_up->value();
}

Field Documentation

Ui::colormask* colormask::ui
private

Definition at line 22 of file colormask.h.

Referenced by colormask(), enable_checkbox_blue(), enable_checkbox_green(), enable_checkbox_red(), make_color_mask_action(), set_color_sliders(), set_color_spin_boxes(), update_color_mask_parameter(), and ~colormask().


The documentation for this class was generated from the following files: