Example #1
0
void KDockSplitter::setForcedFixedHeight(KDockWidget *dw,int h)
{
	if (dw==child0)
	{
		if (fixedHeight0==-1) savedXPos=xpos;
		if (h==fixedHeight0) return;
                fixedHeight0=h;
		setSeparatorPos(h*factor/height(),true);
// //		kdDebug(282)<<"Set forced fixed width for widget 0 :"<<h<<endl;
	}
        else
	{
		if (fixedHeight1==-1) savedXPos=xpos;
		if (h==fixedHeight1) return;
                fixedHeight1=h;
		setSeparatorPos((height()-h)*factor/height(),true);
//		kdDebug(282)<<"Set forced fixed height for widget 1 :"<<h<<endl;
	}
	setupMinMaxSize();
    if (divider) divider->hide();
}
Example #2
0
void KDockSplitter::setForcedFixedWidth(KDockWidget *dw,int w)
{
	if (dw==child0)
	{
		if (fixedWidth0==-1) savedXPos=xpos;
		if (w==fixedWidth0) return;
                fixedWidth0=w;
		setSeparatorPos(w*factor/width(),true);
//		kdDebug(282)<<"Set forced fixed width for widget 0 :"<<w<<endl;
	}
        else
	{
		if (fixedWidth1==-1) savedXPos=xpos;
		if (w==fixedWidth1) return;
                fixedWidth1=w;
		setSeparatorPos((width()-w)*factor/width(),true);
//		kdDebug(282)<<"Set forced fixed width for widget 1 :"<<w<<endl;
	}
	setupMinMaxSize();
    if (divider) divider->hide();
}
KDockSplitter::KDockSplitter(QWidget *parent, const char *name, Orientation orient, int pos, bool highResolution)
: QWidget(parent, name)
{
  divider = 0L;
  child0 = 0L;
  child1 = 0L;
  orientation = orient;
  mOpaqueResize = false;
  mKeepSize = false;
  mHighResolution = highResolution;
  setSeparatorPos( pos, false );
  initialised = false;
}
void K3DockSplitter::setSeparatorPosX(int pos, bool do_resize)
{
  savedXPos = pos;
  setSeparatorPos( pos, do_resize );
}