Results 1 to 20 of 38

Thread: Running flash .swf files in widget?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2007
    Posts
    3
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Running flash .swf files in widget?

    there is api for inclusion of 3rd party plugin inside QtWebKIt. I am giving content of qwebobjectplugin.cpp . In this you can see that /webplugins folder is included where third party plugins library may be placed. but how to include this and use.

    Qt Code:
    1. #include "qwebobjectplugin_p.h"
    2. #include <qwebobjectpluginconnector.h>
    3. #include <qcoreapplication.h>
    4. #include <qfileinfo.h>
    5.  
    6. #ifndef QT_NO_LIBRARY
    7. Q_GLOBAL_STATIC_WITH_ARGS(QWebFactoryLoader, loader,
    8. (QWebObjectPluginFactoryInterface_iid, QCoreApplication::libraryPaths(), QLatin1String("/webplugins")))
    9. #endif
    10.  
    11.  
    12. QWebFactoryLoader::QWebFactoryLoader(const char *iid, const QStringList &paths, const QString &suffix, Qt::CaseSensitivity)
    13. : QFactoryLoader(iid, paths, suffix)
    14. {
    15. QStringList plugins = keys();
    16. foreach(QString k, plugins) {
    17. QWebObjectPlugin *plugin = qobject_cast<QWebObjectPlugin *>(instance(k));
    18. if (!plugin)
    19. continue;
    20. Info info;
    21. info.name = k;
    22. info.description = plugin->descriptionForKey(k);
    23. QStringList mimetypes = plugin->mimetypesForKey(k);
    24. foreach(QString m, mimetypes) {
    25. MimeInfo mime;
    26. mime.type = m;
    27. mime.extensions = plugin->extensionsForMimetype(m);
    28. info.mimes << mime;
    29. }
    30. m_pluginInfo.append(info);
    31. }
    32. }
    33.  
    34. QWebFactoryLoader *QWebFactoryLoader::self()
    35. {
    36. return loader();
    37. }
    38.  
    39.  
    40. QString QWebFactoryLoader::descriptionForName(const QString &key) const
    41. {
    42. foreach(const Info &info, m_pluginInfo) {
    43. if (info.name == key)
    44. return info.description;
    45. }
    46. return QString();
    47. }
    48.  
    49. QStringList QWebFactoryLoader::mimetypesForName(const QString &key) const
    50. {
    51. foreach(const Info &info, m_pluginInfo) {
    52. if (info.name == key) {
    53. QStringList mimetypes;
    54. foreach (const MimeInfo &m, info.mimes)
    55. mimetypes.append(m.type);
    56. return mimetypes;
    57. }
    58. }
    59. return QStringList();
    60. }
    61.  
    62. QString QWebFactoryLoader::mimeTypeForExtension(const QString &extension)
    63. {
    64. foreach(const Info &info, m_pluginInfo) {
    65. foreach (const MimeInfo &m, info.mimes) {
    66. if (m.extensions.contains(extension))
    67. return m.type;
    68. }
    69. }
    70. return QString();
    71. }
    72.  
    73.  
    74. QStringList QWebFactoryLoader::extensions() const
    75. {
    76. QStringList extensions;
    77. foreach(const Info &info, m_pluginInfo) {
    78. foreach (const MimeInfo &m, info.mimes)
    79. extensions << m.extensions;
    80. }
    81. return QStringList();
    82.  
    83. }
    84.  
    85. QString QWebFactoryLoader::nameForMimetype(const QString &mimeType) const
    86. {
    87. foreach(const Info &info, m_pluginInfo) {
    88. foreach (const MimeInfo &m, info.mimes)
    89. if (m.type == mimeType)
    90. return info.name;
    91. }
    92. return QString();
    93. }
    94.  
    95. QObject *QWebFactoryLoader::create(QWebFrame *frame,
    96. const QUrl &url,
    97. const QString &_mimeType,
    98. const QStringList &argumentNames,
    99. const QStringList &argumentValues)
    100. {
    101. QString mimeType = _mimeType;
    102. if (mimeType.isEmpty()) {
    103. QFileInfo fi(url.path());
    104. mimeType = mimeTypeForExtension(fi.suffix());
    105. }
    106. QString name = nameForMimetype(mimeType);
    107. QWebObjectPlugin *plugin = qobject_cast<QWebObjectPlugin *>(instance(name));
    108. if (!plugin)
    109. return 0;
    110. QWebObjectPluginConnector *connector = new QWebObjectPluginConnector(frame);
    111. return plugin->create(connector, url, mimeType, argumentNames, argumentValues);
    112. }
    113.  
    114.  
    115.  
    116. /*! \class QWebObjectPlugin
    117.  
    118.   This class is a plugin for the HTML object tag. It can be used to embed arbitrary content in a web page.
    119. */
    120.  
    121.  
    122. QWebObjectPlugin::QWebObjectPlugin(QObject *parent)
    123. : QObject(parent)
    124. {
    125. }
    126.  
    127. QWebObjectPlugin::~QWebObjectPlugin()
    128. {
    129. }
    130.  
    131. /*!
    132.   \fn QStringList QWebObjectPlugin::keys() const
    133.  
    134.   The keys should be unique names.
    135. */
    136.  
    137. /*!
    138.   A description for \a key.
    139. */
    140. QString QWebObjectPlugin::descriptionForKey(const QString &key) const
    141. {
    142. return QString();
    143. }
    144.  
    145. /*!
    146.   returns the mimetypes that can be handled by \a key.
    147. */
    148. QStringList QWebObjectPlugin::mimetypesForKey(const QString &key) const
    149. {
    150. return QStringList();
    151. }
    152.  
    153.  
    154. /*!
    155.   \fn QStringList QWebObjectPlugin::extensionsForMimetype() const
    156.  
    157.   Should return a list of extensions that are recognised to match the \a mimeType.
    158. */
    159. QStringList QWebObjectPlugin::extensionsForMimetype(const QString &mimeType) const
    160. {
    161. return QStringList();
    162. }
    To copy to clipboard, switch view to plain text mode 
    PANKAJ SHUKLA

  2. #2
    Join Date
    Oct 2007
    Posts
    3
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Running flash .swf files in widget?

    How to resize anything for ex: gnash inside QX11EmbedContainer window? gnash is running flash movie inside QX11EmbedContainer but not resizing it of the same size as of QX11EmbedContainer.
    PANKAJ SHUKLA

  3. #3
    Join Date
    Aug 2007
    Location
    Gorakhpur, India
    Posts
    254
    Thanks
    8
    Thanked 14 Times in 14 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Running flash .swf files in widget?

    Dear Experts!
    Kindly give me a contact address of WebKit developers!
    Specially I want the contact/e-mail address of Jack belongs from London.
    b/z he says that it can be possible when I am searching on google! but the link of file is not exists!
    hoping an earlier response!
    with regards!
    Anurag Shukla
    A man who never makes mistake is the man who never does anything! Theodre Rosvelt!

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Running flash .swf files in widget?

    WebKit is developped by Apple.

  5. #5
    Join Date
    Aug 2007
    Location
    Gorakhpur, India
    Posts
    254
    Thanks
    8
    Thanked 14 Times in 14 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Running flash .swf files in widget?

    Quote Originally Posted by wysota View Post
    WebKit is developped by Apple.
    Dear Sir!
    May you provide the e-mail or contact no. of developers of WebKit.
    with regards!
    Anurag Shukla
    A man who never makes mistake is the man who never does anything! Theodre Rosvelt!

  6. #6
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Running flash .swf files in widget?

    Did you try searching Google for "webkit"?
    J-P Nurmi

  7. #7
    Join Date
    Aug 2007
    Location
    Gorakhpur, India
    Posts
    254
    Thanks
    8
    Thanked 14 Times in 14 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Running flash .swf files in widget?

    Quote Originally Posted by jpn View Post
    Did you try searching Google for "webkit"?
    Dear Sir!
    I am unable to find the individuals who contribute upon this!
    Anurag Shukla
    A man who never makes mistake is the man who never does anything! Theodre Rosvelt!

  8. #8
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Running flash .swf files in widget?

    Go to webkit.org and follow the link called "Keep in Touch".
    J-P Nurmi

  9. #9
    Join Date
    Aug 2007
    Location
    Gorakhpur, India
    Posts
    254
    Thanks
    8
    Thanked 14 Times in 14 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Running flash .swf files in widget?

    Quote Originally Posted by jpn View Post
    Go to webkit.org and follow the link called "Keep in Touch".
    Thanks for it!

    Dear Sir!
    Except gnash & webkit, Can any altrnative is possible to open .swf files in a child widget with resizing feature.
    Anurag Shukla
    A man who never makes mistake is the man who never does anything! Theodre Rosvelt!

  10. #10
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Running flash .swf files in widget?

    So, there is no class in Qt (ver. 4.3.2) that can play flash animation on qwidget?
    Qt 5.3 Opensource & Creator 3.1.2

  11. #11
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Running flash .swf files in widget?

    Quote Originally Posted by MarkoSan View Post
    So, there is no class in Qt (ver. 4.3.2) that can play flash animation on qwidget?
    That's right.
    J-P Nurmi

  12. #12
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Running flash .swf files in widget?

    How sad ...
    Qt 5.3 Opensource & Creator 3.1.2

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.