[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdesdk/umbrello/umbrello
From: Jonathan Riddell <jri () jriddell ! org>
Date: 2003-01-31 19:57:11
[Download RAW message or body]
CVS commit by jriddell:
Added zoom buttons to toolbar
M +4 -0 umbrelloui.rc 1.2
M +4 -6 uml.cpp 1.6
M +7 -11 umlview.cpp 1.8
--- kdesdk/umbrello/umbrello/umbrelloui.rc #1.1:1.2
@@ -39,3 +39,7 @@
</Menu>
</MenuBar>
+<ToolBar name="mainToolBar">
+ <Action name="umbrello_zoom_in"/>
+ <Action name="umbrello_zoom_out"/>
+</ToolBar>
</kpartgui>
--- kdesdk/umbrello/umbrello/uml.cpp #1.5:1.6
@@ -145,8 +145,6 @@ void UMLApp::initActions() {
selectAll = KStdAction::selectAll(this, SLOT( slotSelectAll() ), \
actionCollection());
-//FIXME - add UI if you want to have zoom in/out by clicking on the diagram
-// note that resultating zoom could not correspond to one of the predefined values \
if you dont watch the zooming step size
- //zoomInAction = new KAction(i18n("Zoom \
In"),"file_new",0,this,SLOT(zoomIn()),actionCollection(),"zoom_in");
- //zoomOutAction = new KAction(i18n("Zoom \
Out"),0,this,SLOT(zoomOut()),actionCollection(),"zoom_out"); + zoomInAction = \
KStdAction::zoomIn(this, SLOT( zoomIn() ), actionCollection(), "umbrello_zoom_in"); \
+ zoomOutAction = KStdAction::zoomOut(this, SLOT( zoomOut() ), \
actionCollection(), "umbrello_zoom_out");
classWizard = new KAction(i18n("New Class \
Wizard..."),0,this,SLOT(slotClassWizard()), @@ -235,5 +233,5 @@ void \
UMLApp::initActions() {
showDocumentation->setChecked( optionState.uiState.showDocWindow );
showDocumentation->setStatusText( i18n( "Enables/disables the documentation \
window" ) );
- // use the absolute path to your umlui.rc file for testing purpose in \
createGUI(); + // use the absolute path to your umbrelloui.rc file for testing \
purpose in createGUI(); createGUI();
--- kdesdk/umbrello/umbrello/umlview.cpp #1.7:1.8
@@ -2711,6 +2711,5 @@ void UMLView::setShowSnapGrid(bool bShow
}
-void UMLView::setZoom(int zoom)
-{
+void UMLView::setZoom(int zoom) {
if(zoom<10) zoom = 10;
else if (zoom > 500) zoom = 500;
@@ -2721,21 +2720,18 @@ void UMLView::setZoom(int zoom)
}
-int UMLView::currentZoom()
-{
+int UMLView::currentZoom() {
return (int)(worldMatrix().m11()*100.0);
}
-void UMLView::zoomIn()
-{
+void UMLView::zoomIn() {
QWMatrix wm = worldMatrix();
- wm.scale(2.0,2.0); // adjust zooming step here
+ wm.scale(1.5,1.5); // adjust zooming step here
setWorldMatrix(wm);
}
-void UMLView::zoomOut()
-{
+void UMLView::zoomOut() {
QWMatrix wm = worldMatrix();
- wm.scale(0.5,0.5); //adjust zooming step here
+ wm.scale(2.0/3.0, 2.0/3.0); //adjust zooming step here
setWorldMatrix(wm);
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic