Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

omglistwidget.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2006 by Tim Sutton   *
00003  *   tim@linfiniti.com   *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 
00021 #ifndef OMGLISTWIDGET_H
00022 #define OMGLISTWIDGET_H
00023 
00024 #include <ui_omglistwidgetbase.h>
00025 //
00026 // QT includes
00027 //
00028 
00029 class QListWidgetItem;
00030 class QStringList;
00031 
00032 class OMG_LIB_EXPORT OmgListWidget : public QWidget, private Ui::OmgListWidgetBase
00033 {
00034   Q_OBJECT;
00035 
00036 public:
00037   OmgListWidget(QWidget* parent = 0, Qt::WFlags fl = 0 );
00038   ~OmgListWidget();
00039   
00041   // All other public methods should use exactly the api format of QListWidget !!
00043   int count();
00044   QListWidgetItem * item(int theItem);
00045   /*$PUBLIC_FUNCTIONS$*/
00046 public slots:
00047   /*$PUBLIC_SLOTS$*/
00049   void selectAll();
00050   void invertSelection();
00051   void selectNone();
00055   int checkedItemCount();
00060   QStringList checkedItems();
00066   QStringList checkedDataItems();
00068   void hideOptionsTool();
00070   void showOptionsTool();
00077   void hideAddItemTool();
00084   void showAddItemTool();
00086   // All other slots should use exactly the api format of QListWidget !!
00088   void addItem ( const QString & theLabel, bool theCheckedFlag );
00089   void addItem ( QListWidgetItem * thepItem, bool theCheckedFlag );
00090   void addItems ( const QStringList & theLabels, bool theCheckedFlag );
00091   void clear();
00092   void insertItem ( int theRow, QListWidgetItem * thepItem, bool theCheckedFlag );
00093   void insertItem ( int theRow, const QString & theLabel, bool theCheckedFlag );
00094   void insertItems ( int theRow, const QStringList & theLabels, bool theCheckedFlag );
00095 protected:
00096   /*$PROTECTED_FUNCTIONS$*/
00097 
00098 public slots:
00099   /*$PROTECTED_SLOTS$*/
00104   void itemPressedSlot(QListWidgetItem * theItem);
00105 
00106 signals:
00107   
00108   void itemPressed(QListWidgetItem * thepItem);
00109   void addItemClicked();
00110   void configureClicked();
00111 
00112 private:
00113 
00114 private slots:
00116   // Slots inherited from the parent
00118   void on_toolSelectAll_clicked();
00119   void on_toolSelectNone_clicked();
00120   void on_toolInvertSelection_clicked();
00121   void on_toolAddItem_clicked();
00122   void on_toolConfigure_clicked();
00123 };
00124 
00125 #endif
00126 

Generated on Mon Apr 28 15:09:57 2008 for openModellerDesktop by  doxygen 1.4.1-20050210