示例#1
0
SettingsDialog::SettingsDialog(QWidget *parent)
    : QDialog(parent)
#if QT_VERSION >= 0x040500
    , m_cacheEnabled(false)
#endif
{
    setupUi(this);
    connect(exceptionsButton, SIGNAL(clicked()), this, SLOT(showExceptions()));
    connect(setHomeToCurrentPageButton, SIGNAL(clicked()), this, SLOT(setHomeToCurrentPage()));
    connect(cookiesButton, SIGNAL(clicked()), this, SLOT(showCookies()));
    connect(standardFontButton, SIGNAL(clicked()), this, SLOT(chooseFont()));
    connect(fixedFontButton, SIGNAL(clicked()), this, SLOT(chooseFixedFont()));
    connect(languageButton, SIGNAL(clicked()), this, SLOT(chooseAcceptLanguage()));

#if QT_VERSION < 0x040500
    oneCloseButton->setVisible(false); // no other mode than one close button with qt <4.5
    networkCache->setVisible(false);
#else
    // As network cache has too many bugs in 4.5.1, do not allow to enable it.
    if (QLatin1String(qVersion()) == QLatin1String("4.5.1"))
        networkCache->setVisible(false);
#endif
    loadDefaults();
    loadFromSettings();
}
示例#2
0
SettingsDialog::SettingsDialog(QWidget *parent)
    : QDialog(parent)
{
    setupUi(this);
    connect(exceptionsButton, SIGNAL(clicked()), this, SLOT(showExceptions()));
    connect(setHomeToCurrentPageButton, SIGNAL(clicked()), this, SLOT(setHomeToCurrentPage()));
    connect(restoreToDefaultButton, SIGNAL(clicked()), this, SLOT(restoreHomeToDefault()));
    connect(cookiesButton, SIGNAL(clicked()), this, SLOT(showCookies()));
    connect(standardFontButton, SIGNAL(clicked()), this, SLOT(chooseFont()));
    connect(fixedFontButton, SIGNAL(clicked()), this, SLOT(chooseFixedFont()));
	connect(comboBoxStyle, SIGNAL(currentIndexChanged(int)), this,   SLOT(setAppStyle(int)));
    connect(showPasswordsButton, SIGNAL(clicked()), this, SLOT(showPasswords()));
    connect(chkUserAgent, SIGNAL(stateChanged ( int ) ), this, SLOT(useUserAgent(int)));
    connect(buttonSearchProviders, SIGNAL(clicked() ), this, SLOT( showSearchProviders() ) );
    connect(buttonEditShortcuts, SIGNAL(clicked() ), this, SLOT( editShortcuts() ) );
    connect(btnExtView, SIGNAL(clicked() ), this, SLOT( chooseExtViewer() ) );
    connect(btnStylePath, SIGNAL(clicked() ), this, SLOT( chooseStylePath() ) );

    connect(proxyAuto, SIGNAL(stateChanged ( int ) ), this, SLOT(setAutoProxy(int)));
    connect(proxySupport, SIGNAL(toggled( bool ) ), this, SLOT(setProxyEnabled(bool)));

	connect(btnAddAd, SIGNAL(clicked() ), this, SLOT( addBlockAd() ) );
	connect(btnEditAd, SIGNAL(clicked() ), this, SLOT( editBlockAd() ) );
	connect(btnDelAd, SIGNAL(clicked() ), this, SLOT( removeBlockAd() ) );
	connect(btnDelAds, SIGNAL(clicked() ), this, SLOT( removeBlockAds() ) );

	connect(btnBlockMostAds, SIGNAL(clicked() ), this, SLOT( blockMostAds() ) );
	connect(btnBlockMostCnts, SIGNAL(clicked() ), this, SLOT( blockMostCnts() ) );

	connect(btnAddAdEx, SIGNAL(clicked() ), this, SLOT( addBlockAdEx() ) );
	connect(btnEditAdEx, SIGNAL(clicked() ), this, SLOT( editBlockAdEx() ) );
	connect(btnDelAdEx, SIGNAL(clicked() ), this, SLOT( removeBlockAdEx() ) );

    loadDefaults();
    loadFromSettings();
	
	fontChanged = false;
	connect(tbGoBack, SIGNAL(clicked()), this, SLOT( checkAddressBarButtons() ));
	connect(tbGoForward, SIGNAL(clicked()), this, SLOT( checkAddressBarButtons() ));
	connect(tbAddBook, SIGNAL(clicked()), this, SLOT( checkAddressBarButtons() ));
	connect(tbHome, SIGNAL(clicked()), this, SLOT( checkAddressBarButtons() ));
	connect(tbRefresh, SIGNAL(clicked()), this, SLOT( checkAddressBarButtons() ));
	connect(tbAppStyle, SIGNAL(clicked()), this, SLOT( checkAddressBarButtons() ));
	connect(tbPrivMode, SIGNAL(clicked()), this, SLOT( checkAddressBarButtons() ));
	connect(tbPrefs, SIGNAL(clicked()), this, SLOT( checkAddressBarButtons() ));
	connect(tbImages, SIGNAL(clicked()), this, SLOT( checkAddressBarButtons() ));
	connect(tbProxy, SIGNAL(clicked()), this, SLOT( checkAddressBarButtons() ));
	connect(tbCompatibility, SIGNAL(clicked()), this, SLOT( checkAddressBarButtons() ));
	connect(tbReset, SIGNAL(clicked()), this, SLOT( checkAddressBarButtons() ));
	connect(tbInspect, SIGNAL(clicked()), this, SLOT( checkAddressBarButtons() ));
	connect(tbBookmarks, SIGNAL(clicked()), this, SLOT( checkAddressBarButtons() ));
	connect(tbTextSize, SIGNAL(clicked()), this, SLOT( checkAddressBarButtons() ));
	connect(tbVirtKeyb, SIGNAL(clicked()), this, SLOT( checkAddressBarButtons() ));
}
示例#3
0
SettingsDialog::SettingsDialog(QWidget *parent)
    : QDialog(parent)
{
    setupUi(this);
    connect(exceptionsButton, SIGNAL(clicked()), this, SLOT(showExceptions()));
    connect(setHomeToCurrentPageButton, SIGNAL(clicked()), this, SLOT(setHomeToCurrentPage()));
    connect(cookiesButton, SIGNAL(clicked()), this, SLOT(showCookies()));
    connect(standardFontButton, SIGNAL(clicked()), this, SLOT(chooseFont()));
    connect(fixedFontButton, SIGNAL(clicked()), this, SLOT(chooseFixedFont()));

    loadDefaults();
    loadFromSettings();
}
示例#4
0
SettingsDialog::SettingsDialog(QWidget *parent)
    : QDialog(parent)
{
    setupUi(this);
    connect(exceptionsButton, SIGNAL(clicked()), this, SLOT(showExceptions()));
    connect(setHomeToCurrentPageButton, SIGNAL(clicked()), this, SLOT(setHomeToCurrentPage()));
    connect(cookiesButton, SIGNAL(clicked()), this, SLOT(showCookies()));
    connect(standardFontButton, SIGNAL(clicked()), this, SLOT(chooseFont()));
    connect(fixedFontButton, SIGNAL(clicked()), this, SLOT(chooseFixedFont()));
    connect(languageButton, SIGNAL(clicked()), this, SLOT(chooseAcceptLanguage()));

#if QT_VERSION < 0x040500
    oneCloseButton->setVisible(false); // no other mode than one close button with qt <4.5
#endif
    loadDefaults();
    loadFromSettings();
}
示例#5
0
SettingsDialog::SettingsDialog(QWidget *parent)
    : QDialog(parent)
    , m_cacheEnabled(false)
{
    setupUi(this);
    connect(exceptionsButton, SIGNAL(clicked()), this, SLOT(showExceptions()));
    connect(setHomeToCurrentPageButton, SIGNAL(clicked()), this, SLOT(setHomeToCurrentPage()));
    connect(cookiesButton, SIGNAL(clicked()), this, SLOT(showCookies()));
    connect(standardFontButton, SIGNAL(clicked()), this, SLOT(chooseFont()));
    connect(fixedFontButton, SIGNAL(clicked()), this, SLOT(chooseFixedFont()));
    connect(languageButton, SIGNAL(clicked()), this, SLOT(chooseAcceptLanguage()));
    connect(downloadDirectoryButton, SIGNAL(clicked()), this, SLOT(chooseDownloadDirectory()));

    // As network cache has too many bugs in 4.5.1, do not allow to enable it.
    if (QLatin1String(qVersion()) == QLatin1String("4.5.1"))
        networkCache->setVisible(false);

    loadDefaults();
    loadFromSettings();
}