[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice
From: Jan Hambrecht <jaham () gmx ! net>
Date: 2008-07-26 17:45:56
Message-ID: 1217094356.112398.10004.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 838094 by jaham:
Moved the snap guide config widget to guiutils
and added an action to plug into the menu which
shows a dialog where the user can then configure
the snap guides. Removed the snap guide config widget
from the path tool and the create path tool where
it was to hidden to find. Now there is a central
place to configure the snap guides.
M +1 -1 karbon/data/karbon.rc
M +3 -0 karbon/ui/KarbonView.cpp
M +0 -2 libs/flake/CMakeLists.txt
D libs/flake/SnapGuideConfigWidget.cpp
D libs/flake/SnapGuideConfigWidget.h
D libs/flake/SnapGuideConfigWidget.ui
M +0 -6 libs/flake/tools/KoCreatePathTool.cpp
M +0 -2 libs/flake/tools/KoCreatePathTool.h
M +1 -8 libs/flake/tools/KoPathTool.cpp
M +3 -0 libs/guiutils/CMakeLists.txt
A libs/guiutils/KoSnapGuideConfigAction.cpp [License: LGPL (v2+)]
A libs/guiutils/KoSnapGuideConfigAction.h [License: LGPL (v2+)]
A libs/guiutils/KoSnapGuideConfigWidget.cpp \
libs/flake/SnapGuideConfigWidget.cpp#838013 [License: LGPL (v2+)] A \
libs/guiutils/KoSnapGuideConfigWidget.h libs/flake/SnapGuideConfigWidget.h#838013 \
[License: LGPL (v2+)] A libs/guiutils/KoSnapGuideConfigWidget.ui \
libs/flake/SnapGuideConfigWidget.ui#838013
--- trunk/koffice/karbon/data/karbon.rc #838093:838094
@@ -36,7 +36,7 @@
<Action name="view_show_guides"/>
<Separator/>
<Action name="view_snap_to_grid"/>
- <Action name="view_snap_to_grid"/>
+ <Action name="view_snapguides"/>
</Menu>
<Menu name="object">
--- trunk/koffice/karbon/ui/KarbonView.cpp #838093:838094
@@ -99,6 +99,7 @@
#include <KoDockerManager.h>
#include <KoShapeLayer.h>
#include <KoColorBackground.h>
+#include <KoSnapGuideConfigAction.h>
// kde header
#include <kaction.h>
@@ -1086,6 +1087,8 @@
m_snapGridAction->setToolTip(i18n( "Snaps to grid"));
connect(m_snapGridAction, SIGNAL(triggered()), this, SLOT(snapToGrid()));
+ actionCollection()->addAction("view_snapguides", new \
KoSnapGuideConfigAction(this) ); +
m_groupObjects = new KAction(KIcon("group"), i18n("&Group Objects"), this);
actionCollection()->addAction("selection_group", m_groupObjects );
m_groupObjects->setShortcut(QKeySequence("Ctrl+G"));
--- trunk/koffice/libs/flake/CMakeLists.txt #838093:838094
@@ -68,7 +68,6 @@
KoSnapGuide.cpp
KoSnapStrategy.cpp
KoSnapData.cpp
- SnapGuideConfigWidget.cpp
KoShapeShadow.cpp
KoDevice.cpp
KoDeviceEvent.cpp
@@ -146,7 +145,6 @@
kde4_add_ui_files(flake_SRCS
tools/PathToolOptionWidgetBase.ui
KoConnectionShapeConfigWidget.ui
- SnapGuideConfigWidget.ui
tools/KoZoomToolWidget.ui
)
--- trunk/koffice/libs/flake/tools/KoCreatePathTool.cpp #838093:838094
@@ -21,7 +21,6 @@
#include "KoCreatePathTool.h"
#include "KoSnapGuide.h"
-#include "SnapGuideConfigWidget.h"
#include "KoPathShape.h"
#include "KoPathPoint.h"
@@ -327,8 +326,3 @@
rect.adjust( -border.x(), -border.y(), border.x(), border.y() );
m_canvas->updateCanvas( rect );
}
-
-QWidget * KoCreatePathTool::createOptionWidget() {
- SnapGuideConfigWidget *widget = new \
SnapGuideConfigWidget(m_canvas->snapGuide());
- return widget;
-}
--- trunk/koffice/libs/flake/tools/KoCreatePathTool.h #838093:838094
@@ -59,8 +59,6 @@
protected:
/// add path shape to document
virtual void addPathShape();
- /// reimplemented
- virtual QWidget * createOptionWidget();
KoPathShape *m_shape;
--- trunk/koffice/libs/flake/tools/KoPathTool.cpp #838093:838094
@@ -40,7 +40,6 @@
#include "PathToolOptionWidget.h"
#include "KoConnectionShape.h"
#include "KoSnapGuide.h"
-#include "SnapGuideConfigWidget.h"
#include <KIcon>
#include <kdebug.h>
@@ -154,18 +153,12 @@
QWidget * KoPathTool::createOptionWidget()
{
- QTabWidget * widget = new QTabWidget(0);
-
PathToolOptionWidget * toolOptions = new PathToolOptionWidget(this);
connect(this, SIGNAL(typeChanged(int)), toolOptions, \
SLOT(setSelectionType(int)));
//connect(this, SIGNAL(pathChanged(KoPathShape*)), widget, \
SLOT(setSelectedPath(KoPathShape*))); updateOptionsWidget();
- SnapGuideConfigWidget * snapOptions = new SnapGuideConfigWidget( \
m_canvas->snapGuide(), widget );
- widget->addTab( toolOptions, i18n("Default") );
- widget->addTab( snapOptions, i18n("Snap Guides") );
-
- return widget;
+ return toolOptions;
}
void KoPathTool::pointTypeChanged( QAction *type )
--- trunk/koffice/libs/guiutils/CMakeLists.txt #838093:838094
@@ -65,6 +65,8 @@
KoPageLayoutDialog.cpp
KoPageLayoutWidget.cpp
KoPagePreviewWidget.cpp
+ KoSnapGuideConfigWidget.cpp
+ KoSnapGuideConfigAction.cpp
)
kde4_add_ui_files( koguiutils_LIB_SRCS
@@ -75,6 +77,7 @@
#KoPageLayoutHeaderBase.ui
KoEditColorSet.ui
KoShadowConfigWidget.ui
+ KoSnapGuideConfigWidget.ui
)
kde4_add_library(koguiutils SHARED ${koguiutils_LIB_SRCS})
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic