Author: kmachalkova Date: Fri Jun 5 12:30:06 2009 New Revision: 57457 URL: http://svn.opensuse.org/viewcvs/yast?rev=57457&view=rev Log: Small context menu Modified: branches/tmp/tgoettlicher/yast2cc_rewrite/src/main_window.cpp branches/tmp/tgoettlicher/yast2cc_rewrite/src/main_window.h Modified: branches/tmp/tgoettlicher/yast2cc_rewrite/src/main_window.cpp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2cc_rewrite/src/main_window.cpp?rev=57457&r1=57456&r2=57457&view=diff ============================================================================== --- branches/tmp/tgoettlicher/yast2cc_rewrite/src/main_window.cpp (original) +++ branches/tmp/tgoettlicher/yast2cc_rewrite/src/main_window.cpp Fri Jun 5 12:30:06 2009 @@ -114,6 +114,10 @@ addDockWidget(Qt::LeftDockWidgetArea, groupdock); readSettings(); + + initActions(); + d->modview->addAction( addToF ); + d->modview->setContextMenuPolicy( Qt::ActionsContextMenu ); connect( d->groupview, SIGNAL( pressed( const QModelIndex & ) ), SLOT( slotGroupPressed( const QModelIndex & ) ) ); @@ -123,6 +127,7 @@ connect( d->modview, SIGNAL( doubleClicked( const QModelIndex & ) ), SLOT( slotLaunchModule( const QModelIndex & ) ) ); + } void MainWindow::slotGroupPressed( const QModelIndex &index ) @@ -149,7 +154,7 @@ void MainWindow::initActions() { - + addToF = new QAction( "Add to Favourites", this ); } void MainWindow::slotLaunchModule( const QModelIndex &index) Modified: branches/tmp/tgoettlicher/yast2cc_rewrite/src/main_window.h URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2cc_rewrite/src/main_window.h?rev=57457&r1=57456&r2=57457&view=diff ============================================================================== --- branches/tmp/tgoettlicher/yast2cc_rewrite/src/main_window.h (original) +++ branches/tmp/tgoettlicher/yast2cc_rewrite/src/main_window.h Fri Jun 5 12:30:06 2009 @@ -18,6 +18,7 @@ #include <QMainWindow> +#include <QAction> #include <QCloseEvent> /** @@ -44,6 +45,8 @@ class Private; Private *const d; + QAction *addToF; + void writeSettings(); void readSettings(); }; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org