[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/extragear/graphics/libkmap/libkmap
From: Gabriel Voicu <ping.gabi () gmail ! com>
Date: 2010-08-01 1:29:02
Message-ID: 20100801012902.542E7AC783 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1157725 by gvoicu:
Added the button that removes current selection from gpssearch here.
M +19 -0 kmap.cpp
M +1 -0 kmap.h
--- branches/extragear/graphics/libkmap/libkmap/kmap.cpp #1157724:1157725
@@ -192,6 +192,7 @@
QList<double> selectionRectangle;
+ KAction* actionRemoveCurrentSelection;
KAction* actionSetSelectionMode;
KAction* actionSetPanMode;
};
@@ -278,6 +279,11 @@
d->actionDecreaseThumbnailSize = new KAction(i18n("T-"), this);
d->actionDecreaseThumbnailSize->setToolTip(i18n("Decrease the thumbnail size on the map"));
+ d->actionRemoveCurrentSelection = new KAction(this);
+ d->actionRemoveCurrentSelection->setEnabled(false);
+ d->actionRemoveCurrentSelection->setIcon(SmallIcon("edit-clear"));
+ d->actionRemoveCurrentSelection->setToolTip("Removes current selection.");
+
d->actionSetSelectionMode = new KAction(this);
d->actionSetSelectionMode->setCheckable(true);
d->actionSetSelectionMode->setIcon(SmallIcon("select-rectangular"));
@@ -317,6 +323,9 @@
connect(d->actionSetPanMode, SIGNAL(changed()),
this, SLOT(slotSetPanMode()));
+
+ connect(d->actionRemoveCurrentSelection, SIGNAL(triggered()),
+ this, SLOT(slotRemoveCurrentSelection()));
}
void KMap::createActionsForBackendSelection()
@@ -709,6 +718,9 @@
QToolButton* const setSelectionModeButton = new QToolButton(d->controlWidget);
setSelectionModeButton->setDefaultAction(d->actionSetSelectionMode);
+ QToolButton* const removeCurrentSelectionButton = new QToolButton(d->controlWidget);
+ removeCurrentSelectionButton->setDefaultAction(d->actionRemoveCurrentSelection);
+
d->hBoxForAdditionalControlWidgetItems = new KHBox(d->controlWidget);
// add stretch after the controls:
@@ -1822,6 +1834,7 @@
d->currentBackend->mouseModeChanged(MouseModePan);
emit signalRemoveCurrentSelection();
d->actionSetSelectionMode->setChecked(false);
+ d->actionRemoveCurrentSelection->setEnabled(false);
}
}
@@ -1834,6 +1847,7 @@
{
d->currentBackend->mouseModeChanged(MouseModeSelection);
d->actionSetPanMode->setChecked(false);
+ d->actionRemoveCurrentSelection->setEnabled(true);
}
else
{
@@ -1845,6 +1859,11 @@
// }
}
+void KMap::slotRemoveCurrentSelection()
+{
+ emit signalRemoveCurrentSelection();
+}
+
void KMap::slotUngroupedModelChanged()
{
// determine the index under which we handle this model
--- branches/extragear/graphics/libkmap/libkmap/kmap.h #1157724:1157725
@@ -125,6 +125,7 @@
void slotNewSelectionFromMap(const QList<double>& sel);
void slotSetSelectionMode();
void slotSetPanMode();
+ void slotRemoveCurrentSelection();
Q_SIGNALS:
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic