author | zecke <zecke> | 2004-03-26 22:36:43 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-03-26 22:36:43 (UTC) |
commit | c54a3c8cc47258743381d4dee4200304d247182d (patch) (side-by-side diff) | |
tree | bc96497821743c7b7789004fd700f58f10f0f772 | |
parent | 2487838d0f9358d6efdf714e9dfd892f92802b46 (diff) | |
download | opie-c54a3c8cc47258743381d4dee4200304d247182d.zip opie-c54a3c8cc47258743381d4dee4200304d247182d.tar.gz opie-c54a3c8cc47258743381d4dee4200304d247182d.tar.bz2 |
Add WFlags to the c'tor so we eventually can use this
in the designer... but anyway making it more consistent with Qt
Ah and this is binary incompatible but the API isn't marked as stable
anyway
-rw-r--r-- | libopie2/opieui/olistview.cpp | 4 | ||||
-rw-r--r-- | libopie2/opieui/olistview.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/libopie2/opieui/olistview.cpp b/libopie2/opieui/olistview.cpp index 38670b4..d7c92fd 100644 --- a/libopie2/opieui/olistview.cpp +++ b/libopie2/opieui/olistview.cpp @@ -16,66 +16,66 @@ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU ..}^=.= = ; Library General Public License for more ++= -. .` .: details. : = ...= . :.=- -. .:....=;==+<; You should have received a copy of the GNU -_. . . )=. = Library General Public License along with -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* QT */ #include <qpixmap.h> /* OPIE */ #include <opie2/odebug.h> #include <opie2/olistview.h> using namespace Opie::Core; namespace Opie { namespace Ui { /*====================================================================================== * OListView *======================================================================================*/ -OListView::OListView( QWidget *parent, const char *name ) - :QListView( parent, name ) +OListView::OListView( QWidget *parent, const char *name, WFlags fl ) + :QListView( parent, name, fl ) { //FIXME: get from global settings and calculate ==> see oglobalsettings.* m_alternateBackground = QColor( 238, 246, 255 ); m_columnSeparator = QPen( QColor( 150, 160, 170 ), 0, DotLine ); m_fullWidth = true; connect( this, SIGNAL(expanded(QListViewItem*)), SLOT(expand(QListViewItem*))); } OListView::~OListView() { } void OListView::setFullWidth( bool fullWidth ) { m_fullWidth = m_fullWidth; #if QT_VERSION > 290 header()->setStretchEnabled( fullWidth, columns()-1 ); #endif } bool OListView::fullWidth() const { return m_fullWidth; } int OListView::addColumn( const QString& label, int width ) { int result = QListView::addColumn( label, width ); #if QT_VERSION > 290 if (m_fullWidth) { header()->setStretchEnabled( false, columns()-2 ); diff --git a/libopie2/opieui/olistview.h b/libopie2/opieui/olistview.h index 8195a62..3ff11ef 100644 --- a/libopie2/opieui/olistview.h +++ b/libopie2/opieui/olistview.h @@ -36,65 +36,65 @@ #include <qdatastream.h> #include <qstringlist.h> namespace Opie { namespace Ui { class OListViewItem; /*====================================================================================== * OListView *======================================================================================*/ /** * @brief A list/tree widget. * * A @ref QListView variant featuring visual and functional enhancements * like an alternate background for odd rows, an autostretch mode * for the width of the widget ( >= Qt 3 only ) and persistence capabilities. * * @author Michael 'Mickey' Lauer <mickey@vanille.de> */ class OListView: public QListView { Q_OBJECT public: /** * Constructor. * * The parameters @a parent and @a name are handled by * @ref QListView, as usual. */ - OListView( QWidget* parent = 0, const char* name = 0 ); + OListView( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); /** * Destructor. */ virtual ~OListView(); /** * Let the last column fit exactly all the available width. */ void setFullWidth( bool fullWidth ); /** * Returns whether the last column is set to fit the available width. */ bool fullWidth() const; /** * Reimplemented for full width support */ virtual int addColumn( const QString& label, int width = -1 ); /** * Reimplemented for full width support */ virtual int addColumn( const QIconSet& iconset, const QString& label, int width = -1 ); /** * Reimplemented for full width support */ virtual void removeColumn(int index); /** * Set the alternate background background @a color. * Set to an invalid color to disable alternate colors. * This only has an effect if the items are OListViewItems */ void setAlternateBackground( const QColor& color ); /** * Sets the column separator @a pen. |