Enhance url addressbar, toggle hide from action
This commit is contained in:
committed by
wmayer
parent
f827ab776e
commit
893e76fa76
@@ -162,6 +162,7 @@ void UrlWidget::keyPressEvent(QKeyEvent *keyEvt)
|
||||
void UrlWidget::display()
|
||||
{
|
||||
setFixedWidth(m_view->size().width());
|
||||
setText(m_view->url().toString());
|
||||
show();
|
||||
setFocus(Qt::ActiveWindowFocusReason);
|
||||
}
|
||||
@@ -643,6 +644,11 @@ void BrowserView::stop(void)
|
||||
view->stop();
|
||||
}
|
||||
|
||||
QUrl BrowserView::url() const
|
||||
{
|
||||
return view->url();
|
||||
}
|
||||
|
||||
void BrowserView::onLoadStarted()
|
||||
{
|
||||
QProgressBar* bar = Gui::Sequencer::instance()->getProgressBar();
|
||||
@@ -716,7 +722,10 @@ bool BrowserView::onMsg(const char* pMsg,const char** )
|
||||
view->setZoomFactor(factor - 0.2);
|
||||
return true;
|
||||
} else if (strcmp(pMsg,"SetURL")==0){
|
||||
urlWgt->display();
|
||||
if (urlWgt->isVisible())
|
||||
urlWgt->hide();
|
||||
else
|
||||
urlWgt->display();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -93,6 +93,7 @@ public:
|
||||
void load(const QUrl & url);
|
||||
void setHtml(const QString& HtmlCode,const QUrl & BaseUrl);
|
||||
void stop(void);
|
||||
QUrl url() const;
|
||||
|
||||
void OnChange(Base::Subject<const char*> &rCaller,const char* rcReason);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user