Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Inkscape::UI::Dialog::BatchItem Class Referencefinal

#include <export-batch.h>

Inheritance diagram for Inkscape::UI::Dialog::BatchItem:

Public Member Functions

 BatchItem (SPItem *item, bool isolate_item, std::shared_ptr< PreviewDrawing > drawing)
 
 BatchItem (SPPage *page, std::shared_ptr< PreviewDrawing > drawing)
 
 ~BatchItem () final
 
Glib::ustring getLabel () const
 
SPItemgetItem () const
 
SPPagegetPage () const
 
void refresh (bool hide, guint32 bg_color)
 
void setDrawing (std::shared_ptr< PreviewDrawing > drawing)
 
auto get_radio_group ()
 
void on_parent_changed ()
 Update the connection to the parent FlowBox.
 
void on_mode_changed (Gtk::SelectionMode mode)
 A change in the selection mode for the flow box.
 
void set_selected (bool selected)
 Syncronise the FlowBox selection to the active widget activity.
 
void update_selected ()
 Syncronise the FlowBox selection to the existing active widget state.
 
bool isolateItem () const
 Get "Export selected only" setting.
 
void setIsolateItem (bool isolate)
 Set "Export selected only".
 

Static Public Member Functions

static void syncItems (BatchItems &items, std::map< std::string, SPObject * > const &objects, Gtk::FlowBox &container, std::shared_ptr< PreviewDrawing > preview, bool isolate_items)
 Add and remove batch items and their previews carefully and insert new ones into the container FlowBox.
 

Private Member Functions

void init (std::shared_ptr< PreviewDrawing > drawing)
 
void update_label ()
 

Private Attributes

Glib::ustring _label_str
 
Gtk::Grid _grid
 
Gtk::Label _label
 
Gtk::CheckButton _selector
 
Gtk::CheckButton _option
 
ExportPreview _preview
 
SPItem_item = nullptr
 
SPPage_page = nullptr
 
bool _isolate_item = false
 
bool is_hide = false
 
sigc::scoped_connection _selection_widget_changed_conn
 
sigc::scoped_connection _object_modified_conn
 

Detailed Description

Definition at line 58 of file export-batch.h.

Constructor & Destructor Documentation

◆ BatchItem() [1/2]

Inkscape::UI::Dialog::BatchItem::BatchItem ( SPItem item,
bool  isolate_item,
std::shared_ptr< PreviewDrawing drawing 
)

◆ BatchItem() [2/2]

Inkscape::UI::Dialog::BatchItem::BatchItem ( SPPage page,
std::shared_ptr< PreviewDrawing drawing 
)

◆ ~BatchItem()

Inkscape::UI::Dialog::BatchItem::~BatchItem ( )
finaldefault

Member Function Documentation

◆ get_radio_group()

auto Inkscape::UI::Dialog::BatchItem::get_radio_group ( )
inline

Definition at line 71 of file export-batch.h.

References _option.

◆ getItem()

SPItem * Inkscape::UI::Dialog::BatchItem::getItem ( ) const
inline

Definition at line 66 of file export-batch.h.

References _item.

Referenced by syncItems().

◆ getLabel()

Glib::ustring Inkscape::UI::Dialog::BatchItem::getLabel ( ) const
inline

Definition at line 65 of file export-batch.h.

References _label_str.

◆ getPage()

SPPage * Inkscape::UI::Dialog::BatchItem::getPage ( ) const
inline

Definition at line 67 of file export-batch.h.

References _page.

Referenced by syncItems().

◆ init()

◆ isolateItem()

bool Inkscape::UI::Dialog::BatchItem::isolateItem ( ) const
inline

Get "Export selected only" setting.

Returns
true if only selected items are shown in export

Definition at line 79 of file export-batch.h.

References _isolate_item.

◆ on_mode_changed()

void Inkscape::UI::Dialog::BatchItem::on_mode_changed ( Gtk::SelectionMode  mode)

A change in the selection mode for the flow box.

Definition at line 177 of file export-batch.cpp.

References _option, _selector, and mode.

Referenced by update_selected().

◆ on_parent_changed()

void Inkscape::UI::Dialog::BatchItem::on_parent_changed ( )

Update the connection to the parent FlowBox.

Definition at line 186 of file export-batch.cpp.

References _option, _selection_widget_changed_conn, _selector, child, item, parent, and update_selected().

Referenced by init().

◆ refresh()

◆ set_selected()

void Inkscape::UI::Dialog::BatchItem::set_selected ( bool  selected)

Syncronise the FlowBox selection to the active widget activity.

Definition at line 148 of file export-batch.cpp.

Referenced by init(), and update_selected().

◆ setDrawing()

void Inkscape::UI::Dialog::BatchItem::setDrawing ( std::shared_ptr< PreviewDrawing drawing)

◆ setIsolateItem()

void Inkscape::UI::Dialog::BatchItem::setIsolateItem ( bool  isolate)

Set "Export selected only".

Parameters
isolatetrue if only selected items should be shown in export

Definition at line 91 of file export-batch.cpp.

References _isolate_item, _item, _preview, and Inkscape::UI::Dialog::ExportPreview::setItem().

◆ syncItems()

void Inkscape::UI::Dialog::BatchItem::syncItems ( BatchItems items,
std::map< std::string, SPObject * > const &  objects,
Gtk::FlowBox &  container,
std::shared_ptr< PreviewDrawing preview,
bool  isolate_items 
)
static

Add and remove batch items and their previews carefully and insert new ones into the container FlowBox.

Parameters
itemsList of batch-items (e.g. layers) in the batch dialog. Is updated by this function.
objectsNew list of objects (e.g. layers). Taken as input.
containerGUI widget containing the selection of batch items. Is updated by this function.
isolate_itemstrue if only the given (selected) items should be shown in export

Definition at line 274 of file export-batch.cpp.

References getItem(), getPage(), item, items, page, and preview.

Referenced by Inkscape::UI::Dialog::SingleExport::onPagesChanged(), and Inkscape::UI::Dialog::BatchExport::refreshItems().

◆ update_label()

void Inkscape::UI::Dialog::BatchItem::update_label ( )
private

◆ update_selected()

void Inkscape::UI::Dialog::BatchItem::update_selected ( )

Syncronise the FlowBox selection to the existing active widget state.

Definition at line 163 of file export-batch.cpp.

References _option, _selector, on_mode_changed(), parent, and set_selected().

Referenced by on_parent_changed(), and refresh().

Member Data Documentation

◆ _grid

Gtk::Grid Inkscape::UI::Dialog::BatchItem::_grid
private

Definition at line 88 of file export-batch.h.

Referenced by init(), and refresh().

◆ _isolate_item

bool Inkscape::UI::Dialog::BatchItem::_isolate_item = false
private

Definition at line 95 of file export-batch.h.

Referenced by init(), isolateItem(), and setIsolateItem().

◆ _item

SPItem* Inkscape::UI::Dialog::BatchItem::_item = nullptr
private

Definition at line 93 of file export-batch.h.

Referenced by BatchItem(), getItem(), init(), setIsolateItem(), and update_label().

◆ _label

Gtk::Label Inkscape::UI::Dialog::BatchItem::_label
private

Definition at line 89 of file export-batch.h.

Referenced by init(), refresh(), and update_label().

◆ _label_str

Glib::ustring Inkscape::UI::Dialog::BatchItem::_label_str
private

Definition at line 87 of file export-batch.h.

Referenced by getLabel(), and update_label().

◆ _object_modified_conn

sigc::scoped_connection Inkscape::UI::Dialog::BatchItem::_object_modified_conn
private

Definition at line 99 of file export-batch.h.

Referenced by BatchItem(), and BatchItem().

◆ _option

Gtk::CheckButton Inkscape::UI::Dialog::BatchItem::_option
private

◆ _page

SPPage* Inkscape::UI::Dialog::BatchItem::_page = nullptr
private

Definition at line 94 of file export-batch.h.

Referenced by BatchItem(), getPage(), refresh(), and update_label().

◆ _preview

ExportPreview Inkscape::UI::Dialog::BatchItem::_preview
private

Definition at line 92 of file export-batch.h.

Referenced by init(), refresh(), setDrawing(), and setIsolateItem().

◆ _selection_widget_changed_conn

sigc::scoped_connection Inkscape::UI::Dialog::BatchItem::_selection_widget_changed_conn
private

Definition at line 98 of file export-batch.h.

Referenced by on_parent_changed().

◆ _selector

Gtk::CheckButton Inkscape::UI::Dialog::BatchItem::_selector
private

Definition at line 90 of file export-batch.h.

Referenced by init(), on_mode_changed(), on_parent_changed(), refresh(), and update_selected().

◆ is_hide

bool Inkscape::UI::Dialog::BatchItem::is_hide = false
private

Definition at line 96 of file export-batch.h.

Referenced by init(), and refresh().


The documentation for this class was generated from the following files: