[Digikam-devel] extragear/graphics/digikam
Gilles Caulier
caulier.gilles at kdemail.net
Fri Jan 12 12:54:01 GMT 2007
SVN commit 622603 by cgilles:
digiKam from trunk : Image Editor Color Managed View option : instead a simple shorcut (F12) to toggle on/off Color managed View, there is an new option in View menu and an indicator on the right corner of status bar.
CCMAIL: digikam-devel at kde.org
M +2 -0 showfoto/showfotoui.rc
M +4 -2 utilities/imageeditor/editor/digikamimagewindowui.rc
M +16 -8 utilities/imageeditor/editor/editorwindow.cpp
M +7 -0 utilities/imageeditor/editor/editorwindowprivate.h
--- trunk/extragear/graphics/digikam/showfoto/showfotoui.rc #622602:622603
@@ -55,6 +55,8 @@
<Action name="editorwindow_histogram" />
<Separator/>
<Action name="editorwindow_slideshow" />
+ <Separator/>
+ <Action name="editorwindow_cmview" />
</Menu>
<Menu name="help" ><text>&Help</text>
--- trunk/extragear/graphics/digikam/utilities/imageeditor/editor/digikamimagewindowui.rc #622602:622603
@@ -1,5 +1,5 @@
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<gui version="5" name="digikamimagewindow" >
+<gui version="6" name="digikamimagewindow" >
<MenuBar>
@@ -48,7 +48,9 @@
<Separator/>
<Action name="editorwindow_histogram" />
<Separator/>
- <Action name="editorwindow_slideshow" />
+ <Action name="editorwindow_slideshow" />
+ <Separator/>
+ <Action name="editorwindow_cmview" />
</Menu>
<Menu name="help" ><text>&Help</text>
--- trunk/extragear/graphics/digikam/utilities/imageeditor/editor/editorwindow.cpp #622602:622603
@@ -31,6 +31,7 @@
#include <qlabel.h>
#include <qdockarea.h>
#include <qlayout.h>
+#include <qtooltip.h>
#include <qsplitter.h>
#include <qdir.h>
#include <qfileinfo.h>
@@ -334,6 +335,11 @@
this, SLOT(slotToggleSlideShow()),
actionCollection(),"editorwindow_slideshow");
+ d->viewCMViewAction = new KToggleAction(i18n("Color Managed View"), "tv",
+ Key_F12, this,
+ SLOT(slotToggleColorManagedView()),
+ actionCollection(),"editorwindow_cmview");
+
// -- Standard 'Transform' menu actions ---------------------------------------------
d->resizeAction = new KAction(i18n("&Resize..."), "resize_image", 0,
@@ -452,24 +458,23 @@
i18n("Zoom out of Image"),
Key_Minus, m_canvas, SLOT(slotDecreaseZoom()),
false, true);
-
- d->accelerators->insert("Toggle Color Managed View", i18n("Toggle CM View"),
- i18n("Toggle On/Off Monitor Color Correction"),
- Key_F12, this, SLOT(slotToggleColorManagedView()),
- false, true);
}
void EditorWindow::setupStatusBar()
{
m_nameLabel = new IOFileProgressBar(statusBar());
m_nameLabel->setAlignment(Qt::AlignCenter);
- statusBar()->addWidget(m_nameLabel,1);
+ statusBar()->addWidget(m_nameLabel, 100);
m_zoomLabel = new QLabel(statusBar());
m_zoomLabel->setAlignment(Qt::AlignCenter);
- statusBar()->addWidget(m_zoomLabel,1);
+ statusBar()->addWidget(m_zoomLabel, 100);
m_resLabel = new QLabel(statusBar());
m_resLabel->setAlignment(Qt::AlignCenter);
- statusBar()->addWidget(m_resLabel,1);
+ statusBar()->addWidget(m_resLabel, 100);
+ d->cmViewIndicator = new QLabel(statusBar());
+ d->cmViewIndicator->setPixmap(SmallIcon("tv"));
+ d->cmViewIndicator->setAlignment(Qt::AlignCenter);
+ statusBar()->addWidget(d->cmViewIndicator, 1);
}
void EditorWindow::printImage(KURL url)
@@ -1540,6 +1545,9 @@
void EditorWindow::slotToggleColorManagedView()
{
bool cmv = !d->ICCSettings->managedViewSetting;
+ d->cmViewIndicator->setEnabled(cmv);
+ QToolTip::add(d->cmViewIndicator,
+ cmv ? i18n("Color Managed View is enable") : i18n("Color Managed View is disable"));
d->ICCSettings->managedViewSetting = cmv;
m_canvas->setICCSettings(d->ICCSettings);
--- trunk/extragear/graphics/digikam/utilities/imageeditor/editor/editorwindowprivate.h #622602:622603
@@ -22,6 +22,8 @@
#ifndef EDITORWINDOWPRIVATE_H
#define EDITORWINDOWPRIVATE_H
+class QLabel;
+
class KAction;
class KToggleAction;
class KSelectAction;
@@ -48,6 +50,7 @@
donateMoneyAction = 0;
accelerators = 0;
viewHistogramAction = 0;
+ viewCMViewAction = 0;
filePrintAction = 0;
copyAction = 0;
resizeAction = 0;
@@ -63,6 +66,7 @@
flipAction = 0;
rotateAction = 0;
ICCSettings = 0;
+ cmViewIndicator = 0;
}
~EditorWindowPriv()
@@ -73,6 +77,8 @@
bool fullScreenHideToolBar;
bool slideShowInFullScreen;
+ QLabel *cmViewIndicator;
+
KAction *imagePluginsHelpAction;
KAction *donateMoneyAction;
KAction *filePrintAction;
@@ -91,6 +97,7 @@
KActionMenu *rotateAction;
KToggleAction *zoomFitAction;
+ KToggleAction *viewCMViewAction;
KSelectAction *viewHistogramAction;
More information about the Digikam-devel
mailing list