KstGfxTLVMouseHandler::KstGfxTLVMouseHandler()
: KstGfxMouseHandler() {
  // initial default settings before any sticky settings
  KstTopLevelViewPtr defaultView = new KstTopLevelView;
  defaultView->setBackgroundColor(KstApp::inst()->paletteBackgroundColor());
  _defaultObject = KstViewObjectPtr(defaultView);
  _currentDefaultObject = KstViewObjectPtr(defaultView);
}
Exemple #2
0
KstGfx2DPlotMouseHandler::KstGfx2DPlotMouseHandler()
: KstGfxMouseHandler() {
  // initial default settings before any sticky settings
  Kst2DPlotPtr default2DPlot;

  default2DPlot = new Kst2DPlot;
  _defaultObject = KstViewObjectPtr(default2DPlot);
  _currentDefaultObject = KstViewObjectPtr(default2DPlot);
}
KstGfxEllipseMouseHandler::KstGfxEllipseMouseHandler()
: KstGfxMouseHandler() {
  // initial default settings before any sticky settings
  KstViewEllipsePtr defaultEllipse = new KstViewEllipse;
  defaultEllipse->setBorderWidth(2);
  defaultEllipse->setBorderColor(Qt::black);
  defaultEllipse->setForegroundColor(Qt::white);
  _defaultObject = KstViewObjectPtr(defaultEllipse);
  _currentDefaultObject = KstViewObjectPtr(defaultEllipse);
}
KstGfxPictureMouseHandler::KstGfxPictureMouseHandler()
: KstGfxMouseHandler() {
  // initial default settings before any sticky settings
  KstViewPicturePtr defaultPicture = new KstViewPicture;
  defaultPicture->setBorderWidth(0);
  defaultPicture->setBorderColor(Qt::black);
  defaultPicture->setRefreshTimer(0);
  defaultPicture->setMaintainAspect(true);
  _defaultObject = KstViewObjectPtr(defaultPicture);
  _currentDefaultObject = KstViewObjectPtr(defaultPicture);
}
Exemple #5
0
KstGfxLineMouseHandler::KstGfxLineMouseHandler()
: KstGfxMouseHandler() {
  // initial default settings before any sticky settings
  KstViewLinePtr defaultLine = new KstViewLine;
  defaultLine->setWidth(2);
  defaultLine->setPenStyle(Qt::SolidLine);
  defaultLine->setForegroundColor(Qt::black);
  _defaultObject = KstViewObjectPtr(defaultLine);
}  
Exemple #6
0
KstGfxTextMouseHandler::KstGfxTextMouseHandler()
: KstGfxMouseHandler() {
  // initial default settings before any sticky settings
  KstViewLabelPtr defaultLabel = new KstViewLabel;
  defaultLabel->setForegroundColor(Qt::black);
  defaultLabel->setBackgroundColor(Qt::white);
  defaultLabel->setTransparent(false);
  defaultLabel->setBorderWidth(2);
  _defaultObject = KstViewObjectPtr(defaultLabel); 
}  
void KstPlotGroup::flatten() {
  assert(_parent);
  for (KstViewObjectList::Iterator i = _children.begin(); i != _children.end(); ++i) {
    (*i)->setSelected(false);
    (*i)->setFocus(false);
    _parent->insertChildAfter(KstViewObjectPtr(this), *i);
  }
  _parent->removeChild(this);
  KstApp::inst()->document()->setModified();
}
Exemple #8
0
KstGfx2DPlotMouseHandler::KstGfx2DPlotMouseHandler()
: KstGfxMouseHandler() {
  // initial default settings before any sticky settings
  Kst2DPlotPtr default2DPlot = new Kst2DPlot;
/*  defaultBox->setBorderWidth(2);
  defaultBox->setBorderColor(Qt::black);
  defaultBox->setForegroundColor(Qt::white);
  defaultBox->setXRound(0);
  defaultBox->setYRound(0);*/
  _defaultObject = KstViewObjectPtr(default2DPlot);
}  
Exemple #9
0
KstGfxRectangleMouseHandler::KstGfxRectangleMouseHandler()
: KstGfxMouseHandler() {
  // initial default settings before any sticky settings
  KstViewBoxPtr defaultBox = new KstViewBox;
  defaultBox->setBorderWidth(2);
  defaultBox->setBorderColor(Qt::black);
  defaultBox->setForegroundColor(Qt::white);
  defaultBox->setXRound(0);
  defaultBox->setYRound(0);
  _defaultObject = KstViewObjectPtr(defaultBox);
}  
Exemple #10
0
KstGfxArrowMouseHandler::KstGfxArrowMouseHandler()
: KstGfxMouseHandler() {
  // initial default settings before any sticky settings
  KstViewArrowPtr defaultArrow = new KstViewArrow;
  defaultArrow->setHasToArrow(true);
  defaultArrow->setHasFromArrow(false);
  defaultArrow->setToArrowScaling(1);
  defaultArrow->setWidth(2);
  defaultArrow->setPenStyle(Qt::SolidLine);
  defaultArrow->setForegroundColor(Qt::black);
  _defaultObject = KstViewObjectPtr(defaultArrow);
}
Exemple #11
0
KstViewObjectPtr create_KstViewLegend() {
  return KstViewObjectPtr(new KstViewLegend());
}
KstViewObjectPtr create_KstViewLabel() {
  return KstViewObjectPtr(new KstViewLabel(QString::null));
}
void KstGfxTLVMouseHandler::applyDefaults(KstTopLevelViewPtr view) {
  copyDefaults(KstViewObjectPtr(view));
}
KstViewObjectPtr create_KstPlotGroup() {
  return KstViewObjectPtr(new KstPlotGroup);
}