Mailinglist Archive: yast-commit (819 mails)

< Previous Next >
[yast-commit] r54526 - /trunk/qt-pkg/src/YQPkgVersionsView.cc
  • From: sh-sh-sh@xxxxxxxxxxxxxxxx
  • Date: Fri, 09 Jan 2009 17:22:29 -0000
  • Message-id: <E1LLL41-0003kT-NX@xxxxxxxxxxxxxxxx>
Author: sh-sh-sh
Date: Fri Jan 9 18:22:29 2009
New Revision: 54526

URL: http://svn.opensuse.org/viewcvs/yast?rev=54526&view=rev
Log:
Removed utterly useless class that didn't do anything

Modified:
trunk/qt-pkg/src/YQPkgVersionsView.cc

Modified: trunk/qt-pkg/src/YQPkgVersionsView.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/qt-pkg/src/YQPkgVersionsView.cc?rev=54526&r1=54525&r2=54526&view=diff
==============================================================================
--- trunk/qt-pkg/src/YQPkgVersionsView.cc (original)
+++ trunk/qt-pkg/src/YQPkgVersionsView.cc Fri Jan 9 18:22:29 2009
@@ -33,28 +33,6 @@
#include "YQi18n.h"
#include "utf8.h"

-class InstalledItemLabel : public QWidget
-{
-public:
- InstalledItemLabel( QWidget *parent, const QString &text )
- : QWidget(parent)
- {
- QLabel *_picture;
- QLabel *_text;
- QHBoxLayout *layout = new QHBoxLayout(this);
-
- _picture = new QLabel(this);
- _text = new QLabel(this);
- _text->setText(text);
- _picture->setPixmap(YQIconPool::pkgSatisfied());
- layout->addWidget(_picture);
- layout->addWidget(_text);
- layout->addStretch();
-
- }
-};
-
-


YQPkgVersionsView::YQPkgVersionsView( QWidget * parent, bool userCanSwitch )
@@ -143,7 +121,7 @@
pkgNameLabel->setFont( font );
pkgNameLabel->setText( selectable->theObj()->name().c_str() );

- // new scope
+ // New scope
{
QListIterator<QAbstractButton*> it( _buttons->buttons() );

@@ -153,13 +131,15 @@
}
}

- // delete all installed items
+ // Delete all installed items
qDeleteAll( _installed );
_installed.clear();
+

+ //
// Fill installed objects
+ //
{
-
zypp::ui::Selectable::installed_iterator it =
selectable->installedBegin();

while ( it != selectable->installedEnd() )
@@ -168,16 +148,29 @@
.arg( (*it)->edition().asString().c_str() )
.arg( (*it)->arch().asString().c_str() );

- QWidget * versionLabel = new InstalledItemLabel( this, text );
+ QWidget * installedVersion = new QWidget( this );
+ QHBoxLayout *layout = new QHBoxLayout( installedVersion );
+
+ QLabel * icon = new QLabel( installedVersion );
+ icon->setPixmap( YQIconPool::pkgSatisfied() );
+ layout->addWidget( icon );
+
+ QLabel * textLabel = new QLabel( text, installedVersion );
+ layout->addWidget( textLabel );
+ layout->addStretch();

- _installed.push_back( versionLabel );
- _layout->addWidget( versionLabel );
+ _installed.push_back( installedVersion );
+ _layout->addWidget( installedVersion );

++it;
}
}

+
+ //
// Fill available objects
+ //
+
{
zypp::ui::Selectable::available_iterator it =
selectable->availableBegin();


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

< Previous Next >
This Thread
  • No further messages