[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdegraphics/gwenview/app
From:       Aurélien Gâteau <aurelien.gateau () free ! fr>
Date:       2007-06-30 22:53:37
Message-ID: 1183244017.437682.1176.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 681942 by gateau:

Added rotate & mirror actions. Do nothing for now.


 M  +10 -1     gwenviewui.rc  
 M  +44 -0     mainwindow.cpp  
 M  +5 -0      mainwindow.h  


--- trunk/KDE/kdegraphics/gwenview/app/gwenviewui.rc #681941:681942
@@ -19,6 +19,12 @@
 		<Separator/>
 		<Action name="toggle_sidebar" />
 	</Menu>
+	<Menu name="edit" >
+		<Action name="rotate_left" />
+		<Action name="rotate_right" />
+		<Action name="mirror" />
+		<Action name="flip" />
+	</Menu>
 	<Menu name="go_web" >
 		<Action name="go_to_previous"/>
 		<Action name="go_to_next"/>
@@ -27,7 +33,7 @@
 	</Menu>
 </MenuBar>
 
-<ToolBar name="mainToolBar" >
+<ToolBar name="mainToolBar" noMerge="1">
 	<text>Main Toolbar</text>
 	<Action name="browse" />
 	<Action name="preview" />
@@ -37,6 +43,9 @@
 	<Action name="go_to_previous" />
 	<Action name="go_to_next" />
 	<Separator/>
+	<Action name="rotate_left" />
+	<Action name="rotate_right" />
+	<Separator/>
 	<Merge/>
 	<Separator/>
 	<Action name="toggle_sidebar" />
--- trunk/KDE/kdegraphics/gwenview/app/mainwindow.cpp #681941:681942
@@ -125,6 +125,10 @@
 	QAction* mGoUpAction;
 	QAction* mGoToPreviousAction;
 	QAction* mGoToNextAction;
+	QAction* mRotateLeftAction;
+	QAction* mRotateRightAction;
+	QAction* mMirrorAction;
+	QAction* mFlipAction;
 	QAction* mToggleSideBarAction;
 	KToggleFullScreenAction* mFullScreenAction;
 
@@ -239,6 +243,30 @@
 		mGoUpAction = KStandardAction::up(mWindow, SLOT(goUp()), actionCollection);
 		mGoUpButton->setDefaultAction(mGoUpAction);
 
+		mRotateLeftAction = actionCollection->addAction("rotate_left");
+		mRotateLeftAction->setText(i18n("Rotate Left"));
+		mRotateLeftAction->setIcon(KIcon("object-rotate-left"));
+		mRotateLeftAction->setShortcut(Qt::Key_Control + Qt::Key_L);
+		connect(mRotateLeftAction, SIGNAL(triggered()),
+			mWindow, SLOT(rotateLeft()) );
+
+		mRotateRightAction = actionCollection->addAction("rotate_right");
+		mRotateRightAction->setText(i18n("Rotate Right"));
+		mRotateRightAction->setIcon(KIcon("object-rotate-right"));
+		mRotateRightAction->setShortcut(Qt::Key_Control + Qt::Key_R);
+		connect(mRotateRightAction, SIGNAL(triggered()),
+			mWindow, SLOT(rotateRight()) );
+
+		mMirrorAction = actionCollection->addAction("mirror");
+		mMirrorAction->setText(i18n("Mirror"));
+		connect(mMirrorAction, SIGNAL(triggered()),
+			mWindow, SLOT(mirror()) );
+
+		mFlipAction = actionCollection->addAction("flip");
+		mFlipAction->setText(i18n("Flip"));
+		connect(mFlipAction, SIGNAL(triggered()),
+			mWindow, SLOT(flip()) );
+
 		mToggleSideBarAction = actionCollection->addAction("toggle_sidebar");
 		mToggleSideBarAction->setIcon(KIcon("view-sidetree"));
 		connect(mToggleSideBarAction, SIGNAL(triggered()),
@@ -744,4 +772,20 @@
 }
 
 
+void MainWindow::rotateLeft() {
+}
+
+
+void MainWindow::rotateRight() {
+}
+
+
+void MainWindow::mirror() {
+}
+
+
+void MainWindow::flip() {
+}
+
+
 } // namespace
--- trunk/KDE/kdegraphics/gwenview/app/mainwindow.h #681941:681942
@@ -81,6 +81,11 @@
 
 	void saveAs();
 
+	void rotateLeft();
+	void rotateRight();
+	void mirror();
+	void flip();
+
 private:
 	class Private;
 	std::auto_ptr<Private> d;
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic