15#include <ksqueezedtextlabel.h>
16#include <klocalizedstring.h>
58 : m_viewManager(viewManager)
127 SIGNAL(sigUpdateMemoryStatistics()),
149 m_imageView->canvasBase()->canvasController()->proxyObject->disconnect(
this);
163 connect(
m_imageView, SIGNAL(sigSizeChanged(QPointF,QPointF)),
187 widget->setVisible(
true);
195 if (sbItem.
widget() == widget) {
229 qint32 w = image->
width();
230 qint32 h = image->
height();
231 sizeText = i18nc(
"@info:status width x height (file size)",
"%1 &x %2 (%3)", w, h,
m_shortMemoryTag);
244 if (!
m_viewManager->selectionManager()->displaySelection()) {
246 }
else if (
m_viewManager->selectionManager()->showSelectionAsMask()) {
261 if (node->preferredThumbnailBoundsMode() == KisThumbnailBoundsMode::Coarse) {
276 const KFormat format;
278 const QString imageStatsMsg =
279 i18nc(
"tooltip on statusbar memory reporting button (image stats)",
281 " - layers:\t\t %2\n"
282 " - projections:\t %3\n"
283 " - instant preview:\t %4\n",
287 format.formatByteSize(stats.
lodSize));
289 const QString memoryStatsMsg =
290 i18nc(
"tooltip on statusbar memory reporting button (total stats)",
291 "Memory used:\t %1 / %2\n"
292 " image data:\t %3 / %4\n"
293 " pool:\t\t %5 / %6\n"
303 format.formatByteSize(stats.
poolSize),
307 format.formatByteSize(stats.
swapSize));
309 QString longStats = imageStatsMsg +
"\n" + memoryStatsMsg;
311 QString shortStats = format.formatByteSize(stats.
imageSize);
312 bool shouldUseWarningIcon =
false;
323 shouldUseWarningIcon =
true;
325 i18nc(
"tooltip on statusbar memory reporting button",
326 "\n\nWARNING:\tOut of memory! Swapping has been started.\n"
327 "\t\tPlease configure more RAM for Krita in Settings dialog");
335 if (!slowThumbnailNodes.isEmpty()) {
337 i18nc(
"tooltip on statusbar memory reporting button",
338 "\n\nWARNING:\tSome layers took too much time to calculate\n"
339 "\t\ttheir thumbnails. They were switched into low-quality\n"
340 "\t\tthumbnails mode. Try purging unused image data with\n"
341 "\t\tImage->Purge Unused Image Data action.\n"
344 bool needsSeparator =
false;
345 Q_FOREACH(
KisNodeSP node, slowThumbnailNodes) {
346 if (needsSeparator) {
349 suffix.append(QString(
"\"%1\"").arg(node->
name()));
350 needsSeparator =
true;
353 shouldUseWarningIcon =
true;
361 if (shouldUseWarningIcon) {
383 if (canvasController) {
397 if (qAbs(angleDiff) >= 0.01) {
413 QString displayMode =
417 i18n(
"Mask") : i18n(
"Ants"));
420 i18n(
"Selection: x = %1 y = %2 width = %3 height = %4\n"
422 r.x(), r.y(), r.width(), r.height(), displayMode));
@ IncreasingDirection_Clockwise
A widget with several options to select an angle.
@ FlipOptionsMode_ContextMenu
The flip options are shown only as a context menu when right-clicking the gauge widget.
qreal angle() const
Gets the current angle.
void setFlipOptionsMode(FlipOptionsMode newMode)
Sets the mode in which the flip options should be shown.
void setIncreasingDirection(KisAngleGauge::IncreasingDirection newIncreasingDirection)
Sets the increasing direction in the angle gauge.
void useFlatSpinBox(bool newUseFlatSpinBox)
Sets if the spin box should be flat.
void setAngle(qreal newAngle)
Sets the current angle.
void setRange(qreal newMinimum, qreal newMaximum)
Sets the minimum and maximum values for the angle.
qreal rotationAngle() const
canvas rotation in degrees
void rotateCanvas(qreal angle, const std::optional< KoViewTransformStillPoint > &stillPoint, bool isNativeGesture=false)
const KoColorSpace * colorSpace() const
const KoColorProfile * profile() const
QToolButton * m_selectionStatus
void updateStatusBarProfileLabel()
void setSelection(KisImageWSP image)
void removeStatusBarItem(QWidget *widget)
void showMemoryInfoToolTip()
QPointer< KisView > m_imageView
void updateSelectionIcon()
void updateSelectionToolTip()
void addStatusBarItem(QWidget *widget, int stretch=0, bool permanent=false)
KSqueezedTextLabel * m_statusBarProfileLabel
void slotCanvasAngleSelectorAngleChanged(qreal angle)
QScopedPointer< KoProgressUpdater > m_progressUpdater
void removeExtraWidget(QWidget *widget)
void sigCancellationRequested()
void updateMemoryStatus()
QVector< StatusBarItem > m_statusBarItems
QPointer< KisViewManager > m_viewManager
bool m_memoryWarningLogged
QWidget * m_extraWidgetsParent
KisAngleSelector * m_canvasAngleSelector
void setProfile(KisImageWSP image)
KSqueezedTextLabel * m_statusBarStatusLabel
void setView(QPointer< KisView > imageView)
QBoxLayout * m_extraWidgetsLayout
KisProgressWidget * m_progress
void slotCanvasRotationChanged()
KisStatusBar(KisViewManager *view)
void addExtraWidget(QWidget *widget)
void hideAllStatusBarItems()
void setHelp(const QString &t)
QPointer< QStatusBar > m_statusBar
KisMemoryReportButton * m_memoryReportBox
void showAllStatusBarItems()
KoProgressUpdater * progressUpdater()
static void log(const QString &message)
Logs with date/time.
KoCanvasController * canvasController() const
void documentRotationChanged(qreal angle)
QIcon loadIcon(const QString &name)
void recursiveApplyNodes(NodePointer node, Functor func)
qint64 historicalMemorySize
Statistics fetchMemoryStatistics(KisImageSP image) const
static KisMemoryStatisticsServer * instance()
QRect selectedExactRect() const
Slow, but exact way of determining the rectangle that encloses the selection.