namespace forgotten; refs #167

master
Marc Wäckerlin 12 years ago
parent 041ed6b783
commit 7264422549
  1. 22
      src/browser.hxx

@ -65,7 +65,7 @@ class Browser: public QMainWindow, protected Ui::Browser {
qbrowserlib::Settings::MimeTypes(),
bool kiosk = false, bool login = true, bool quirks=true,
QString bookmarkfile=QString()):
_url(0), _find(new ButtonLineEdit),
_url(0), _find(new qbrowserlib::ButtonLineEdit),
_kiosk(kiosk),
_downloadManager(new DownloadManager),
_settings(mimeTypes, this, settings, !kiosk),
@ -73,7 +73,7 @@ class Browser: public QMainWindow, protected Ui::Browser {
_proxy("http://swisssign.com", this),
_showErrorLog(0),
_startUrl(urls.size()),
_quirks(quirks), _search(new ButtonLineEdit),
_quirks(quirks), _search(new qbrowserlib::ButtonLineEdit),
_searchEngines(new QComboBox),
_bookmarkfile(bookmarkfile),
_executor(&_settings) {
@ -129,7 +129,7 @@ class Browser: public QMainWindow, protected Ui::Browser {
_toolbar->addWidget(urlFrame);
layout->addWidget(_url);
combo->setInsertPolicy(QComboBox::NoInsert);
combo->setLineEdit(new ButtonLineEdit(combo));
combo->setLineEdit(new qbrowserlib::ButtonLineEdit(combo));
combo->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLength);
sp=combo->sizePolicy();
sp.setHorizontalPolicy(QSizePolicy::Expanding);
@ -142,15 +142,15 @@ class Browser: public QMainWindow, protected Ui::Browser {
assert(connect(combo->lineEdit(), SIGNAL(textChanged(QString)),
SLOT(goodUrl())));
if (_quirks) {
dynamic_cast<ButtonLineEdit*>(combo->lineEdit())->add
dynamic_cast<qbrowserlib::ButtonLineEdit*>(combo->lineEdit())->add
(actionStop);
dynamic_cast<ButtonLineEdit*>(combo->lineEdit())->add
dynamic_cast<qbrowserlib::ButtonLineEdit*>(combo->lineEdit())->add
(actionReload);
}
if (!_quirks) {
dynamic_cast<ButtonLineEdit*>(combo->lineEdit())->add
dynamic_cast<qbrowserlib::ButtonLineEdit*>(combo->lineEdit())->add
(actionAddBookmark);
dynamic_cast<ButtonLineEdit*>(combo->lineEdit())->add
dynamic_cast<qbrowserlib::ButtonLineEdit*>(combo->lineEdit())->add
(actionClearLocation);
}
_editbookmarks =
@ -1455,7 +1455,7 @@ class Browser: public QMainWindow, protected Ui::Browser {
void badUrl() {
if (qobject_cast<QComboBox*>(_url))
dynamic_cast<ButtonLineEdit*>
dynamic_cast<qbrowserlib::ButtonLineEdit*>
(qobject_cast<QComboBox*>(_url)->lineEdit())
->changeStyleSheet(tr("background-color: #F77", "invalid url"));
else
@ -1465,7 +1465,7 @@ class Browser: public QMainWindow, protected Ui::Browser {
void goodUrl() {
if (qobject_cast<QComboBox*>(_url))
dynamic_cast<ButtonLineEdit*>
dynamic_cast<qbrowserlib::ButtonLineEdit*>
(qobject_cast<QComboBox*>(_url)->lineEdit())
->changeStyleSheet(tr("background-color: white", "valid url"));
else
@ -1517,7 +1517,7 @@ class Browser: public QMainWindow, protected Ui::Browser {
private:
QWidget* _url;
ButtonLineEdit* _find;
qbrowserlib::ButtonLineEdit* _find;
QSlider* _zoom;
QProgressBar* _progress;
QString _home;
@ -1533,7 +1533,7 @@ class Browser: public QMainWindow, protected Ui::Browser {
std::auto_ptr<EditBookmarks> _editbookmarks;
bool _startUrl;
bool _quirks;
ButtonLineEdit* _search;
qbrowserlib::ButtonLineEdit* _search;
QComboBox* _searchEngines;
FileStorage _bookmarkfile;
qbrowserlib::Executor _executor;

Loading…
Cancel
Save