Source Code (Use browser search to find items of interest.)

Class Index

kgraph'KGraphPart (./koffice/kgraph/kgraph_part.h:28)

class KGraphPart : public KoDocument {

    Q_OBJECT

public:
    KGraphPart(QObject *parent=0, const char *name=0, bool singleViewMode=false);

    virtual KoView *createView(QWidget *parent=0, const char *name=0);
    virtual KoMainWindow *createShell();

    virtual void paintContent(QPainter &painter, const QRect &rect, bool transparent=false);

    virtual bool initDoc();

    virtual QCString mimeType() const;

    // (TODO) add a virtual CTOR which creates the objects for the
    // ObjectPool from XML (=loading)

protected slots:
    void a_editcut();   // a_ ... Action
};

kgraph'KGraphPart::KGraphPart() (./koffice/kgraph/kgraph_part.cc:32)

KGraphPart::KGraphPart(QObject *parent, const char *name, bool singleViewMode)
    : KoDocument(parent, name, singleViewMode) {

    KStdAction::cut(this, SLOT( a_editcut() ), actionCollection(), "editcut" );
}


kgraph'KGraphPart::initDoc() (./koffice/kgraph/kgraph_part.cc:38)

bool KGraphPart::initDoc() {
    // If nothing is loaded, do initialize here
    return true;
}


kgraph'KGraphPart::mimeType() (./koffice/kgraph/kgraph_part.cc:43)

QCString KGraphPart::mimeType() const {
    return "application/x-kgraph";
}


kgraph'KGraphPart::createView() (./koffice/kgraph/kgraph_part.cc:47)

KoView *KGraphPart::createView(QWidget *parent, const char *name) {

    KGraphView *view = new KGraphView(this, parent, name);
    addView(view);
    return view;
}


kgraph'KGraphPart::createShell() (./koffice/kgraph/kgraph_part.cc:54)

KoMainWindow *KGraphPart::createShell() {

    KoMainWindow *shell = new KGraphShell;
    shell->setRootDocument(this);
    shell->show();
    return shell;
}


kgraph'KGraphPart::paintContent() (./koffice/kgraph/kgraph_part.cc:62)

void KGraphPart::paintContent(QPainter &/*painter*/, const QRect &/*rect*/, bool /*transparent*/) {

    /*    kdDebug(37001) << "KGraphPart::painEvent()" << endl;
    // ####### handle transparency

    // Need to draw only the document rectangle described in the parameter rect.
    int left=rect.left()/20;
    int right=rect.right()/20+1;
    int top=rect.top()/20;
    int bottom=rect.bottom()/20+1;

    for(int x=left; x<right; ++x)
        painter.drawLine(x*20, top*20, x*20, bottom*20);
    for(int y=left; y<right; ++y)
        painter.drawLine(left*20, y*20, right*20, y*20);
    */
}


kgraph'KGraphPart::a_editcut() (./koffice/kgraph/kgraph_part.cc:80)

void KGraphPart::a_editcut() {
    kDebugInfo(31000, "KGraphPart: a_editcut called");
}