/*************************************************************************** koctave3view.cpp - description ------------------- begin : Thu Oct 24 19:35:22 IST 2002 copyright : (C) 2002 by Matti email : hei00rhe@syd.kth.se ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ // include files for Qt #include #include #include #include #include // application specific includes #include "koctave3view.h" #include "koctave3.h" /* THIS CLASS CONTAINS THE "MAINVIEW" when the app starts */ Koctave3View::Koctave3View(QWidget *parent, const char *name) : QWidget(parent, name) { setBackgroundMode(PaletteBase); QVBoxLayout* lo= new QVBoxLayout(this); KLibFactory *factory = 0; factory = KLibLoader::self()->factory("libkonsolepart"); if (factory) { part = static_cast(factory->create(this,"libkonsolepart","KParts::ReadWritePart")); if (part) { KGlobal::locale()->insertCatalogue("konsole"); part->widget()->show(); lo->addWidget(part->widget()); connect ( part, SIGNAL(destroyed()), this, SLOT(slotDestroyed()) ); } } } Koctave3View::~Koctave3View() { } Koctave3Doc *Koctave3View::getDocument() const { /* Koctave3App *theApp=(Koctave3App *) parentWidget(); return theApp->getDocument(); */ } void Koctave3View::print(QPrinter *pPrinter) { QPainter printpainter; printpainter.begin(pPrinter); // TODO: add your printing code here printpainter.end(); }