Save_Widget::Save_Widget() : _plugin (0), _compression_widget(0) { //DJV_DEBUG("Save_Widget::Save_Widget"); // Create widgets. Group_Box * group = new Group_Box(label_compression_group); _compression_widget = new Radio_Button_Group(label_compression()); // Layout. Vertical_Layout * layout = new Vertical_Layout(this); layout->margin(Style::global()->margin_large()); layout->spacing(Style::global()->spacing_large()); layout->add(group); group->layout()->add(_compression_widget); layout->add_stretch(); // Initialize. plugin_update(); widget_update(); // Callbacks. _compression_widget->signal.set(this, compression_callback); }
Save_Widget::Save_Widget() : _plugin (0), _codec_widget(0) { // Create widgets. Group_Box * codec_group = new Group_Box(label_codec_group); _codec_widget = new Radio_Button_Group(label_codec()); // Layout. Layout_Item::create_group(List<Layout_Item *>() << _codec_widget); Vertical_Layout * layout = new Vertical_Layout(this); layout->spacing(Style::global()->spacing_large()); layout->add(codec_group); codec_group->layout()->add(_codec_widget); layout->add_stretch(); // Initialize. plugin_update(); widget_update(); // Callbacks. _codec_widget->signal.set(this, codec_callback); }
Save_Widget::Save_Widget() : _plugin (0), _color_profile_widget(0), _black_widget (0), _white_widget (0), _gamma_widget (0) { // Create color profile widgets. Group_Box * color_profile_group = new Group_Box(label_color_profile_group); _color_profile_widget = new Radio_Button_Group(label_color_profile()); Group_Box * film_print_group = new Group_Box(label_film_print_group); _black_widget = new Int_Edit_Slider(0, 1023); _white_widget = new Int_Edit_Slider(0, 1023); _gamma_widget = new Float_Edit_Slider(0.01, 4.0); // Layout. Vertical_Layout * layout = new Vertical_Layout(this); layout->margin(Style::global()->margin_large()); layout->spacing(Style::global()->spacing_large()); layout->add(color_profile_group); color_profile_group->layout()->add(_color_profile_widget); color_profile_group->layout()->add(film_print_group); Form_Widget * form_widget = new Form_Widget; film_print_group->layout()->add(form_widget); form_widget->add_row(label_film_print_black, _black_widget); form_widget->add_row(label_film_print_white, _white_widget); form_widget->add_row(label_film_print_gamma, _gamma_widget); layout->add_stretch(); // Initialize. _black_widget->default_value(Save::Options().film_print.black); _white_widget->default_value(Save::Options().film_print.white); _gamma_widget->default_value(Save::Options().film_print.gamma); plugin_update(); widget_update(); // Callbacks. _color_profile_widget->signal.set(this, color_profile_callback); _black_widget->signal.set(this, black_callback); _white_widget->signal.set(this, white_callback); _gamma_widget->signal.set(this, gamma_callback); }
Scale_Op::Scale_Op() { // Widgets. Group_Box * size_group = new Group_Box("Size"); Int_Edit_Slider * width = new Int_Edit_Slider; Int_Edit_Slider * height = new Int_Edit_Slider; Group_Box * type_group = new Group_Box("Type"); Choice_Widget * type = new Choice_Widget(label_type()); Group_Box * filter_default_group = new Group_Box("Default Filter"); Choice_Widget * filter_default_min = new Choice_Widget(label_filter_default()); Choice_Widget * filter_default_mag = new Choice_Widget(label_filter_default()); Group_Box * filter_custom_group = new Group_Box("Custom Filter"); Choice_Widget * filter_custom_min = new Choice_Widget(label_filter_custom()); Choice_Widget * filter_custom_mag = new Choice_Widget(label_filter_custom()); // Layout. Layout_Item::group(List<Layout_Item *>() << width << height); Vertical_Layout * layout = new Vertical_Layout(this); layout->add(size_group); Vertical_Layout * layout_v = new Vertical_Layout(size_group); Horizontal_Layout * layout_h = new Horizontal_Layout(layout_v); layout_v->add(width); layout_v->add(height); layout->add(type_group); layout_v = new Vertical_Layout(type_group); layout_v->add(type); layout->add(filter_default_group); layout_v = new Vertical_Layout(filter_default_group); layout_h = new Horizontal_Layout(layout_v); layout_h->margin(0); layout_h->add(filter_default_min); layout_h->add(filter_default_mag); layout->add(filter_custom_group); layout_v = new Vertical_Layout(filter_custom_group); layout_h = new Horizontal_Layout(layout_v); layout_h->margin(0); layout_h->add(filter_custom_min); layout_h->add(filter_custom_mag); layout->add_stretch(); // Initialize. width->range(1, 2048); height->range(1, 2048); width->set(_value.size.x); height->set(_value.size.y); type->set(_value.type); filter_default_min->set(_value.default_min); filter_default_mag->set(_value.default_mag); filter_custom_min->set(_value.custom_min); filter_custom_mag->set(_value.custom_mag); // Callbacks. width->signal.set(this, width_callback); height->signal.set(this, height_callback); type->signal.set(this, type_callback); filter_default_min->signal.set(this, default_min_callback); filter_default_mag->signal.set(this, default_mag_callback); filter_custom_min->signal.set(this, custom_min_callback); filter_custom_mag->signal.set(this, custom_mag_callback); }