예제 #1
0
TupSymbolEditor::TupSymbolEditor(QWidget *parent) : QMainWindow(parent), k(new Private)
{
    setWindowTitle(tr("Symbol editor"));
    
    k->view = new View;
    k->view->setRenderHints(QPainter::Antialiasing);
    
    k->scene = new QGraphicsScene;
    k->view->setScene(k->scene);
    
    setCentralWidget(k->view);
    
    k->brushTools = new QToolBar(tr("Brushes"));
    addToolBar(Qt::BottomToolBarArea, k->brushTools);
    
    k->selectionTools = new QToolBar(tr("Selection"));
    addToolBar(Qt::BottomToolBarArea, k->selectionTools);
    
    k->fillTools = new QToolBar(tr("Fill"));
    addToolBar(Qt::BottomToolBarArea, k->fillTools);
    
    k->viewTools = new QToolBar(tr("View"));
    addToolBar(Qt::BottomToolBarArea, k->viewTools);
    
    QTimer::singleShot(0, this, SLOT(loadTools()));
}
예제 #2
0
KCToolRegistry::KCToolRegistry()
        : d(new Private)
{
    // Add the built-in cell tool.
    KToolRegistry::instance()->add(new KCCellToolFactory(this, "KCellsCellToolId"));
    // Load the tool plugins.
    loadTools();
}