- Replaced the QWebView with a custom widget
- Added support form Back and Forward mouse buttons to webview FossilOrigin-Name: c2c1b42f9604c19f48e4811c4eaf44d63aee60fe
This commit is contained in:
parent
9e4e35a56a
commit
6f8e7a622a
6
fuel.pro
6
fuel.pro
@ -46,7 +46,8 @@ SOURCES += src/main.cpp\
|
|||||||
src/FileTableView.cpp \
|
src/FileTableView.cpp \
|
||||||
src/CloneDialog.cpp \
|
src/CloneDialog.cpp \
|
||||||
src/LoggedProcess.cpp \
|
src/LoggedProcess.cpp \
|
||||||
src/BrowserWidget.cpp
|
src/BrowserWidget.cpp \
|
||||||
|
src/CustomWebView.cpp
|
||||||
|
|
||||||
HEADERS += src/MainWindow.h \
|
HEADERS += src/MainWindow.h \
|
||||||
src/CommitDialog.h \
|
src/CommitDialog.h \
|
||||||
@ -56,7 +57,8 @@ HEADERS += src/MainWindow.h \
|
|||||||
src/FileTableView.h \
|
src/FileTableView.h \
|
||||||
src/CloneDialog.h \
|
src/CloneDialog.h \
|
||||||
src/LoggedProcess.h \
|
src/LoggedProcess.h \
|
||||||
src/BrowserWidget.h
|
src/BrowserWidget.h \
|
||||||
|
src/CustomWebView.h
|
||||||
|
|
||||||
FORMS += ui/MainWindow.ui \
|
FORMS += ui/MainWindow.ui \
|
||||||
ui/CommitDialog.ui \
|
ui/CommitDialog.ui \
|
||||||
|
16
manifest
16
manifest
@ -1,11 +1,11 @@
|
|||||||
C Replaced\sWebView\swith\sa\scustom\sBrowserWidget\nAdded\sbrowser\snavigation\sbuttons\sand\surl\stextbox\n\n\n
|
C -\sReplaced\sthe\sQWebView\swith\sa\scustom\swidget\n-\sAdded\ssupport\sform\sBack\sand\sForward\smouse\sbuttons\sto\swebview\n
|
||||||
D 2012-12-22T16:29:06.140
|
D 2013-01-13T10:36:07.204
|
||||||
F dist/arch/PKGBUILD bf020b73b610f4c14e38feba027fe8f45b4fbc5c
|
F dist/arch/PKGBUILD bf020b73b610f4c14e38feba027fe8f45b4fbc5c
|
||||||
F dist/win/fuel.iss ef3558dbba409eb194938b930377fc9ee27d319e
|
F dist/win/fuel.iss ef3558dbba409eb194938b930377fc9ee27d319e
|
||||||
F doc/Building.txt 7c0f1060d4a08ed330058d4a3a68905c05228381
|
F doc/Building.txt 7c0f1060d4a08ed330058d4a3a68905c05228381
|
||||||
F doc/Changes.txt b4494e409960f22705c8624eaa935e3f195df10b
|
F doc/Changes.txt b4494e409960f22705c8624eaa935e3f195df10b
|
||||||
F doc/License.txt 4cc77b90af91e615a64ae04893fdffa7939db84c
|
F doc/License.txt 4cc77b90af91e615a64ae04893fdffa7939db84c
|
||||||
F fuel.pro 5ca9e8f6817cda42dbdd4f02079bb33e9044db5e
|
F fuel.pro 9924b8c961a342363503827b42404d3e87e24a1a
|
||||||
F intl/convert.bat 7e878e302a8be2324fd51b9eed1aab272dbd8bbd x
|
F intl/convert.bat 7e878e302a8be2324fd51b9eed1aab272dbd8bbd x
|
||||||
F intl/convert.sh 5694496585ff5f4363c90ff8b6f48e19e0b6b4aa x
|
F intl/convert.sh 5694496585ff5f4363c90ff8b6f48e19e0b6b4aa x
|
||||||
F intl/de_DE.ts 6230de8f647218960853b339909cf8c3d09f45ed
|
F intl/de_DE.ts 6230de8f647218960853b339909cf8c3d09f45ed
|
||||||
@ -178,6 +178,8 @@ F src/CloneDialog.cpp 8652480baa3f13f0f0e7df019751338c7cbeb1b5
|
|||||||
F src/CloneDialog.h c97e8c266819292622ca3e84b68e04e81ec05ba3
|
F src/CloneDialog.h c97e8c266819292622ca3e84b68e04e81ec05ba3
|
||||||
F src/CommitDialog.cpp 5300522ac11bc1096a11a6ce22f8c1665d4afc05
|
F src/CommitDialog.cpp 5300522ac11bc1096a11a6ce22f8c1665d4afc05
|
||||||
F src/CommitDialog.h f1ee8db92103164e7db55a8407ccdcff24571b72
|
F src/CommitDialog.h f1ee8db92103164e7db55a8407ccdcff24571b72
|
||||||
|
F src/CustomWebView.cpp b7dd0c41977c2cba005df07ed8967ba6f58d07d9
|
||||||
|
F src/CustomWebView.h fbc8ee55812d1acb3c3b2bc31be7533e8a112822
|
||||||
F src/FileActionDialog.cpp fcaebf9986f789b3440d5390b3458ad5f86fe0c8
|
F src/FileActionDialog.cpp fcaebf9986f789b3440d5390b3458ad5f86fe0c8
|
||||||
F src/FileActionDialog.h 15db1650b3a13d70bc338371e4c033c66e3b79ce
|
F src/FileActionDialog.h 15db1650b3a13d70bc338371e4c033c66e3b79ce
|
||||||
F src/FileTableView.cpp 5ddf8c391c9a3ac449ec61fb1db837b577afeec2
|
F src/FileTableView.cpp 5ddf8c391c9a3ac449ec61fb1db837b577afeec2
|
||||||
@ -192,13 +194,13 @@ F src/Utils.cpp caca5268e3194abe77211040bf9511a82909d2e6
|
|||||||
F src/Utils.h 5af911147390879176e587fc60fb662490bb9e97
|
F src/Utils.h 5af911147390879176e587fc60fb662490bb9e97
|
||||||
F src/main.cpp 8f8790822f82870a12169bcf204e571138adb065
|
F src/main.cpp 8f8790822f82870a12169bcf204e571138adb065
|
||||||
F tools/pack.sh d7f38a498c4e9327fecd6a6e5ac27be270d43008 x
|
F tools/pack.sh d7f38a498c4e9327fecd6a6e5ac27be270d43008 x
|
||||||
F ui/BrowserWidget.ui e0f4fa810d1989b77e503d37ccb6b01e1c9b4129
|
F ui/BrowserWidget.ui 76d1d497c842f4b8d83149df9c144cde2f7ae3aa
|
||||||
F ui/CloneDialog.ui 0fc820804df91f16506ee466a44519fdd44e468f
|
F ui/CloneDialog.ui 0fc820804df91f16506ee466a44519fdd44e468f
|
||||||
F ui/CommitDialog.ui 6200f6cabdcf40a20812e811be28e0793f82516f
|
F ui/CommitDialog.ui 6200f6cabdcf40a20812e811be28e0793f82516f
|
||||||
F ui/FileActionDialog.ui 89bb4dc2d0b8adcd41adcb11ec65f2028a09a12d
|
F ui/FileActionDialog.ui 89bb4dc2d0b8adcd41adcb11ec65f2028a09a12d
|
||||||
F ui/MainWindow.ui 624844304042b74c462df27793a433183049f43f
|
F ui/MainWindow.ui 624844304042b74c462df27793a433183049f43f
|
||||||
F ui/SettingsDialog.ui 55aefad7145c40d936c43759789d1b50e361b020
|
F ui/SettingsDialog.ui 55aefad7145c40d936c43759789d1b50e361b020
|
||||||
P 8bcd65e5fa2194a7edb5ddf56e5c9caddd7316cf
|
P 4914092dd81da4678e5aa76e8c8a15bc7cb1e146
|
||||||
R 9ab6b655f11070587a547e7ffdee40a0
|
R 6e79369ab4ba4e452578109856e7a09e
|
||||||
U kostas
|
U kostas
|
||||||
Z 9493aba2c684dca13ce6b9bb52bb4ebd
|
Z 6275ed8dd52eed9456fd7db503e12414
|
||||||
|
@ -1 +1 @@
|
|||||||
4914092dd81da4678e5aa76e8c8a15bc7cb1e146
|
c2c1b42f9604c19f48e4811c4eaf44d63aee60fe
|
19
src/CustomWebView.cpp
Normal file
19
src/CustomWebView.cpp
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#include "CustomWebView.h"
|
||||||
|
#include <QMouseEvent>
|
||||||
|
|
||||||
|
CustomWebView::CustomWebView(QWidget *parent) :
|
||||||
|
QWebView(parent)
|
||||||
|
{
|
||||||
|
setUrl(QUrl("about:blank"));
|
||||||
|
}
|
||||||
|
|
||||||
|
void CustomWebView::mousePressEvent(QMouseEvent *event)
|
||||||
|
{
|
||||||
|
Qt::MouseButton but = event->button();
|
||||||
|
if(but == Qt::XButton1)
|
||||||
|
back();
|
||||||
|
else if(but == Qt::XButton2)
|
||||||
|
forward();
|
||||||
|
else
|
||||||
|
QWebView::mousePressEvent(event);
|
||||||
|
}
|
21
src/CustomWebView.h
Normal file
21
src/CustomWebView.h
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#ifndef CUSTOMWEBVIEW_H
|
||||||
|
#define CUSTOMWEBVIEW_H
|
||||||
|
|
||||||
|
#include <QWebView>
|
||||||
|
|
||||||
|
class CustomWebView : public QWebView
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit CustomWebView(QWidget *parent = 0);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void mousePressEvent(QMouseEvent *event);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // CUSTOMWEBVIEW_H
|
@ -4,10 +4,10 @@
|
|||||||
<widget class="QWidget" name="BrowserWidget">
|
<widget class="QWidget" name="BrowserWidget">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>400</width>
|
<width>400</width>
|
||||||
<height>300</height>
|
<height>300</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -15,92 +15,87 @@
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="margin">
|
<property name="margin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolBar" name="toolBar">
|
<widget class="QToolBar" name="toolBar">
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
<width>24</width>
|
<width>24</width>
|
||||||
<height>24</height>
|
<height>24</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<addaction name="actionBrowserBack"/>
|
<addaction name="actionBrowserBack"/>
|
||||||
<addaction name="actionBrowserForward"/>
|
<addaction name="actionBrowserForward"/>
|
||||||
<addaction name="actionBrowserRefresh"/>
|
<addaction name="actionBrowserRefresh"/>
|
||||||
<addaction name="actionBrowserStop"/>
|
<addaction name="actionBrowserStop"/>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="txtUrl"/>
|
<widget class="QLineEdit" name="txtUrl"/>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QWebView" name="webView">
|
<widget class="CustomWebView" name="webView" native="true"/>
|
||||||
<property name="url">
|
|
||||||
<url>
|
|
||||||
<string>about:blank</string>
|
|
||||||
</url>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
<action name="actionBrowserBack">
|
<action name="actionBrowserBack">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../rsrc/resources.qrc">
|
<iconset resource="../rsrc/resources.qrc">
|
||||||
<normaloff>:/icons/icons/Button Previous-01.png</normaloff>:/icons/icons/Button Previous-01.png</iconset>
|
<normaloff>:/icons/icons/Button Previous-01.png</normaloff>:/icons/icons/Button Previous-01.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Back</string>
|
<string>Back</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Back</string>
|
<string>Back</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionBrowserForward">
|
<action name="actionBrowserForward">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../rsrc/resources.qrc">
|
<iconset resource="../rsrc/resources.qrc">
|
||||||
<normaloff>:/icons/icons/Button Next-01.png</normaloff>:/icons/icons/Button Next-01.png</iconset>
|
<normaloff>:/icons/icons/Button Next-01.png</normaloff>:/icons/icons/Button Next-01.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Forward</string>
|
<string>Forward</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Forward</string>
|
<string>Forward</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionBrowserRefresh">
|
<action name="actionBrowserRefresh">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../rsrc/resources.qrc">
|
<iconset resource="../rsrc/resources.qrc">
|
||||||
<normaloff>:/icons/icons/Button Refresh-01.png</normaloff>:/icons/icons/Button Refresh-01.png</iconset>
|
<normaloff>:/icons/icons/Button Refresh-01.png</normaloff>:/icons/icons/Button Refresh-01.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Refresh</string>
|
<string>Refresh</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Refresh</string>
|
<string>Refresh</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionBrowserStop">
|
<action name="actionBrowserStop">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../rsrc/resources.qrc">
|
<iconset resource="../rsrc/resources.qrc">
|
||||||
<normaloff>:/icons/icons/Button Close-01.png</normaloff>:/icons/icons/Button Close-01.png</iconset>
|
<normaloff>:/icons/icons/Button Close-01.png</normaloff>:/icons/icons/Button Close-01.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>browserStop</string>
|
<string>browserStop</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>QWebView</class>
|
<class>CustomWebView</class>
|
||||||
<extends>QWidget</extends>
|
<extends>QWidget</extends>
|
||||||
<header>QtWebKit/QWebView</header>
|
<header>CustomWebView.h</header>
|
||||||
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user