ardour
add_video_dialog.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2010-2013 Paul Davis
3  Author: Robin Gareus <robin@gareus.org>
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program; if not, write to the Free Software
17  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 
19 */
20 #ifndef __gtk_ardour_add_video_dialog_h__
21 #define __gtk_ardour_add_video_dialog_h__
22 
23 #include <string>
24 
25 #ifdef interface
26 #undef interface
27 #endif
28 
29 #include <gtkmm.h>
30 
31 #include "ardour/types.h"
32 #include "ardour/template_utils.h"
33 #include <gtkmm/filechooserwidget.h>
34 #include "ardour_dialog.h"
35 
39 };
40 
42 {
43  public:
45  ~AddVideoDialog ();
46 
47  std::string file_name (bool &local_file);
49  bool launch_xjadeo ();
50  bool auto_set_session_fps ();
51 
52  private:
53  void on_show ();
54  bool page_switch();
55  void set_action_ok(bool yn);
56  void clear_preview_image();
57 
58  /* preview pane related */
59  void request_preview(std::string vpath);
60  void seek_preview();
61 
62  Gtk::Image *preview_image;
63  Gtk::HScale seek_slider;
64  Glib::RefPtr<Gdk::Pixbuf> imgbuf;
65  std::string preview_path;
66  Gtk::Label pi_tcin;
67  Gtk::Label pi_tcout;
68  Gtk::Label pi_aspect;
69  Gtk::Label pi_fps;
70 
71  /* file chooser related */
72  void file_selection_changed ();
73  void file_activated ();
74  bool on_video_filter (const Gtk::FileFilter::Info& filter_info);
75 
76  Gtk::FileChooserWidget chooser;
77 
78  Gtk::CheckButton xjadeo_checkbox;
79  Gtk::CheckButton set_session_fps_checkbox;
80  Gtk::Notebook notebook;
81  Gtk::Button *ok_button;
82 
83  Gtk::VBox server_index_box;
84  Gtk::VBox file_chooser_box;
85  Gtk::HBox browser_container;
86 
87  /* Harvid Browser related */
88  class HarvidColumns : public Gtk::TreeModel::ColumnRecord
89  {
90  public:
91  Gtk::TreeModelColumn<std::string> id;
92  Gtk::TreeModelColumn<std::string> uri;
93  Gtk::TreeModelColumn<std::string> filename;
94 
96  add(id);
97  add(filename);
98  add(uri);
99  }
100  };
101 
102  Gtk::CellRendererPixbuf pixBufRenderer;
103 
105  void harvid_list_view_activated (const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn*);
106  void harvid_request(std::string u);
107  void harvid_load_docroot();
108 
110  Gtk::Label harvid_path;
111  Gtk::Button harvid_reset;
113  Glib::RefPtr<Gtk::ListStore> harvid_list;
114  Gtk::TreeView harvid_list_view;
115 
118 };
119 
120 #endif /* __gtk_ardour_add_video_dialog_h__ */
Gtk::HScale seek_slider
void harvid_list_view_selected()
Gtk::TreeModelColumn< std::string > uri
Gtk::Label harvid_path
Gtk::Label pi_tcout
Gtk::TreeView harvid_list_view
VtlImportOption import_option()
Gtk::Label pi_tcin
void request_preview(std::string vpath)
AddVideoDialog(ARDOUR::Session *)
Glib::RefPtr< Gtk::ListStore > harvid_list
Gtk::VBox server_index_box
void harvid_request(std::string u)
Gtk::CheckButton set_session_fps_checkbox
Gtk::VBox file_chooser_box
HarvidColumns harvid_list_columns
Gtk::Button * ok_button
Gtk::Image * preview_image
VtlImportOption
Gtk::CellRendererPixbuf pixBufRenderer
void set_action_ok(bool yn)
Gtk::FileChooserWidget chooser
Gtk::Label pi_fps
Gtk::Label pi_aspect
Gtk::TreeModelColumn< std::string > filename
Gtk::Button harvid_reset
void file_selection_changed()
Gtk::CheckButton xjadeo_checkbox
Gtk::Notebook notebook
std::string file_name(bool &local_file)
bool on_video_filter(const Gtk::FileFilter::Info &filter_info)
void harvid_list_view_activated(const Gtk::TreeModel::Path &path, Gtk::TreeViewColumn *)
Gtk::TreeModelColumn< std::string > id
Glib::RefPtr< Gdk::Pixbuf > imgbuf
std::string preview_path
Gtk::HBox browser_container