mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-15 16:00:37 +05:00
Fix problems:
- too small width of Filter dialog box - allow activating filter items by single click
This commit is contained in:
parent
f8dd22cb6e
commit
8dcf8390a4
@ -501,6 +501,8 @@ public:
|
|||||||
Table( int, int, QWidget* = 0 );
|
Table( int, int, QWidget* = 0 );
|
||||||
virtual ~Table();
|
virtual ~Table();
|
||||||
|
|
||||||
|
QSize minimumSizeHint() const;
|
||||||
|
|
||||||
void setEditable( bool, int, int );
|
void setEditable( bool, int, int );
|
||||||
bool isEditable( int, int ) const;
|
bool isEditable( int, int ) const;
|
||||||
|
|
||||||
@ -526,6 +528,10 @@ SMESHGUI_FilterTable::Table::Table (QWidget* parent)
|
|||||||
setReadOnly( false );
|
setReadOnly( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
// name : SMESHGUI_FilterTable::Table::Table
|
||||||
|
// Purpose : Constructor
|
||||||
|
//=======================================================================
|
||||||
SMESHGUI_FilterTable::Table::Table (int numRows, int numCols, QWidget* parent)
|
SMESHGUI_FilterTable::Table::Table (int numRows, int numCols, QWidget* parent)
|
||||||
: QTableWidget(numRows, numCols, parent)
|
: QTableWidget(numRows, numCols, parent)
|
||||||
{
|
{
|
||||||
@ -535,10 +541,27 @@ SMESHGUI_FilterTable::Table::Table (int numRows, int numCols, QWidget* parent)
|
|||||||
setReadOnly( false );
|
setReadOnly( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
// name : SMESHGUI_FilterTable::Table::~Table
|
||||||
|
// Purpose : Destructor
|
||||||
|
//=======================================================================
|
||||||
SMESHGUI_FilterTable::Table::~Table()
|
SMESHGUI_FilterTable::Table::~Table()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
// name : SMESHGUI_FilterTable::Table::minimumSizeHint
|
||||||
|
// Purpose : Get minimum size for the table
|
||||||
|
//=======================================================================
|
||||||
|
QSize SMESHGUI_FilterTable::Table::minimumSizeHint() const
|
||||||
|
{
|
||||||
|
QSize s = QTableWidget::minimumSizeHint();
|
||||||
|
QHeaderView* hv = horizontalHeader();
|
||||||
|
if ( hv )
|
||||||
|
s.setWidth( qMax( s.width(), hv->length() ) );
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// name : SMESHGUI_FilterTable::Table::setEditable
|
// name : SMESHGUI_FilterTable::Table::setEditable
|
||||||
// Purpose : Set editable of specified cell
|
// Purpose : Set editable of specified cell
|
||||||
@ -574,10 +597,7 @@ void SMESHGUI_FilterTable::Table::setReadOnly( bool on )
|
|||||||
{
|
{
|
||||||
setEditTriggers( on ?
|
setEditTriggers( on ?
|
||||||
QAbstractItemView::NoEditTriggers :
|
QAbstractItemView::NoEditTriggers :
|
||||||
QAbstractItemView::DoubleClicked |
|
QAbstractItemView::AllEditTriggers );
|
||||||
QAbstractItemView::SelectedClicked |
|
|
||||||
QAbstractItemView::EditKeyPressed |
|
|
||||||
QAbstractItemView::AnyKeyPressed );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SMESHGUI_FilterTable::Table::isReadOnly() const
|
bool SMESHGUI_FilterTable::Table::isReadOnly() const
|
||||||
@ -1627,7 +1647,7 @@ SMESHGUI_FilterTable::Table* SMESHGUI_FilterTable::createTable (QWidget* thePar
|
|||||||
aHeaderLabels.append( tr("BINARY") + " " );
|
aHeaderLabels.append( tr("BINARY") + " " );
|
||||||
aHeaderLabels.append( tr("ID") );
|
aHeaderLabels.append( tr("ID") );
|
||||||
aTable->setHorizontalHeaderLabels( aHeaderLabels );
|
aTable->setHorizontalHeaderLabels( aHeaderLabels );
|
||||||
|
|
||||||
// set geometry of the table
|
// set geometry of the table
|
||||||
for (int i = 0; i <= 4; i++)
|
for (int i = 0; i <= 4; i++)
|
||||||
aTable->resizeColumnToContents(i);
|
aTable->resizeColumnToContents(i);
|
||||||
|
Loading…
Reference in New Issue
Block a user