Debugger: Save width of manually resized tree view columns

Task-number: QTCREATORBUG-12670
Change-Id: I5c31ffd6d3bb3060e851df56e9d9a80101df9347
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
This commit is contained in:
hjk
2014-07-16 16:32:11 +02:00
parent 2224f8476d
commit 29e312f33e
4 changed files with 233 additions and 71 deletions

View File

@@ -34,15 +34,23 @@
#include "itemviews.h"
QT_BEGIN_NAMESPACE
class QSettings;
QT_END_NAMESPACE
namespace Utils {
namespace Internal { class BaseTreeViewPrivate; }
class QTCREATOR_UTILS_EXPORT BaseTreeView : public TreeView
{
Q_OBJECT
public:
BaseTreeView(QWidget *parent = 0);
~BaseTreeView();
void setSettings(QSettings *settings, const QByteArray &key);
QModelIndexList activeRows() const;
void setModel(QAbstractItemModel *model);
@@ -51,16 +59,10 @@ public:
void mousePressEvent(QMouseEvent *ev);
public slots:
void resizeColumns();
void setAlternatingRowColorsHelper(bool on) { setAlternatingRowColors(on); }
private slots:
void rowActivatedHelper(const QModelIndex &index) { rowActivated(index); }
void rowClickedHelper(const QModelIndex &index) { rowClicked(index); }
void toggleColumnWidth(int logicalIndex);
private:
int suggestedColumnSize(int column) const;
Internal::BaseTreeViewPrivate *d;
};
} // namespace Utils