-// SALOME PatchQt : patch for Qt
-//
-// Copyright (C) 2003 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
-// 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
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
-//
-//
-//
-// File : qsplitterP.cxx
-// Module : SALOME
+/////////////////////////////////////////////////////////////////////////////
+// Module : PatchQt
+// File : qsplitterP.cxx
+// Description : the patch for Qt's QSplitter class (qsplitter.cpp)
+/////////////////////////////////////////////////////////////////////////////
-using namespace std;
/****************************************************************************
** $Id$
**
** not clear to you.
**
**********************************************************************/
+
#include "qsplitterP.h"
#ifndef QT_NO_COMPLEXWIDGETS
#include <qobjectlist.h>
#include <qapplication.h> //sendPostedEvents
+using namespace std;
#define SPLITTER_ICON_WIDTH 10
#define SPLITTER_ICON_HEIGHT 12
left->setCursor( arrowCursor ); right->setCursor( arrowCursor );
unleft->setCursor( arrowCursor ); unright->setCursor( arrowCursor );
-// VSR 21/11/02 -> ================================
- setMinimumSize( 1, 1 );
-// VSR 21/11/02 <- ================================
-
connect(left, SIGNAL(clicked()), this, SLOT(onBeforeCompress()));
connect(right, SIGNAL(clicked()), this, SLOT(onAfterCompress()));
connect(unleft, SIGNAL(clicked()), this, SLOT(onBeforeUnCompress()));
}
} else {
int right = pick( w->geometry().bottomRight() );
-
- int dd = right - pos + 1;
+ int ddd = pick( QSize(contentsRect().width(), contentsRect().height() ) ) - pos;
+ int dd = QMIN(right - pos + 1, ddd);
dd = QMAX( pick(minSize(w)), QMIN(dd, pick(maxSize(w))));
int newRight = pos+dd-1;
setG( w, pos, dd );