new experimental main browser widget; refs #167
This commit is contained in:
@@ -28,7 +28,8 @@ ALL_SRC = @srcdir@/*.[ch]xx \
|
||||
|
||||
QMAKE_PROJECT = qmake.pro
|
||||
|
||||
QMAKE_TARGET = qbrowserlib-swisswebview qbrowserlib-buttonlineedit
|
||||
QMAKE_TARGET = qbrowserlib-swisswebview qbrowserlib-buttonlineedit \
|
||||
qbrowserlib-swisswebview
|
||||
TARGETS = ${QMAKE_TARGET}
|
||||
QMAKE_MAKEFILE = ${QMAKE_TARGET:%=makefile.qmake.%}
|
||||
|
||||
|
@@ -49,6 +49,12 @@ qbrowserlib-buttonlineedit {
|
||||
TARGET = qbrowserlib-buttonlineedit
|
||||
}
|
||||
|
||||
qbrowserlib-swisswebwidget {
|
||||
SOURCES = webwidgetifc.cxx
|
||||
HEADERS = webwidgetifc.hxx
|
||||
TARGET = qbrowserlib-swisswebwidget
|
||||
}
|
||||
|
||||
CODECFORSRC = UTF-8
|
||||
CODECFORTR = UTF-8
|
||||
|
||||
|
15
src/designer/webwidgetifc.cxx
Normal file
15
src/designer/webwidgetifc.cxx
Normal file
@@ -0,0 +1,15 @@
|
||||
/*! @file
|
||||
|
||||
@id $Id$
|
||||
*/
|
||||
// 1 2 3 4 5 6 7 8
|
||||
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
|
||||
|
||||
#include <webwidgetifc.hxx>
|
||||
|
||||
//! @defgroup designer
|
||||
//! @{
|
||||
|
||||
Q_EXPORT_PLUGIN2(swisswebwidget, SwissWebWidgetIfc);
|
||||
|
||||
//! @}
|
87
src/designer/webwidgetifc.hxx
Normal file
87
src/designer/webwidgetifc.hxx
Normal file
@@ -0,0 +1,87 @@
|
||||
/*! @file
|
||||
|
||||
@id $Id$
|
||||
*/
|
||||
// 1 2 3 4 5 6 7 8
|
||||
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
|
||||
|
||||
#ifndef __SWISSWEBWIDGETWIDGETIFC_HXX
|
||||
#define __SWISSWEBWIDGETWIDGETIFC_HXX
|
||||
|
||||
#include <qbrowserlib/log.hxx>
|
||||
#include <qbrowserlib/swisswebwidget.hxx>
|
||||
#include <QtDesigner>
|
||||
|
||||
//! @defgroup designer
|
||||
//! @{
|
||||
|
||||
//! SwissWebWidget widget for Qt Designer
|
||||
class SwissWebWidgetWidgetIfc: public QObject,
|
||||
public QDesignerCustomWidgetInterface {
|
||||
Q_OBJECT;
|
||||
Q_INTERFACES(QDesignerCustomWidgetInterface);
|
||||
public:
|
||||
bool isContainer() const {
|
||||
TRC;
|
||||
return false;
|
||||
}
|
||||
QIcon icon() const {
|
||||
TRC;
|
||||
return QIcon(":/icons/swisswebwidget.png");
|
||||
}
|
||||
QString domXml() const {
|
||||
TRC;
|
||||
return
|
||||
QString
|
||||
("<ui language=\"c++\" displayname=\"%2\">"
|
||||
" <widget class=\"%1\" name=\"%3\"/>"
|
||||
" <customwidgets>"
|
||||
" <customwidget>"
|
||||
" <class>%1</class>"
|
||||
" </customwidget>"
|
||||
" </customwidgets>"
|
||||
"</ui>")
|
||||
.arg(name())
|
||||
.arg(className())
|
||||
.arg(className().toLower());
|
||||
}
|
||||
QString group() const {
|
||||
TRC;
|
||||
return "Input Widgets";
|
||||
}
|
||||
QString includeFile() const {
|
||||
TRC;
|
||||
return "qbrowserlib/swisswebwidget.hxx";
|
||||
}
|
||||
QString namespaceName() const {
|
||||
TRC;
|
||||
return "qbrowserlib";
|
||||
}
|
||||
QString className() const {
|
||||
TRC;
|
||||
return "SwissWebWidget";
|
||||
}
|
||||
QString name() const {
|
||||
TRC;
|
||||
return QString("%1::%2").arg(namespaceName()).arg(className());
|
||||
}
|
||||
QString toolTip() const {
|
||||
TRC;
|
||||
return "";
|
||||
}
|
||||
QString whatsThis() const {
|
||||
TRC;
|
||||
return "";
|
||||
}
|
||||
QWidget *createWidget(QWidget *parent) {
|
||||
TRC;
|
||||
return new qbrowserlib::SwissWebWidget(parent);
|
||||
}
|
||||
bool isInitialized() {
|
||||
TRC;
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
//! @}
|
||||
#endif
|
27
src/qbrowserlib/swisswebwidget.hxx
Normal file
27
src/qbrowserlib/swisswebwidget.hxx
Normal file
@@ -0,0 +1,27 @@
|
||||
/*! @file
|
||||
|
||||
@id $Id$
|
||||
*/
|
||||
// 1 2 3 4 5 6 7 8
|
||||
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
|
||||
|
||||
//! @addtogroup qbrowserlib
|
||||
//! @{
|
||||
|
||||
namespace {
|
||||
|
||||
//! Window Widget for complete page witghin a webbrowser.
|
||||
/*! Contains a toolbar, a status bar and @refs
|
||||
SwissWebView. Instanciate this and you have a complete
|
||||
browser. To be used inside a QTabBar, as main window or as
|
||||
docking widget. */
|
||||
class SwissWebWidget: public QMainWindow, private Ui::SwissWebWidget {
|
||||
public:
|
||||
SwissWebWidget(QWidget* p=0): QMainWindow(p) {
|
||||
setupUi(this);
|
||||
}
|
||||
protected:
|
||||
};
|
||||
}
|
||||
|
||||
//! @}
|
209
src/qbrowserlib/swisswebwidget.ui
Normal file
209
src/qbrowserlib/swisswebwidget.ui
Normal file
@@ -0,0 +1,209 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>SwissWebWidget</class>
|
||||
<widget class="QWidget" name="SwissWebWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>677</width>
|
||||
<height>555</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_tools">
|
||||
<item>
|
||||
<widget class="QPushButton" name="_home">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>H</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="_back">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>B</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="_forward">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>F</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="_abort">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>X</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="_reload">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>R</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="qbrowserlib::ButtonLineEdit" name="_url">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="_searchMachine">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>gg</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="qbrowserlib::ButtonLineEdit" name="_search">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="qbrowserlib::SwissWebView" name="swisswebview"/>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_stats">
|
||||
<item>
|
||||
<widget class="QLabel" name="_status">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>status</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QProgressBar" name="_progress">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>24</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="_smaller">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>-</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSlider" name="_zoom">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="_larger">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>-</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>QWebView</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>QtWebKit/QWebView</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>qbrowserlib::ButtonLineEdit</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>qbrowserlib/buttonlineedit.hxx</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>qbrowserlib::SwissWebView</class>
|
||||
<extends>QWebView</extends>
|
||||
<header>qbrowserlib/swisswebview.hxx</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
Reference in New Issue
Block a user