13#include <QResizeEvent>
16#include <klocalizedstring.h>
27#include <ksqueezedtextlabel.h>
33 m_lblName->setTextElideMode(Qt::ElideMiddle);
34 m_lblName->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed);
48 QVBoxLayout *mainLayout =
new QVBoxLayout(
this);
49 mainLayout->setSizeConstraint(QLayout::SetMinAndMaxSize);
50 mainLayout->setContentsMargins(0, 0, 0, 0);
63 if (!result && includeHidden) {
96 if (!resource)
return;
99 m_lblName->setText(QString(
"%1 (%2 x %3)").arg(i18n(pattern->name().toUtf8().data())).arg(pattern->width()).arg(pattern->height()));
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
KisResourceItemChooser * m_itemChooser
void setPreviewOrientation(Qt::Orientation orientation)
determines whether the preview right or below the splitter
void setCurrentItem(int row)
void setGrayscalePreview(bool grayscale)
KSqueezedTextLabel * m_lblName
void setCurrentPattern(KoResourceSP resource)
void update(KoResourceSP resource)
void resourceSelected(KoResourceSP resource)
Emitted when a resource was selected.
KoResourceSP currentResource(bool includeHidden=false)
KisPatternChooser(QWidget *parent=0)
~KisPatternChooser() override
void setPreviewOrientation(Qt::Orientation orientation)
determines whether the preview right or below the splitter
void setPreviewTiled(bool tiled)
determines whether the preview should tile the resource's image or not
void setCurrentResource(KoResourceSP resource)
Sets the item representing the resource as selected.
KoResourceSP currentResource
void setGrayscalePreview(bool grayscale)
shows the preview converted to grayscale
void setCurrentItem(int row)
void showTaggingBar(bool show)
void setSynced(bool sync)
KisTagFilterResourceProxyModel * tagFilterModel() const
int resourceCount() const
QSharedPointer< T > firstResource() const
Return the first resource available.
static KoResourceServerProvider * instance()
KoResourceServer< KoPattern > * patternServer