예제 #1
0
void MainWindow::createConnections()
{
    connect(pluginAct, SIGNAL(triggered()), this, SLOT(showPluginDialog()));
    connect(bulletListAct, SIGNAL(triggered(bool)), visualEditor, SLOT(insertBulletList(bool)));
    connect(numberedListAct, SIGNAL(triggered(bool)), visualEditor, SLOT(insertNumberedList(bool)));

    connect(secList, SIGNAL(headingTagSelected(HtmlHeadingTagData*)), visualEditor, SLOT(insertHeadingTag(HtmlHeadingTagData*)));
    connect(textBoldAct, SIGNAL(triggered(bool)), visualEditor, SLOT(toggleTextBold(bool)));
    connect(textItalicAct, SIGNAL(triggered(bool)), visualEditor, SLOT(toggleTextItalic(bool)));
    connect(textUnderlineAct, SIGNAL(triggered(bool)), visualEditor, SLOT(toggleTextUnderline(bool)));
    connect(textStrikeoutAct, SIGNAL(triggered(bool)), visualEditor, SLOT(toggleTextStrike(bool)));
    connect(textFontAct, SIGNAL(triggered()), SLOT(showFontDialog()));
    connect(textColorAct, SIGNAL(triggered()), SLOT(showTextColorDialog()));
    connect(textBackgroundColorAct, SIGNAL(triggered()), SLOT(showTextBackgroundColorDialog()));
    connect(alignGroup, SIGNAL(triggered(QAction*)), SLOT(textAlignmentChanged(QAction*)));

    connect(visualEditor, SIGNAL(currentFormatChanged(FormatData)), SLOT(applyFormatToActions(FormatData)));

    connect(visualEditor->document(), SIGNAL(modificationChanged(bool)), savePostAct, SLOT(setEnabled(bool)));
    connect(sourceEditor->document(), SIGNAL(modificationChanged(bool)), savePostAct, SLOT(setEnabled(bool)));
    connect(visualEditor, SIGNAL(undoAvailable(bool)), undoAct, SLOT(setEnabled(bool)));
    connect(sourceEditor, SIGNAL(undoAvailable(bool)), undoAct, SLOT(setEnabled(bool)));
    connect(visualEditor, SIGNAL(redoAvailable(bool)), redoAct, SLOT(setEnabled(bool)));
    connect(sourceEditor, SIGNAL(redoAvailable(bool)), redoAct, SLOT(setEnabled(bool)));
    connect(visualEditor, SIGNAL(copyAvailable(bool)), cutAct, SLOT(setEnabled(bool)));
    connect(sourceEditor, SIGNAL(copyAvailable(bool)), cutAct, SLOT(setEnabled(bool)));
    connect(visualEditor, SIGNAL(copyAvailable(bool)), copyAct, SLOT(setEnabled(bool)));
    connect(sourceEditor, SIGNAL(copyAvailable(bool)), copyAct, SLOT(setEnabled(bool)));
    connect(visualEditor->document(), SIGNAL(modificationChanged(bool)), this, SLOT(setWindowModified(bool)));
    connect(visualEditor, SIGNAL(listExists(bool)), bulletListAct, SLOT(setChecked(bool)));
    connect(visualEditor, SIGNAL(listExists(bool)), numberedListAct, SLOT(setChecked(bool)));
    connect(sourceEditor->document(), SIGNAL(modificationChanged(bool)), this, SLOT(setWindowModified(bool)));
    connect(editorStack, SIGNAL(currentChanged(int)), this, SLOT(editorChanged(int)));
}
예제 #2
0
ServicePluginsDialog::ServicePluginsDialog(QWidget *parent) :
    QDialog(parent),
    m_model(new ServicePluginConfigModel(this)),
    m_view(new QListView(this)),
    m_layout(new QHBoxLayout(this))
{
    setWindowTitle(tr("Services"));
    setMinimumHeight(360);

    m_view->setModel(m_model);
    m_view->setUniformItemSizes(true);
    
    m_layout->addWidget(m_view);

    connect(m_view, SIGNAL(clicked(QModelIndex)), this, SLOT(showPluginDialog(QModelIndex)));
}
예제 #3
0
DecaptchaDialog::DecaptchaDialog(QWidget *parent) :
    QDialog(parent),
    m_model(new DecaptchaPluginConfigModel(this)),
    m_view(new QListView(this)),
    m_layout(new QHBoxLayout(this))
{
    setWindowTitle(tr("Decaptcha"));
    setMinimumHeight(360);

    m_view->setModel(m_model);
    m_view->setUniformItemSizes(true);
    m_view->setContextMenuPolicy(Qt::CustomContextMenu);
    
    m_layout->addWidget(m_view);

    connect(m_view, SIGNAL(clicked(QModelIndex)), this, SLOT(showPluginDialog(QModelIndex)));
    connect(m_view, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showContextMenu(QPoint)));
}