A special view class which sends the messages from the application to the editor and embeds it in a window. More...
#include <BrowserView.h>
Public Member Functions | |
BrowserView (QWidget *parent) | |
Constructs a BrowserView which is a child of 'parent', with the name 'name'. More... | |
bool canClose (void) | |
Checking on close state. More... | |
const char * getName (void) const | |
returns the name of the view (important for messages) More... | |
virtual PyObject * getPyObject (void) | |
This method returns the Python wrapper for a C++ object. More... | |
void load (const char *URL) | |
void load (const QUrl &url) | |
void OnChange (Base::Subject< const char * > &rCaller, const char *rcReason) | |
bool onHasMsg (const char *pMsg) const | |
Checks if the action pMsg is available. More... | |
bool onMsg (const char *pMsg, const char **ppReturn) | |
Runs the action specified by pMsg. More... | |
void setHtml (const QString &HtmlCode, const QUrl &BaseUrl) | |
void stop (void) | |
QUrl url () const | |
~BrowserView () | |
Destroys the object and frees any allocated resources. More... | |
![]() | |
virtual void deleteSelf () | |
delete itself More... | |
MDIView (Gui::Document *pcDocument, QWidget *parent, Qt::WindowFlags wflags=0) | |
View constructor Attach the view to the given document. More... | |
virtual void onRelabel (Gui::Document *pDoc) | |
get called when the document is updated More... | |
virtual void viewAll () | |
~MDIView () | |
View destructor Detach the view from the document, if attached. More... | |
virtual void print () | |
Print content of view. More... | |
virtual void printPdf () | |
Print to PDF file. More... | |
virtual void printPreview () | |
Show a preview dialog. More... | |
QSize minimumSizeHint () const | |
virtual void setCurrentViewMode (ViewMode mode) | |
If b is set to FullScreen the MDI view is displayed in full screen mode, if b is set to TopLevel then it is displayed as an own top-level window, otherwise (Normal) as tabbed window. More... | |
ViewMode currentViewMode () const | |
template<typename _T > | |
_T getActiveObject (const char *name, App::DocumentObject **parent=0, std::string *subname=0) const | |
access getter for the active object list More... | |
void setActiveObject (App::DocumentObject *o, const char *n, const char *subname=0) | |
bool hasActiveObject (const char *n) const | |
bool isActiveObject (App::DocumentObject *o, const char *n, const char *subname=0) const | |
virtual bool containsViewProvider (const ViewProvider *) const | |
containsViewProvider Checks if the given view provider is part of this view. The default implementation returns false. More... | |
![]() | |
BaseView (Gui::Document *pcDocument=0) | |
View constructor Attach the view to the given document. More... | |
virtual ~BaseView () | |
View destructor Detach the view from the document, if attached! More... | |
void setDocument (Gui::Document *pcDocument) | |
sets the view to another document (called by Application) More... | |
void onClose (void) | |
is sent from the document in order to close the document More... | |
Gui::Document * getGuiDocument () const | |
returns the document the view is attached to More... | |
App::Document * getAppDocument () const | |
returns the document the view is attached to More... | |
bool isPassive (void) const | |
indicates if the view is in passive mode More... | |
virtual void onUpdate (void) | |
get called when the document is updated More... | |
virtual void onRename (Gui::Document *) | |
get called when the document is renamed (change of its internal name) More... | |
![]() | |
BaseClass () | |
Construction. More... | |
virtual Type getTypeId (void) const | |
bool isDerivedFrom (const Type type) const | |
virtual void setPyObject (PyObject *) | |
virtual ~BaseClass () | |
Destruction. More... | |
![]() | |
ParameterGrp::handle getWindowParameter (void) | |
return the parameter group of this window More... | |
void OnChange (Base::Subject< const char * > &rCaller, const char *sReason) | |
bool setGroupName (const char *name) | |
Sets the group of the window to name. More... | |
WindowParameter (const char *name) | |
virtual ~WindowParameter () | |
Protected Slots | |
bool chckHostAllowed (const QString &host) | |
void onDownloadRequested (const QNetworkRequest &request) | |
void onLinkClicked (const QUrl &url) | |
void onLinkHovered (const QString &link, const QString &title, const QString &textContent) | |
void onLoadFinished (bool) | |
void onLoadProgress (int) | |
void onLoadStarted () | |
void onOpenLinkInExternalBrowser (const QUrl &url) | |
void onOpenLinkInNewWindow (const QUrl &) | |
void onUnsupportedContent (QNetworkReply *reply) | |
void onViewSource (const QUrl &url) | |
![]() | |
virtual void windowStateChanged (MDIView *) | |
This method gets called from the main window this view is attached to whenever the window state of the active view changes. More... | |
Additional Inherited Members | |
![]() | |
enum ViewMode { Child, TopLevel, FullScreen } | |
MDI view mode enum. More... | |
![]() | |
virtual void print (QPrinter *printer) | |
virtual void setOverrideCursor (const QCursor &) | |
virtual void restoreOverrideCursor () | |
![]() | |
void message (const QString &, int) | |
![]() | |
static void * create (void) | |
static Type getClassTypeId (void) | |
static void init (void) | |
![]() | |
static ParameterGrp::handle getDefaultParameter (void) | |
get the parameters More... | |
![]() | |
void closeEvent (QCloseEvent *e) | |
void changeEvent (QEvent *e) | |
![]() | |
static void initSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Type::instantiationMethod method=nullptr) | |
![]() | |
PyObject * pythonObject | |
![]() | |
bool bIsDetached | |
bool bIsPassive | |
Detailed Description
A special view class which sends the messages from the application to the editor and embeds it in a window.
Constructor & Destructor Documentation
◆ BrowserView()
BrowserView::BrowserView | ( | QWidget * | parent | ) |
Constructs a BrowserView which is a child of 'parent', with the name 'name'.
References App::Application::getUserAppDataDir(), onDownloadRequested(), onLinkClicked(), onLinkHovered(), onLoadFinished(), onLoadProgress(), onLoadStarted(), onOpenLinkInExternalBrowser(), onOpenLinkInNewWindow(), onUnsupportedContent(), and onViewSource().
◆ ~BrowserView()
BrowserView::~BrowserView | ( | ) |
Destroys the object and frees any allocated resources.
Member Function Documentation
◆ canClose()
|
virtual |
Checking on close state.
Reimplemented from Gui::MDIView.
◆ chckHostAllowed
|
protectedslot |
◆ getName()
|
virtual |
returns the name of the view (important for messages)
Reimplemented from Gui::BaseView.
◆ getPyObject()
|
virtual |
This method returns the Python wrapper for a C++ object.
It's in the responsibility of the programmer to do the correct reference counting. Basically there are two ways how to implement that: Either always return a new Python object then reference counting is not a matter or return always the same Python object then the reference counter must be incremented by one. However, it's absolutely forbidden to return always the same Python object without incrementing the reference counter.
The default implementation returns 'None'.
Reimplemented from Gui::MDIView.
References Base::BaseClass::init(), and WebGui::BrowserViewPy::init_type().
◆ load() [1/2]
void BrowserView::load | ( | const char * | URL | ) |
References url().
Referenced by WebGui::UrlWidget::keyPressEvent().
◆ load() [2/2]
◆ OnChange()
void BrowserView::OnChange | ( | Base::Subject< const char * > & | rCaller, |
const char * | rcReason | ||
) |
◆ onDownloadRequested
|
protectedslot |
References Gui::Dialog::DownloadManager::download(), and Gui::Dialog::DownloadManager::getInstance().
Referenced by BrowserView().
◆ onHasMsg()
|
virtual |
Checks if the action pMsg is available.
This is for enabling/disabling the corresponding buttons or menu items for this action.
Reimplemented from Gui::MDIView.
◆ onLinkClicked
|
protectedslot |
References Base::Tools::escapeEncodeFilename(), Gui::getMainWindow(), Gui::Command::Gui, and App::Document::PartialRestore.
Referenced by BrowserView().
◆ onLinkHovered
|
protectedslot |
References Gui::getMainWindow(), Gui::MainWindow::showMessage(), and url().
Referenced by BrowserView().
◆ onLoadFinished
|
protectedslot |
References Gui::getMainWindow(), and Gui::MainWindow::showMessage().
Referenced by BrowserView().
◆ onLoadProgress
|
protectedslot |
References Gui::SequencerBar::getProgressBar(), and Gui::SequencerBar::instance().
Referenced by BrowserView().
◆ onLoadStarted
|
protectedslot |
References Gui::getMainWindow(), Gui::SequencerBar::getProgressBar(), Gui::SequencerBar::instance(), and Gui::MainWindow::showMessage().
Referenced by BrowserView().
◆ onMsg()
|
virtual |
Runs the action specified by pMsg.
Reimplemented from Gui::MDIView.
References WebGui::UrlWidget::display(), and stop().
◆ onOpenLinkInExternalBrowser
|
protectedslot |
References url().
Referenced by BrowserView().
◆ onOpenLinkInNewWindow
|
protectedslot |
References Gui::MainWindow::addWindow(), Gui::getMainWindow(), Gui::MainWindow::setActiveWindow(), and url().
Referenced by BrowserView().
◆ onUnsupportedContent
|
protectedslot |
References Gui::Dialog::DownloadManager::download(), and Gui::Dialog::DownloadManager::getInstance().
Referenced by BrowserView().
◆ onViewSource
|
protectedslot |
References Gui::MainWindow::addWindow(), Gui::getMainWindow(), and url().
Referenced by BrowserView().
◆ setHtml()
void BrowserView::setHtml | ( | const QString & | HtmlCode, |
const QUrl & | BaseUrl | ||
) |
References stop().
◆ stop()
◆ url()
QUrl BrowserView::url | ( | ) | const |
Referenced by WebGui::UrlWidget::display(), load(), onLinkHovered(), onOpenLinkInExternalBrowser(), onOpenLinkInNewWindow(), and onViewSource().
The documentation for this class was generated from the following files:
- src/Mod/Web/Gui/BrowserView.h
- src/Mod/Web/Gui/BrowserView.cpp