//keyframe_tree_store_ (KeyframeTreeStore::create(canvas_interface_)),
time_adjustment_ (0,0,25,0,0,0),
time_window_adjustment_ (0,0,25,0,0,0),
+ quality_adjustment_ (8,1,10,1,1,0),
statusbar (manage(new class Gtk::Statusbar())),
timeslider (new Widget_Timeslider),
duck_refresh_flag=true;
toggling_ducks_=false;
changing_resolution_=false;
+ updating_quality_=false;
smach_.set_default_state(&state_normal);
Gtk::Widget*
CanvasView::create_display_bar()
{
- displaybar = manage(new class Gtk::Table(1, 3, false));
+ displaybar = manage(new class Gtk::Table(1, 5, false));
// Setup the ToggleDuckDial widget
toggleducksdial = Gtk::manage(new class ToggleDucksDial());
resolutiondial->show();
// Set up a separator
- Gtk::VSeparator *separator = Gtk::manage(new class Gtk::VSeparator());
- separator->show();
+ Gtk::VSeparator *separator1 = Gtk::manage(new class Gtk::VSeparator());
+ separator1->show();
+ Gtk::VSeparator *separator2 = Gtk::manage(new class Gtk::VSeparator());
+ separator2->show();
+
+ // Set up quality spin button
+ quality_spin=Gtk::manage(new class Gtk::SpinButton(quality_adjustment_));
+ quality_spin->signal_value_changed().connect(
+ sigc::mem_fun(*this, &studio::CanvasView::update_quality));
+ quality_spin->show();
- displaybar->attach(*resolutiondial, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK);
displaybar->attach(*toggleducksdial, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK);
- displaybar->attach(*separator, 1, 2, 0, 1, Gtk::FILL, Gtk::FILL);
+ displaybar->attach(*separator1, 1, 2, 0, 1, Gtk::FILL, Gtk::FILL);
+ displaybar->attach(*resolutiondial, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK);
+ displaybar->attach(*separator2, 3, 4, 0, 1, Gtk::FILL, Gtk::FILL);
+ displaybar->attach(*quality_spin, 4, 5, 0, 1, Gtk::SHRINK, Gtk::SHRINK);
+
displaybar->show();
return displaybar;
}
void
+CanvasView::update_quality()
+{
+ if(updating_quality_)
+ return;
+ updating_quality_=true;
+ work_area->set_quality((int) quality_spin->get_value());
+ updating_quality_=false;
+}
+
+void
CanvasView::on_dirty_preview()
{
if(!is_playing_)
#include <gtkmm/scrolledwindow.h>
#include <gtkmm/notebook.h>
#include <gdkmm/device.h>
+#include <gtkmm/spinbutton.h>
#include <synfigapp/canvasinterface.h>
#include <synfigapp/selectionmanager.h>
bool toggling_ducks_;
ResolutionDial *resolutiondial;
bool changing_resolution_;
-
-
+ Gtk::Adjustment quality_adjustment_;
+ Gtk::SpinButton *quality_spin;
+ bool updating_quality_;
//! Shows current time and allows edition
Widget_Time *current_time_widget;
void on_current_time_widget_changed();
bool is_playing() { return is_playing_; }
+ void update_quality();
+
/*
-- ** -- S I G N A L T E R M I N A L S -------------------------------------
*/