-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
+// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// SALOME SalomeApp
-//
-// File : SalomeApp_ListView.h
-// Author : Vadim SANDLER
-// Module : SALOME
+// File : SalomeApp_ListView.h
+// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
+//
#ifndef SALOMEAPP_LISTVIEW_H
#define SALOMEAPP_LISTVIEW_H
-#include <QtxListView.h>
+//#include <QtxListView.h>
-#include <qlist.h>
-#include <qstring.h>
-#include <qpixmap.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
+#include <SUIT_PopupClient.h>
-//VRV: porting on Qt 3.0.5
-#if QT_VERSION >= 0x030005
-#include <qtoolbutton.h>
-#endif
-//VRV: porting on Qt 3.0.5
+#include <QTreeWidget>
+#include <QTreeWidgetItem>
+#include <QString>
+#include <QLineEdit>
+#include <QComboBox>
-#include <TColStd_ListOfInteger.hxx>
-#include <TColStd_ListOfReal.hxx>
+class QToolButton;
-#include <SUIT_PopupClient.h>
+class TColStd_ListOfInteger;
+class TColStd_ListOfReal;
// enumeration for ListView updating mode
enum UpdateType {
\class SalomeApp_ListView
parent class for Data Viewer and Properties Viewer
*/
-class SalomeApp_ListView : public QtxListView , public SUIT_PopupClient {
+class SalomeApp_ListView : public QTreeWidget/*QtxListView*/ , public SUIT_PopupClient {
Q_OBJECT
// fills popup with items
virtual QString popupClientType() const;
- virtual void contextMenuPopup( QPopupMenu* );
+ virtual void contextMenuPopup( QMenu* );
// setting editing of items availbale/not available
void enableEditing(bool theFlag);
public:
SalomeApp_EntityEdit( QWidget* parent,
- int controlType = etLineEdit,
- int valueType = vtString,
- bool butApply = false,
- bool butCancel = false);
+ int controlType = etLineEdit,
+ int valueType = vtString,
+ bool butApply = false,
+ bool butCancel = false);
~SalomeApp_EntityEdit();
void finishEditing();
QString getText();
void setText(const QString& theText );
void insertItem( const QString& theValue,
- bool theSetCurrent = false,
- int theOrder = atBottom );
+ bool theSetCurrent = false,
+ int theOrder = atBottom );
void insertList( const QStringList& theList,
- const int theCurrent = -1 );
+ const int theCurrent = -1 );
void insertItem( const int theValue,
- bool theSetCurrent = false );
+ bool theSetCurrent = false );
void insertList( const TColStd_ListOfInteger& theList,
- const int theCurrent = -1 );
+ const int theCurrent = -1 );
void insertItem( const double theValue,
- bool theSetCurrent = false );
+ bool theSetCurrent = false );
void insertList( const TColStd_ListOfReal& theList,
- const int theCurrent = -1 );
+ const int theCurrent = -1 );
QWidget* getControl();
void setFocus();
void setValidator(const QValidator*);
QString myString;
};
-class SalomeApp_ListViewItem : public QListViewItem
+class SalomeApp_ListViewItem : public QTreeWidgetItem
{
public:
SalomeApp_ListViewItem( SalomeApp_ListView* );
SalomeApp_ListViewItem( SalomeApp_ListView*,
- SalomeApp_ListViewItem* );
- SalomeApp_ListViewItem( SalomeApp_ListView*,
- const QString&,
- const bool = false );
+ SalomeApp_ListViewItem* );
SalomeApp_ListViewItem( SalomeApp_ListView*,
- const QString& theName,
- const QString& theValue,
- const bool = false );
- SalomeApp_ListViewItem( SalomeApp_ListViewItem* theParent,
- const QString&,
- const bool = false );
- SalomeApp_ListViewItem( SalomeApp_ListView*,
- SalomeApp_ListViewItem*,
- const QString&,
- const bool = false );
+ const QStringList&,
+ const bool = false );
SalomeApp_ListViewItem( SalomeApp_ListViewItem*,
- SalomeApp_ListViewItem*,
- const QString&,
- const bool = false);
+ const QStringList&,
+ const bool = false );
+ SalomeApp_ListViewItem( SalomeApp_ListView*,
+ SalomeApp_ListViewItem*,
+ const QString&,
+ const bool = false );
SalomeApp_ListViewItem( SalomeApp_ListViewItem*,
- const QString& theName,
- const QString& theValue,
- const bool = false);
+ SalomeApp_ListViewItem*,
+ const QString&,
+ const bool = false);
SalomeApp_ListViewItem( SalomeApp_ListView*,
- SalomeApp_ListViewItem*,
- const QString& theName,
- const QString& theValue,
- const bool = false);
+ SalomeApp_ListViewItem*,
+ const QString& theName,
+ const QString& theValue,
+ const bool = false);
SalomeApp_ListViewItem( SalomeApp_ListViewItem*,
- SalomeApp_ListViewItem*,
- const QString&,
- const QString&,
- const bool = false);
+ SalomeApp_ListViewItem*,
+ const QString&,
+ const QString&,
+ const bool = false);
~SalomeApp_ListViewItem();
QString fullName();
protected:
// initialization
void init();
+ int depth() const;
private:
bool myEditable;