NDEVR
API Documentation
ImageChooserGallery.h
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/ButtonGallery.h>
4#include <NDEVR/ImageFactory.h>
5#include <QWidget>
6#include <functional>
7namespace NDEVR
8{
14 class NDEVR_WIDGETS_API ImageChooserGallery : public ButtonGallery
15 {
16 Q_OBJECT
17 public:
22 ImageChooserGallery(QWidget* parent = nullptr);
28 signals:
30 protected:
31 std::function<bool(StringView view, ImageFactory& factory)> m_filter;
32 };
33}
ButtonGallery(QWidget *parent=nullptr)
Constructs a ButtonGallery with an optional parent widget.
std::function< bool(StringView view, ImageFactory &factory)> m_filter
Optional filter to restrict which images are shown.
void fillWithImages(ImageFactory &factory=ImageFactory::DefaultFactory())
Populates the gallery with images from the given ImageFactory.
void imageChosenSignal(StringView image_id)
Emitted when the user selects an image, with its ID.
ImageChooserGallery(QWidget *parent=nullptr)
Constructs an ImageChooserGallery.
The core class for reading/writing and storing images in an optimized way.
static ImageFactory & DefaultFactory()
Returns the singleton default ImageFactory instance.
The core String View class for the NDEVR API.
Definition StringView.h:58
The primary namespace for the NDEVR SDK.