Example #1
0
/*!
    Sets the current \a page.

    \sa currentPage(), currentIndex()
*/
void QxtConfigWidget::setCurrentPage(QWidget* page)
{
    qxt_d().setCurrentIndex(qxt_d().stack->indexOf(page));
}
void QxtGlobalShortcut::setEnabled(bool enabled)
{
    qxt_d().enabled = enabled;
}
/*!
    Sets the IO \a device.
 */
void QxtAbstractIOLoggerEngine::setDevice(QIODevice *device)
{
    qxt_d().io_device = device;
}
/*!
    Destructs the QxtGlobalShortcut.
 */
QxtGlobalShortcut::~QxtGlobalShortcut()
{
    if (qxt_d().key != 0)
        qxt_d().unsetShortcut();
}
bool QxtGlobalShortcut::setShortcut(const QKeySequence& shortcut)
{
    if (qxt_d().key != 0)
        qxt_d().unsetShortcut();
    return qxt_d().setShortcut(shortcut);
}
void QxtSslConnectionManager::setPrivateKey(const QSslKey& key)
{
    qxt_d().setPrivateKey(key);
}
QSslKey QxtSslConnectionManager::privateKey() const
{
    return qxt_d().privateKey();
}
Example #8
0
/*!
    Returns the what's this of page at \a index.

    \sa setPageWhatsThis()
*/
QString QxtConfigWidget::pageWhatsThis(int index) const
{
    const QTableWidgetItem* item = qxt_d().item(index);
    return (item ? item->whatsThis() : QString());
}
Example #9
0
/*!
    Returns the internal table widget used for showing page icons.

    \sa stackedWidget()
*/
QTableWidget* QxtConfigWidget::tableWidget() const
{
    return qxt_d().table;
}
Example #10
0
/*!
    Returns the icon of page at \a index.

    \sa setPageIcon()
*/
QIcon QxtConfigWidget::pageIcon(int index) const
{
    const QTableWidgetItem* item = qxt_d().item(index);
    return (item ? item->icon() : QIcon());
}
Example #11
0
/*!
    Returns the tooltip of page at \a index.

    \sa setPageToolTip()
*/
QString QxtConfigWidget::pageToolTip(int index) const
{
    const QTableWidgetItem* item = qxt_d().item(index);
    return (item ? item->toolTip() : QString());
}
Example #12
0
/*!
    Returns \c true if the page at \a index is hidden; otherwise \c false.

    \sa setPageHidden()
*/
bool QxtConfigWidget::isPageHidden(int index) const
{
    if (qxt_d().pos == QxtConfigWidget::North)
        return qxt_d().table->isColumnHidden(index);
    return qxt_d().table->isRowHidden(index);
}
Example #13
0
/*!
    Returns the page at \a index or \c 0 if the \a index is out of range.
*/
QWidget* QxtConfigWidget::page(int index) const
{
    return qxt_d().stack->widget(index);
}
Example #14
0
/*!
    Returns the index of \a page or \c -1 if the page is unknown.
*/
int QxtConfigWidget::indexOf(QWidget* page) const
{
    return qxt_d().stack->indexOf(page);
}
void QxtSslConnectionManager::setLocalCertificate(const QString& path, QSsl::EncodingFormat format)
{
    qxt_d().setLocalCertificate(path, format);
}
Example #16
0
/*!
    Returns the internal stacked widget used for stacking pages.

    \sa tableWidget()
*/
QStackedWidget* QxtConfigWidget::stackedWidget() const
{
    return qxt_d().stack;
}
QSslCertificate QxtSslConnectionManager::localCertificate() const
{
    return qxt_d().localCertificate();
}
Example #18
0
/*!
    This virtual function is called to clean up previous
    page at \a index before switching to a new page.

    \bold {Note:} The default implementation calls SLOT(cleanup()) of
    the corresponding page provided that such slot exists.

    \sa initializePage()
*/
void QxtConfigWidget::cleanupPage(int index)
{
    Q_ASSERT(qxt_d().stack);
    QMetaObject::invokeMethod(qxt_d().stack->widget(index), "cleanup");
}
void QxtSslConnectionManager::setPrivateKey(const QString& path, QSsl::KeyAlgorithm algo, QSsl::EncodingFormat format, const QByteArray& passPhrase)
{
    qxt_d().setPrivateKey(path, algo, format, passPhrase);
}
Example #20
0
/*!
    This virtual function is called to initialize page at
    \a index before switching to it.

    \bold {Note:} The default implementation calls SLOT(initialize()) of
    the corresponding page provided that such slot exists.

    \sa cleanupPage()
*/
void QxtConfigWidget::initializePage(int index)
{
    Q_ASSERT(qxt_d().stack);
    QMetaObject::invokeMethod(qxt_d().stack->widget(index), "initialize");
}
void QxtSslConnectionManager::setAutoEncrypt(bool on)
{
    qxt_d().setAutoEncrypt(on);
}
bool QxtSslConnectionManager::autoEncrypt() const
{
    return qxt_d().autoEncrypt();
}
/*!
    \property QxtGlobalShortcut::shortcut
    \brief the shortcut key sequence

    \bold {Note:} Notice that corresponding key press and release events are not
    delivered for registered global shortcuts even if they are disabled.
    Also, comma separated key sequences are not supported.
    Only the first part is used:

    \code
    qxtShortcut->setShortcut(QKeySequence("Ctrl+Alt+A,Ctrl+Alt+B"));
    Q_ASSERT(qxtShortcut->shortcut() == QKeySequence("Ctrl+Alt+A"));
    \endcode
 */
QKeySequence QxtGlobalShortcut::shortcut() const
{
    return QKeySequence(qxt_d().key | qxt_d().mods);
}
/*!
 * Sets the protocol used when \a autoEncrypt is enabled.
 *
 * \sa protocol
 */
void QxtSslConnectionManager::setProtocol(QSsl::SslProtocol proto)
{
    qxt_d().setProtocol(proto);
}
/*!
    \property QxtGlobalShortcut::enabled
    \brief whether the shortcut is enabled

    A disabled shortcut does not get activated.

    The default value is \c true.

    \sa setDisabled()
 */
bool QxtGlobalShortcut::isEnabled() const
{
    return qxt_d().enabled;
}
/*!
 * Returns the protocol used when \a autoEncrypt is enabled.
 * \sa setProtocol
 */
QSsl::SslProtocol QxtSslConnectionManager::protocol() const
{
    return qxt_d().protocol();
}
/*!
    Sets the shortcut \a disabled.

    \sa enabled
 */
void QxtGlobalShortcut::setDisabled(bool disabled)
{
    qxt_d().enabled = !disabled;
}
void QxtSslConnectionManager::setLocalCertificate(const QSslCertificate& cert)
{
    qxt_d().setLocalCertificate(cert);
}
/*!
    Returns the IO device.
 */
QIODevice *QxtAbstractIOLoggerEngine::device() const
{
    return qxt_d().io_device;
}
Example #30
0
/*!
    Returns the current page.

    \sa currentIndex(), setCurrentPage()
*/
QWidget* QxtConfigWidget::currentPage() const
{
    return qxt_d().stack->currentWidget();
}