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