[Patch] Ui cleanups for Project View plugin

Andreas Pakulat apaku at gmx.de
Tue Apr 14 16:18:31 UTC 2009


On 14.04.09 14:08:26, Sean Harmer wrote:
> Please find attached a patch that makes some small ui changes to the Project 
> View plugin. These are mainly related to the build set widget where I have 
> moved the build set item manipulation buttons to be above the widget to save 
> horizontal space

I don't think thats good, if the buttons are on a side of the list, its
instantly obvious what they do, if they are on the top this is not
obvious at all anymore. I mean, it could also be move items frmo the
buildset to the project tree and vice versa.

> I have also replaced the QTableView with a QTreeView so that we get better 
> behaviour when hovering over items. That is the whole row is highlighted by 
> the style rather than a single cell.

I suggest to write a bugreport to Qt Software about that, the table is
set to select rows only so hovering should also only hover complete
rows.

Hmm, also you can ignore my "has a grid and alternating row colors" part
of the other mail. Grid is actually disabled and the treeview does have
alternating row colors just as any other view.

Sooo... Ok, lets go with the treeview for now.

> I have also made the columns in the build set widget adjust themselves to 
> their content whenever items are added or removed.

What if I as a user change the size of one of the columns. That should
have priority at all times.

> The only change in the outer widget's ui file is to remove an extraneous level 
> of layout.

That part is fine :)
 
> Can somebody review and commit if it is OK please?
> 
> ps I tried sending this on Sunday but it never appeared on the list. 
> Originally I had the screen-shot as an attachment so maybe it got stuck in 
> some moderation queue?

IIRC there's a size limit on the list, something like 20 or 40K IIRC...

Oh and as was already suggested, please use reviewboard for any
non-trivial patches, makes the review process a bit easier.

Now on to some individual small things:

> -ProjectBuildSetWidget::~ProjectBuildSetWidget()
> +void ProjectBuildSetWidget::rowCountChanged( const QModelIndex& parent, int start, int end )
>  {
> -    delete m_ui;
> +    Q_UNUSED( parent );
> +    Q_UNUSED( start );
> +    Q_UNUSED( end );
> +    for ( int i = 0; i < m_ui->itemView->model()->columnCount() - 1; ++i )
> +        m_ui->itemView->resizeColumnToContents( i );

This can be changed to m_ui->itemView->header()->resizeSections(
QHeaderView::ResizeToContents ); as thus avoid the loop.

> +#include <QModelIndex>

No need for the include, just add a forward declaration.

Andreas
  
-- 
You have no real enemies.




More information about the KDevelop-devel mailing list