[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/kdevelop/3.4/parts/ctags2
From:       Megan Webb <kdeveloper.megan () gmail ! com>
Date:       2006-12-02 23:32:29
Message-ID: 1165102349.699346.23219.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 609982 by webb:

Auto resize the column.


 M  +11 -2     ctags2_widget.cpp  


--- branches/kdevelop/3.4/parts/ctags2/ctags2_widget.cpp #609981:609982
@@ -41,11 +41,16 @@
 
 TagItem::TagItem( QListView * lv, QString const & tag, QString const & type, QString \
const & file, QString const & pattern )  : QListViewItem( lv, tag, type, file ), \
                tag(tag), type(type), file(file), pattern(pattern)
-{}
+{
+}
 
 CTags2Widget::CTags2Widget( CTags2Part * part, const char* name, WFlags fl)
 : CTags2WidgetBase(0,name,fl), _part(part)
 {
+    output_view->setColumnWidthMode(0,QListView::Maximum);
+	output_view->setColumnWidthMode(1,QListView::Maximum);
+	output_view->setColumnWidthMode(2,QListView::Maximum);
+
 	_typeTimeout = new QTimer( this );
 	connect( _typeTimeout, SIGNAL(timeout()), this, SLOT(line_edit_changed()) );
 
@@ -70,6 +75,11 @@
 		new TagItem( output_view, (*it).tag, (*it).type, (*it).file, (*it).pattern );
 		++it;
 	}
+
+	output_view->adjustColumn(0);
+	output_view->adjustColumn(1);
+	output_view->adjustColumn(2);
+
 }
 
 void CTags2Widget::displayHitsAndClear( Tags::TagList const & list )
@@ -175,7 +185,6 @@
 		}
 		item = item->nextSibling();
 	}
-	
 	// use the first
 	if ( (item = output_view->firstChild()) != NULL )
 	{


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic