dialog_preview.h \
dialog_setup.h \
dialog_soundselect.h \
+ dialog_targetparam.h \
dialog_waypoint.h
DIALOG_CC = \
dialog_preview.cpp \
dialog_setup.cpp \
dialog_soundselect.cpp \
+ dialog_targetparam.cpp \
dialog_waypoint.cpp
--- /dev/null
+/* === S Y N F I G ========================================================= */
+/*! \file dialog_targetparam.cpp
+** \brief Implementation for the TargetParam Dialog
+**
+** $Id$
+**
+** \legal
+** Copyright (c) 2010 Carlos López González
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+** General Public License for more details.
+** \endlegal
+*/
+/* ========================================================================= */
+
+/* === H E A D E R S ======================================================= */
+
+#ifdef USING_PCH
+# include "pch.h"
+#else
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "dialog_targetparam.h"
+
+#include "general.h"
+
+#endif
+
+/* === U S I N G =========================================================== */
+
+using namespace std;
+//using namespace etl;
+using namespace studio;
+
+/* === M A C R O S ========================================================= */
+
+/* === G L O B A L S ======================================================= */
+
+/* === P R O C E D U R E S ================================================= */
+
+/* === M E T H O D S ======================================================= */
+
+/* === E N T R Y P O I N T ================================================= */
+
+Dialog_TargetParam::Dialog_TargetParam(synfig::TargetParam &tparam)
+{
+ set_title("TargetParam Dialog");
+ set_tparam(tparam);
+ // Available Video Codecs Combo Box Text.
+ vcodec = Gtk::manage(new Gtk::ComboBoxText());
+ Gtk::Label* label(manage(new Gtk::Label(_("Available Video Codecs:"))));
+ label->set_alignment(Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER);
+ get_vbox()->pack_start(*label, true, true, 0);
+ //vcodec->signal_changed().connect(sigc::mem_fun(*this, &Dialog_TargetParam::on_video_codec_changed));
+ vcodec->prepend_text("flv");
+ vcodec->prepend_text("h263p");
+ vcodec->prepend_text("huffyuv");
+ vcodec->prepend_text("libtheora");
+ vcodec->prepend_text("libx264");
+ vcodec->prepend_text("libxvid");
+ vcodec->prepend_text("mjpeg");
+ vcodec->prepend_text("mpeg2video");
+ vcodec->prepend_text("mpeg4");
+ vcodec->prepend_text("msmpeg4");
+ vcodec->prepend_text("msmpeg4v1");
+ vcodec->prepend_text("msmpeg4v2");
+ vcodec->prepend_text("wmv1");
+ vcodec->prepend_text("wmv2");
+ get_vbox()->pack_start(*vcodec, true, true, 0);
+
+ //Bitrate Spin Button
+ Gtk::Adjustment* bradj(manage(new class Gtk::Adjustment(double(tparam.bitrate), 10.0,1000.0)));
+ bitrate = Gtk::manage(new class Gtk::SpinButton(*bradj));
+ Gtk::Label* label2(manage(new Gtk::Label(_("Video Bit Rate:"))));
+ label2->set_alignment(Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER);
+ get_vbox()->pack_start(*label2, true, true, 0);
+ get_vbox()->pack_start(*bitrate,true, true, 0);
+
+ get_vbox()->show_all();
+
+ ok_button = manage(new class Gtk::Button(Gtk::StockID("gtk-ok")));
+ ok_button->show();
+ add_action_widget(*ok_button,0);
+ ok_button->signal_clicked().connect(sigc::mem_fun(*this,&Dialog_TargetParam::on_ok));
+}
+
+void
+Dialog_TargetParam::on_ok()
+{
+ hide();
+}
+
+Dialog_TargetParam::~Dialog_TargetParam()
+{
+}
--- /dev/null
+/* === S Y N F I G ========================================================= */
+/*! \file dialog_targetparam.h
+** \brief Targetparam Dialog Header
+**
+** $Id$
+**
+** \legal
+** Copyright (c) 2010 Carlos López González
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+** General Public License for more details.
+** \endlegal
+*/
+/* ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __SYNFIG_STUDIO_DIALOG_TARGETPARAM_H
+#define __SYNFIG_STUDIO_DIALOG_TARGETPARAM_H
+
+/* === H E A D E R S ======================================================= */
+#include <gtkmm/dialog.h>
+#include <gtkmm/button.h>
+#include <gtkmm/comboboxtext.h>
+#include <gtkmm/spinbutton.h>
+
+#include <synfig/targetparam.h>
+
+/* === M A C R O S ========================================================= */
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+namespace studio {
+
+class Dialog_TargetParam : public Gtk::Dialog
+{
+ synfig::TargetParam tparam_;
+ Gtk::Button *ok_button;
+ Gtk::Button *cancelbutton;
+ Gtk::SpinButton *bitrate;
+ Gtk::ComboBoxText *vcodec;
+
+ void on_ok();
+ void on_cancel();
+ //void on_video_codec_changed();
+
+public:
+ Dialog_TargetParam(synfig::TargetParam &tparam);
+ ~Dialog_TargetParam();
+
+ synfig::TargetParam get_tparam() const { return tparam_; }
+ void set_tparam(const synfig::TargetParam &tp) {tparam_=tp; }
+
+};
+
+}; // END of namespace studio
+
+/* === E N D =============================================================== */
+
+#endif
+
+
+
#include <synfig/target_scanline.h>
#include <synfig/canvas.h>
#include "asyncrenderer.h"
+#include "dialog_targetparam.h"
#include "general.h"
entry_quality(adjustment_quality,1,0),
adjustment_antialias(1,1,31),
entry_antialias(adjustment_antialias,1,0),
- toggle_single_frame(_("Use _current frame"), true)
+ toggle_single_frame(_("Use _current frame"), true),
+ tparam("libxvid",200)
{
widget_rend_desc.show();
widget_rend_desc.signal_changed().connect(sigc::mem_fun(*this,&studio::RenderSettings::on_rend_desc_changed));
choose_button->show();
choose_button->signal_clicked().connect(sigc::mem_fun(*this, &studio::RenderSettings::on_choose_pressed));
+ Gtk::Button *tparam_button(manage(new class Gtk::Button(Gtk::StockID(_("Parameters...")))));
+ tparam_button->show();
+ tparam_button->signal_clicked().connect(sigc::mem_fun(*this, &studio::RenderSettings::on_targetparam_pressed));
+
Gtk::Frame *target_frame=manage(new Gtk::Frame(_("Target")));
target_frame->set_shadow_type(Gtk::SHADOW_NONE);
((Gtk::Label *) target_frame->get_label_widget())->set_markup(_("<b>Target</b>"));
targetLabel->set_alignment(0, 0.5);
targetLabel->set_mnemonic_widget(optionmenu_target);
target_table->attach(*targetLabel, 0, 1, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
- target_table->attach(optionmenu_target, 1, 3, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
+ target_table->attach(optionmenu_target, 1, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
+ target_table->attach(*tparam_button, 2, 3, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
toggle_single_frame.signal_toggled().connect(sigc::mem_fun(*this, &studio::RenderSettings::on_single_frame_toggle));
}
void
+RenderSettings::on_targetparam_pressed()
+{
+ Dialog_TargetParam *dialogtp = new Dialog_TargetParam(tparam);
+ if(dialogtp->run()==GTK_RESPONSE_ACCEPT)
+ tparam=dialogtp->get_tparam();
+ delete dialogtp;
+}
+
+void
RenderSettings::on_render_pressed()
{
String filename=entry_filename.get_text();
return;
}
- Target::Handle target=Target::create(calculated_target_name,filename);
+ Target::Handle target=Target::create(calculated_target_name,filename, tparam);
if(!target)
{
canvas_interface_->get_ui_interface()->error(_("Unable to create target for ")+filename);
#include <gtkmm/optionmenu.h>
#include <synfig/string.h>
+#include <synfig/targetparam.h>
#include <synfigapp/canvasinterface.h>
etl::handle<AsyncRenderer> async_renderer;
+ synfig::TargetParam tparam;
+
public:
RenderSettings(Gtk::Window& parent,etl::handle<synfigapp::CanvasInterface> canvas_interface);
~RenderSettings();
void on_choose_pressed();
void on_render_pressed();
void on_cancel_pressed();
+ void on_targetparam_pressed();
void on_finished();
}; // END of class RenderSettings