Mailinglist Archive: yast-commit (819 mails)

< Previous Next >
[yast-commit] r54924 - in /branches/tmp/sh/tabbed-pkg-browsing/qt-pkg/src: YQPkgFilterTab.cc YQPkgFilterTab.h
  • From: sh-sh-sh@xxxxxxxxxxxxxxxx
  • Date: Thu, 22 Jan 2009 18:27:34 -0000
  • Message-id: <E1LQ4H8-0005ZG-42@xxxxxxxxxxxxxxxx>
Author: sh-sh-sh
Date: Thu Jan 22 19:27:33 2009
New Revision: 54924

URL: http://svn.opensuse.org/viewcvs/yast?rev=54924&view=rev
Log:
renamed [New] button to [View] and moved it to top left corner

Modified:
branches/tmp/sh/tabbed-pkg-browsing/qt-pkg/src/YQPkgFilterTab.cc
branches/tmp/sh/tabbed-pkg-browsing/qt-pkg/src/YQPkgFilterTab.h

Modified: branches/tmp/sh/tabbed-pkg-browsing/qt-pkg/src/YQPkgFilterTab.cc
URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/tabbed-pkg-browsing/qt-pkg/src/YQPkgFilterTab.cc?rev=54924&r1=54923&r2=54924&view=diff
==============================================================================
--- branches/tmp/sh/tabbed-pkg-browsing/qt-pkg/src/YQPkgFilterTab.cc (original)
+++ branches/tmp/sh/tabbed-pkg-browsing/qt-pkg/src/YQPkgFilterTab.cc Thu Jan 22
19:27:33 2009
@@ -42,10 +42,13 @@
using std::vector;
typedef vector<YQPkgFilterPage *> YQPkgFilterPageVector;

+#define SHOW_ONLY_IMPORTANT_PAGES 1
+#define VIEW_BUTTON_LEFT 1
+
+
#define MARGIN 5 // inner margin between 3D borders and content
#define TOP_EXTRA_MARGIN 3
#define SPLITTER_HALF_SPACING 2
-#define SHOW_ONLY_IMPORTANT_PAGES 1


struct YQPkgFilterTabPrivate
@@ -57,7 +60,7 @@
, filtersWidgetStack(0)
, diskUsageList(0)
, rightPane(0)
- , newButton(0)
+ , viewButton(0)
, closeButton(0)
{}

@@ -67,7 +70,7 @@
QStackedWidget * filtersWidgetStack;
YQPkgDiskUsageList * diskUsageList;
QWidget * rightPane;
- QPushButton * newButton;
+ QPushButton * viewButton;
QPushButton * closeButton;
YQPkgFilterPageVector pages;
};
@@ -110,7 +113,7 @@
#if SHOW_ONLY_IMPORTANT_PAGES

//
- // "New" and "Close" buttons
+ // "View" and "Close" buttons
//

QWidget * buttonBox = new QWidget( this );
@@ -123,13 +126,19 @@
buttonBox->setLayout( buttonBoxLayout );
buttonBoxLayout->setContentsMargins( 0, 0, 0, 0 );

- priv->newButton = new QPushButton( _( "&New" ), buttonBox );
- YUI_CHECK_NEW( priv->newButton );
- buttonBoxLayout->addWidget( priv->newButton );
+#if VIEW_BUTTON_LEFT
+ priv->viewButton = new QPushButton( _( "&View" ), this );
+ YUI_CHECK_NEW( priv->viewButton );
+ setCornerWidget( priv->viewButton, Qt::TopLeftCorner );
+#else
+ priv->viewButton = new QPushButton( _( "&View" ), buttonBox );
+ YUI_CHECK_NEW( priv->viewButton );
+ buttonBoxLayout->addWidget( priv->viewButton );
+#endif

QMenu * menu = new QMenu();
YUI_CHECK_NEW( menu );
- priv->newButton->setMenu( menu );
+ priv->viewButton->setMenu( menu );
menu->setTearOffEnabled( true );

connect( menu, SIGNAL( triggered( QAction * ) ),
@@ -261,13 +270,13 @@
priv->filtersWidgetStack->addWidget( pageContent );


- if ( priv->newButton && priv->newButton->menu() )
+ if ( priv->viewButton && priv->viewButton->menu() )
{
QAction * action = new QAction( pageLabel, this );
YUI_CHECK_NEW( action );
action->setData( qVariantFromValue( pageContent ) );

- priv->newButton->menu()->addAction( action );
+ priv->viewButton->menu()->addAction( action );
}

#if SHOW_ONLY_IMPORTANT_PAGES

Modified: branches/tmp/sh/tabbed-pkg-browsing/qt-pkg/src/YQPkgFilterTab.h
URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/tabbed-pkg-browsing/qt-pkg/src/YQPkgFilterTab.h?rev=54924&r1=54923&r2=54924&view=diff
==============================================================================
--- branches/tmp/sh/tabbed-pkg-browsing/qt-pkg/src/YQPkgFilterTab.h (original)
+++ branches/tmp/sh/tabbed-pkg-browsing/qt-pkg/src/YQPkgFilterTab.h Thu Jan 22
19:27:33 2009
@@ -33,8 +33,8 @@
/**
* Widget for "tabbed browsing" in packages:
*
- * /------\/------\/------\
- * | Tab1 || Tab2 || Tab3 | [New] [Close]
+ * /------\/------\/------\
+ * [View v] | Tab1 || Tab2 || Tab3 | [Close]
* +-----------------+------------------------------------+
* | | |
* | QStackedWidget: | Right pane |
@@ -56,7 +56,7 @@
*
* Only a small numbers of filter pages is displayed as open tabs right
* away. Each of the other filter pages is shown in a new tabs when the user
- * requests it via the pop-up menu on [New] button. Similarly, the tabs for all
+ * requests it via the pop-up menu on [View] button. Similarly, the tabs for
all
* but the last filter pages can be closed with the [Close] button.
*
* The left (filter page) and right panes are separated with a user-moveable

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages