本文整理汇总了C++中Quest::get_sprite_image_path方法的典型用法代码示例。如果您正苦于以下问题:C++ Quest::get_sprite_image_path方法的具体用法?C++ Quest::get_sprite_image_path怎么用?C++ Quest::get_sprite_image_path使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Quest
的用法示例。
在下文中一共展示了Quest::get_sprite_image_path方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QDialog
/**
* @brief Creates a change source image dialog.
* @param initial_source_image Initial value of the source image.
* @param parent Parent object or nullptr.
*/
ChangeSourceImageDialog::ChangeSourceImageDialog(
const Quest &quest, const QString& initial_source_image,
QWidget* parent) :
QDialog(parent),
image_path(quest.get_sprite_image_path("")) {
ui.setupUi(this);
file_system_model.setRootPath(image_path);
file_system_model.setNameFilters(QStringList("*.png"));
file_system_model.setNameFilterDisables(false);
ui.file_tree_view->setModel(&file_system_model);
ui.file_tree_view->setRootIndex(file_system_model.index(image_path));
ui.file_tree_view->setSelectionMode(QAbstractItemView::SingleSelection);
ui.file_tree_view->setHeaderHidden(true);
ui.file_tree_view->setColumnHidden(1, true);
ui.file_tree_view->setColumnHidden(2, true);
ui.file_tree_view->setColumnHidden(3, true);
scene.addItem(&image_item);
ui.image_view->setScene(&scene);
set_source_image(initial_source_image);
connect(ui.tileset_value, SIGNAL(clicked()),
this, SLOT(change_is_tileset_requested()));
connect(ui.image_value, SIGNAL(clicked()),
this, SLOT(change_is_tileset_requested()));
connect(ui.file_tree_view->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
this, SLOT(change_source_image_requested()));
}