HistoryManager::HistoryManager(QupZilla* mainClass, QWidget* parent)
    : QWidget(parent)
    , ui(new Ui::HistoryManager)
    , p_QupZilla(mainClass)
    , m_historyModel(mApp->history())
{
    ui->setupUi(this);
    ui->historyTree->setDefaultItemShowMode(TreeWidget::ItemsCollapsed);
    ui->historyTree->setSelectionMode(QAbstractItemView::ExtendedSelection);
    ui->deleteB->setShortcut(QKeySequence("Del"));

    connect(ui->historyTree, SIGNAL(itemDoubleClicked(QTreeWidgetItem*, int)), this, SLOT(itemDoubleClicked(QTreeWidgetItem*)));
    connect(ui->historyTree, SIGNAL(itemMiddleButtonClicked(QTreeWidgetItem*)), this, SLOT(itemDoubleClicked(QTreeWidgetItem*)));

    connect(ui->deleteB, SIGNAL(clicked()), this, SLOT(deleteItem()));
    connect(ui->clearAll, SIGNAL(clicked()), this, SLOT(clearHistory()));
    connect(ui->historyTree, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(contextMenuRequested(const QPoint &)));

    connect(m_historyModel, SIGNAL(historyEntryAdded(HistoryEntry)), this, SLOT(historyEntryAdded(HistoryEntry)));
    connect(m_historyModel, SIGNAL(historyEntryDeleted(HistoryEntry)), this, SLOT(historyEntryDeleted(HistoryEntry)));
    connect(m_historyModel, SIGNAL(historyEntryEdited(HistoryEntry, HistoryEntry)), this, SLOT(historyEntryEdited(HistoryEntry, HistoryEntry)));
    connect(m_historyModel, SIGNAL(historyClear()), ui->historyTree, SLOT(clear()));

    connect(ui->optimizeDb, SIGNAL(clicked(QPoint)), this, SLOT(optimizeDb()));

    //QTimer::singleShot(0, this, SLOT(refreshTable()));

    ui->historyTree->setFocus();
}
Example #2
0
HistoryManager::HistoryManager(QupZilla* mainClass, QWidget* parent)
    : QWidget(parent)
    , ui(new Ui::HistoryManager)
    , p_QupZilla(mainClass)
{
    ui->setupUi(this);

    connect(ui->historyTree, SIGNAL(openLink(QUrl, HistoryView::OpenBehavior)), this, SLOT(openLink(QUrl, HistoryView::OpenBehavior)));

    connect(ui->deleteB, SIGNAL(clicked()), ui->historyTree, SLOT(removeItems()));
    connect(ui->clearAll, SIGNAL(clicked()), this, SLOT(clearHistory()));
    connect(ui->optimizeDb, SIGNAL(clicked(QPoint)), this, SLOT(optimizeDb()));

    ui->historyTree->setFocus();
}
Example #3
0
RSSManager::RSSManager(QupZilla* mainClass, QWidget* parent)
    : QWidget(parent)
    , ui(new Ui::RSSManager)
    , p_QupZilla(mainClass)
{
    ui->setupUi(this);

    ui->tabWidget->setElideMode(Qt::ElideRight);
    m_networkManager = mApp->networkManager();

    m_reloadButton = new QToolButton(this);
    m_reloadButton->setAutoRaise(true);
    m_reloadButton->setToolTip(tr("Reload"));
    m_reloadButton->setIcon(IconProvider::standardIcon(QStyle::SP_BrowserReload));

    ui->tabWidget->setCornerWidget(m_reloadButton);

    connect(m_reloadButton, SIGNAL(clicked()), this, SLOT(reloadFeeds()));
    connect(ui->add, SIGNAL(clicked()), this, SLOT(addFeed()));
    connect(ui->deletebutton, SIGNAL(clicked()), this, SLOT(deleteFeed()));
    connect(ui->edit, SIGNAL(clicked()), this, SLOT(editFeed()));

    connect(ui->optimizeDb, SIGNAL(clicked(QPoint)), this, SLOT(optimizeDb()));
}
Example #4
0
LRESULT HashingPage::onVerifyDb(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) {
	optimizeDb(true);
	return 0;
}