📄 mghtml_part.h
字号:
//signals: // Eemitted if the cursor is moved over an URL. // void onURL( const QString &url ); // ????? on mouse move // Emitted when the user clicks the right mouse button on the document. // void popupMenu(const QString &url, const QPoint &point); // On mouse right click //following is added for submitForm void setParsing(bool b);protected: // whether use it?// virtual bool event( QEvent *event ); virtual void khtmlMousePressEvent(int, int, DOM::Node, DOM::DOMString ); // on mouse left button down //virtual void khtmlMouseDoubleClickEvent(int, int, DOM::Node, DOM::DOMString); // on mouse left button double click virtual void khtmlMouseMoveEvent(int, int, DOM::Node, DOM::DOMString); // on mouse move virtual void khtmlMouseReleaseEvent(int, int, DOM::Node, DOM::DOMString); // on mouse left button up// virtual void khtmlDrawContentsEvent( khtml::DrawContentsEvent * ); // on paint // Internal empty reimplementation of KParts::ReadOnlyPart::openFile . virtual bool openFile(); // i do no know what functions it implement. virtual void overURL( const QString &url, const QString &target ); void MGHTMLPart::submitForm( const char *action, const QString &url, const QByteArray &formData, const QString &_target, const QString& contentType, const QString& boundary ); // virtual void submitForm( const char *action, const QString &url, const QByteArray &formData, const QString &target, const QString& contentType = QString::null, const QString& boundary = QString::null ); // we must define the menu first, then implement it.// virtual void popupMenu( const QString &url ); // create a part// virtual KParts::ReadOnlyPart *createPart( QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name,// const QString &mimetype, QString &serviceName, QStringList &serviceTypes,// const QStringList ¶ms); // choose the font size to update the screen.// void updateFontSize( int add );// void setFontBaseInternal( int base, bool absolute ); //private slots:private: // i do not know the goal of this function.// void slotData( KIO::Job*, const QByteArray &data ); // the same as above// void slotRestoreData( const QByteArray &data ); // if get a file finished, invoke this function.// void slotFinished( KIO::Job* ); // if Finished Parsing, invoke this function.// void slotFinishedParsing(); // redirect?// void slotRedirect();// void slotRedirection(KIO::Job*, const KURL&); // if view the source code, use this function.// virtual void slotViewDocumentSource(); // the same as above.// virtual void slotViewFrameSource(); // what is Background? img?// virtual void slotSaveBackground(); // save the html document.// virtual void slotSaveDocument(); // save the frame html file.// virtual void slotSaveFrame(); // i do not know what is security.// virtual void slotSecurity(); // increae or decrease the font size.// void slotIncFontSizes();// void slotDecFontSizes(); // when load image, use this function// void slotLoadImages(); // when update the screen or the content of html file, use it. // void updateActions(); // !!!!! remove it . // when and why remove the part? i do know now.// void slotPartRemoved( KParts::Part *part ); // these functions relate to the frameset functions.// void slotActiveFrameChanged( KParts::Part *part );// void slotChildStarted( KIO::Job *job );// void slotChildCompleted();// void slotChildURLRequest( const KURL &url, const KParts::URLArgs &args ); // when finish any load action, invoke this function.// void slotLoaderRequestDone( const DOM::DOMString &baseURL, khtml::CachedObject *obj ); // check what? i do not know now.// void checkCompleted(); // response for what?// void slotShowDocument( const QString &url, const QString &target ); // autoscroll? MSG_SCROLL?// void slotAutoScroll();private: void startAutoScroll(); void stopAutoScroll(); void clear();#if JAVASCRIPT_ENABLE// bool scheduleScript( const DOM::Node &n, const QString& script); bool scheduleScript( DOM::HTMLElementImpl *nimpl, const QString& script);// QVariant executeScheduledScript(); bool executeScheduledScript();#endif // if frame is a html file. bool requestFrame( khtml::RenderPart *frame, const QString &url, const QString &frameName, const QStringList &args = QStringList() ); // returns a name for a frame without a name. This function returns a sequence of names. // All names in a sequence are different but the sequence is always the same.The sequence is // reset in clear(). MGString requestFrameName(); bool requestObject( khtml::RenderPart *frame, const QString &url, const QString &serviceType, const QStringList &args = QStringList() ); bool requestObject( khtml::ChildFrame *child, const KURL &url); bool processObjectRequest( khtml::ChildFrame *child, const KURL &url );// khtml::ChildFrame *frame( const QObject *obj ); MGHTMLView *recursiveFrameRequest( const KURL &url, QString name, bool callParent = true ); // what is the link security?// bool checkLinkSecurity(KURL linkURL);private: QValueList<FontPair*> m_fontpool; KURL m_url; KURL::List vlinks;public: MGHTMLPartPrivate *d; bool IsNewURL(const KURL url); void setURL(const KURL url); bool m_isMoved;// ============================ Deleted Function ========================================================== <<// private:// << do not implement JS now// KJSProxy *jScript();// >> do not implement JS now// << we ignoe any find behavior.// void emitSelectionChanged();// << we ignoe any find behavior.// << now we do not implement the find function. so ignore them.// virtual void slotFind();// void slotFindDone(); // BCI: make virtual// void slotFindDialogDestroyed();// >> now we do not implement the find function. so ignore them.// << we do not support print function now.// void slotPrintFrame();// >>we do not support print function now.// << we ignoe any find behavior.// void slotSelectAll();// << we ignoe any find behavior.// protected:// << now we will not use BrowserExtension class. // Internal. Called by the @ref BrowserExtension .// void reparseConfiguration();// >> now we will not use BrowserExtension class.// << no use in MiniGUI// virtual void guiActivateEvent( KParts::GUIActivateEvent *event );// >> no use in MiniGUI//public:// << // KParts::BrowserExtension *browserExtension() const;// >> // << we do not implement jvaa applet now. // Enable/disable Java applet support. Note that calling this function will permanently override // the User settings about Java applet support. Not calling this function is the only way to let // the default settings apply.// void enableJava( bool enable ); // Return if Java applet support is enabled/disabled.// bool javaEnabled() const; // Return the java context of the applets. If no applet exists, 0 is returned.// KJavaAppletContext *javaContext(); // Return the java context of the applets. If no context exists yet, a new one is created.// KJavaAppletContext *createJavaContext();// >> we do not implement java apple// << now we do not take care of these functions, so ignore it. // Initiate a text search.// void findTextBegin(); // Find the next occurrance of the expression.// bool findTextNext( const QRegExp &exp, bool forward ); // Find the next occurence of the string.// bool findTextNext( const QString &str, bool forward, bool caseSensitive ); // Get the text the user has marked.// virtual QString selectedText() const; // Retrieve the selected part of the HTML.// DOM::Range selection() const; // Has the user selected anything? Call selectedText() to retrieve the selected text. // return true if there is text selected.// bool hasSelection() const;// void selectAll();// >> now we do not take care of these functions, so ignore it.// << ignore these functions now. // Save the KHTMLPart's complete state (including child frame objects) to the provided QDataStream. // You can use this method to provide history functionality.This is called from the saveState() method // of the browserExtension().// virtual void saveState( QDataStream &stream ); // Restore the @ref KHTMLPart's previously saved state (including child frame objects) from the provided // QDataStream. see saveState(). This is called from the @ref restoreState() method of the browserExtension() .// virtual void restoreState( QDataStream &stream ); // bool restoreURL( const KURL &url );// >> ignore these function now.// << do not implement it now.// void selectionChanged();// Print current HTML page layed out for the printer.(not implemented at the moment)// void print(QPainter *, int pageHeight, int pageWidth);// >> do not implement it now. // before encode the stream, use this function. 16->32// virtual void slotSetEncoding();// >> ============================= Delete Function ==========================================================};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -