15#include <ksqueezedtextlabel.h>
16#include <klocalizedstring.h>
57 : m_viewManager(viewManager)
126 SIGNAL(sigUpdateMemoryStatistics()),
148 m_imageView->canvasBase()->canvasController()->proxyObject->disconnect(
this);
186 widget->setVisible(
true);
194 if (sbItem.
widget() == widget) {
228 qint32 w = image->
width();
229 qint32 h = image->
height();
230 sizeText = i18nc(
"@info:status width x height (file size)",
"%1 &x %2 (%3)", w, h,
m_shortMemoryTag);
243 if (!
m_viewManager->selectionManager()->displaySelection()) {
245 }
else if (
m_viewManager->selectionManager()->showSelectionAsMask()) {
258 const KFormat format;
260 const QString imageStatsMsg =
261 i18nc(
"tooltip on statusbar memory reporting button (image stats)",
263 " - layers:\t\t %2\n"
264 " - projections:\t %3\n"
265 " - instant preview:\t %4\n",
269 format.formatByteSize(stats.
lodSize));
271 const QString memoryStatsMsg =
272 i18nc(
"tooltip on statusbar memory reporting button (total stats)",
273 "Memory used:\t %1 / %2\n"
274 " image data:\t %3 / %4\n"
275 " pool:\t\t %5 / %6\n"
285 format.formatByteSize(stats.
poolSize),
289 format.formatByteSize(stats.
swapSize));
291 QString longStats = imageStatsMsg +
"\n" + memoryStatsMsg;
293 QString shortStats = format.formatByteSize(stats.
imageSize);
307 i18nc(
"tooltip on statusbar memory reporting button",
308 "\n\nWARNING:\tOut of memory! Swapping has been started.\n"
309 "\t\tPlease configure more RAM for Krita in Settings dialog");
335 if (canvasController) {
349 if (qAbs(angleDiff) >= 0.01) {
365 QString displayMode =
369 i18n(
"Mask") : i18n(
"Ants"));
372 i18n(
"Selection: x = %1 y = %2 width = %3 height = %4\n"
374 r.x(), r.y(), r.width(), r.height(), displayMode));
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
@ 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)
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.