mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
src/tools folder
This commit is contained in:
parent
800255a7e4
commit
22aca9c81c
1
bin/.gitignore
vendored
Normal file
1
bin/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
qupzilla
|
1
bin/plugins/.gitignore
vendored
Normal file
1
bin/plugins/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
libExamplePlugin.so
|
|
@ -83,7 +83,9 @@ SOURCES += main.cpp\
|
||||||
3rdparty/ecwin7.cpp \
|
3rdparty/ecwin7.cpp \
|
||||||
webview/webtab.cpp \
|
webview/webtab.cpp \
|
||||||
rss/rsswidget.cpp \
|
rss/rsswidget.cpp \
|
||||||
autofill/autofillnotification.cpp
|
autofill/autofillnotification.cpp \
|
||||||
|
rss/rssnotification.cpp \
|
||||||
|
tools/notification.cpp
|
||||||
|
|
||||||
HEADERS += 3rdparty/squeezelabel.h \
|
HEADERS += 3rdparty/squeezelabel.h \
|
||||||
3rdparty/qtwin.h \
|
3rdparty/qtwin.h \
|
||||||
|
@ -136,7 +138,9 @@ HEADERS += 3rdparty/squeezelabel.h \
|
||||||
3rdparty/ecwin7.h \
|
3rdparty/ecwin7.h \
|
||||||
webview/webtab.h \
|
webview/webtab.h \
|
||||||
rss/rsswidget.h \
|
rss/rsswidget.h \
|
||||||
autofill/autofillnotification.h
|
autofill/autofillnotification.h \
|
||||||
|
rss/rssnotification.h \
|
||||||
|
tools/notification.h
|
||||||
|
|
||||||
FORMS += \
|
FORMS += \
|
||||||
preferences/autofillmanager.ui \
|
preferences/autofillmanager.ui \
|
||||||
|
@ -154,7 +158,8 @@ FORMS += \
|
||||||
downloads/downloaditem.ui \
|
downloads/downloaditem.ui \
|
||||||
downloads/downloadmanager.ui \
|
downloads/downloadmanager.ui \
|
||||||
rss/rsswidget.ui \
|
rss/rsswidget.ui \
|
||||||
autofill/autofillnotification.ui
|
autofill/autofillnotification.ui \
|
||||||
|
rss/rssnotification.ui
|
||||||
|
|
||||||
RESOURCES += \
|
RESOURCES += \
|
||||||
data/icons.qrc \
|
data/icons.qrc \
|
||||||
|
|
|
@ -26,13 +26,14 @@ AutoFillNotification::AutoFillNotification(QUrl url, QByteArray data, QString pa
|
||||||
connect(ui->notnow, SIGNAL(clicked()), this, SLOT(hide()));
|
connect(ui->notnow, SIGNAL(clicked()), this, SLOT(hide()));
|
||||||
connect(ui->closeButton, SIGNAL(clicked()), this, SLOT(hide()));
|
connect(ui->closeButton, SIGNAL(clicked()), this, SLOT(hide()));
|
||||||
|
|
||||||
|
qDebug() << this->sizeHint().height();
|
||||||
setMinimumHeight(1);
|
setMinimumHeight(1);
|
||||||
setMaximumHeight(1);
|
setMaximumHeight(1);
|
||||||
|
|
||||||
m_animation = new QTimeLine(300, this);
|
m_animation = new QTimeLine(300, this);
|
||||||
m_animation->setFrameRange(0, 35);
|
m_animation->setFrameRange(0, 35);
|
||||||
connect(m_animation, SIGNAL(frameChanged(int)),this, SLOT(frameChanged(int)));
|
connect(m_animation, SIGNAL(frameChanged(int)),this, SLOT(frameChanged(int)));
|
||||||
QTimer::singleShot(300, m_animation, SLOT(start()));
|
QTimer::singleShot(1, m_animation, SLOT(start()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void AutoFillNotification::hide()
|
void AutoFillNotification::hide()
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
#include <QTimeLine>
|
#include <QTimeLine>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class AutoFillWidget;
|
class AutoFillWidget;
|
||||||
|
|
BIN
src/data/icons/other/bigrss.png
Normal file
BIN
src/data/icons/other/bigrss.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
|
@ -150,7 +150,7 @@ void LocationBar::rssIconClicked()
|
||||||
{
|
{
|
||||||
QList<QPair<QString,QString> > _rss = p_QupZilla->weView()->getRss();
|
QList<QPair<QString,QString> > _rss = p_QupZilla->weView()->getRss();
|
||||||
|
|
||||||
RSSWidget* rss = new RSSWidget(_rss, this);
|
RSSWidget* rss = new RSSWidget(p_QupZilla->weView(), _rss, this);
|
||||||
rss->showAt(this);
|
rss->showAt(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -305,38 +305,6 @@ void LocationBar::keyPressEvent(QKeyEvent *event)
|
||||||
QLineEdit::keyPressEvent(event);
|
QLineEdit::keyPressEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LocationBar::addRss()
|
|
||||||
{
|
|
||||||
WebView* view = p_QupZilla->weView();
|
|
||||||
if(!view)
|
|
||||||
return;
|
|
||||||
if (QAction *action = qobject_cast<QAction*>(sender())) {
|
|
||||||
QUrl url = action->data().toUrl();
|
|
||||||
QString urlString = url.toString();
|
|
||||||
if(url.host().isEmpty()) {
|
|
||||||
if(!urlString.startsWith("/"))
|
|
||||||
urlString="/"+urlString;
|
|
||||||
urlString = view->url().host()+urlString;
|
|
||||||
QUrl temp(urlString);
|
|
||||||
if(temp.scheme().isEmpty())
|
|
||||||
urlString="http://"+urlString;
|
|
||||||
temp = QUrl(urlString);
|
|
||||||
if(temp.scheme().isEmpty() || temp.host().isEmpty())
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!url.isValid())
|
|
||||||
return;
|
|
||||||
|
|
||||||
QString title;
|
|
||||||
if (action->toolTip().isEmpty())
|
|
||||||
title = view->url().host();
|
|
||||||
else
|
|
||||||
title = action->toolTip();
|
|
||||||
|
|
||||||
p_QupZilla->getMainApp()->rssManager()->addRssFeed(urlString, title);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
LocationBar::~LocationBar()
|
LocationBar::~LocationBar()
|
||||||
{
|
{
|
||||||
delete m_bookmarkButton;
|
delete m_bookmarkButton;
|
||||||
|
|
|
@ -41,7 +41,6 @@ public slots:
|
||||||
private slots:
|
private slots:
|
||||||
void siteIconChanged();
|
void siteIconChanged();
|
||||||
void setPrivacy(bool state);
|
void setPrivacy(bool state);
|
||||||
void addRss();
|
|
||||||
void textEdit();
|
void textEdit();
|
||||||
void showPopup();
|
void showPopup();
|
||||||
void bookmarkIconClicked();
|
void bookmarkIconClicked();
|
||||||
|
|
|
@ -291,11 +291,10 @@ bool RSSManager::addRssFeed(const QString &address, const QString &title)
|
||||||
query.bindValue(0, address);
|
query.bindValue(0, address);
|
||||||
query.bindValue(1, title);
|
query.bindValue(1, title);
|
||||||
query.exec();
|
query.exec();
|
||||||
QMessageBox::information(getQupZilla(), tr("RSS feed added"), tr("RSS with title '%1' has been successfuly added.").arg(title));
|
|
||||||
return true;
|
return true;
|
||||||
} else {
|
|
||||||
QMessageBox::warning(getQupZilla(), tr("RSS feed duplicated"), tr("You already have this feed."));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QMessageBox::warning(getQupZilla(), tr("RSS feed duplicated"), tr("You already have this feed."));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
51
src/rss/rssnotification.cpp
Normal file
51
src/rss/rssnotification.cpp
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
#include "rssnotification.h"
|
||||||
|
#include "ui_rssnotification.h"
|
||||||
|
#include "mainapplication.h"
|
||||||
|
#include "qupzilla.h"
|
||||||
|
|
||||||
|
RSSNotification::RSSNotification(QString host, QWidget *parent) :
|
||||||
|
QWidget(parent),
|
||||||
|
ui(new Ui::RSSNotification)
|
||||||
|
{
|
||||||
|
setAttribute(Qt::WA_DeleteOnClose);
|
||||||
|
ui->setupUi(this);
|
||||||
|
setMinimumHeight(1);
|
||||||
|
setMaximumHeight(1);
|
||||||
|
ui->closeButton->setIcon(
|
||||||
|
#ifdef Q_WS_X11
|
||||||
|
style()->standardIcon(QStyle::SP_DialogCloseButton)
|
||||||
|
#else
|
||||||
|
QIcon(":/icons/faenza/close.png")
|
||||||
|
#endif
|
||||||
|
);
|
||||||
|
ui->label->setText(tr("You have successfuly added RSS feed \"%1\".").arg(host));
|
||||||
|
|
||||||
|
connect(ui->pushButton, SIGNAL(clicked()), MainApplication::getInstance()->getWindow(), SLOT(showRSSManager()));
|
||||||
|
connect(ui->pushButton, SIGNAL(clicked()), this, SLOT(hide()));
|
||||||
|
connect(ui->closeButton, SIGNAL(clicked()), this, SLOT(hide()));
|
||||||
|
|
||||||
|
m_animation = new QTimeLine(300, this);
|
||||||
|
m_animation->setFrameRange(0, 35);
|
||||||
|
connect(m_animation, SIGNAL(frameChanged(int)),this, SLOT(frameChanged(int)));
|
||||||
|
QTimer::singleShot(1, m_animation, SLOT(start()));
|
||||||
|
}
|
||||||
|
|
||||||
|
void RSSNotification::hide()
|
||||||
|
{
|
||||||
|
m_animation->setDirection(QTimeLine::Backward);
|
||||||
|
|
||||||
|
m_animation->stop();
|
||||||
|
m_animation->start();
|
||||||
|
connect(m_animation, SIGNAL(finished()), this, SLOT(close()));
|
||||||
|
}
|
||||||
|
|
||||||
|
void RSSNotification::frameChanged(int frame)
|
||||||
|
{
|
||||||
|
setMinimumHeight(frame);
|
||||||
|
setMaximumHeight(frame);
|
||||||
|
}
|
||||||
|
|
||||||
|
RSSNotification::~RSSNotification()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
28
src/rss/rssnotification.h
Normal file
28
src/rss/rssnotification.h
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
#ifndef RSSNOTIFICATION_H
|
||||||
|
#define RSSNOTIFICATION_H
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
#include <QTimeLine>
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class RSSNotification;
|
||||||
|
}
|
||||||
|
|
||||||
|
class RSSNotification : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit RSSNotification(QString host, QWidget *parent = 0);
|
||||||
|
~RSSNotification();
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void hide();
|
||||||
|
void frameChanged(int frame);
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::RSSNotification *ui;
|
||||||
|
QTimeLine* m_animation;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // RSSNOTIFICATION_H
|
75
src/rss/rssnotification.ui
Normal file
75
src/rss/rssnotification.ui
Normal file
|
@ -0,0 +1,75 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>RSSNotification</class>
|
||||||
|
<widget class="QWidget" name="RSSNotification">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>713</width>
|
||||||
|
<height>36</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="icon">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="pixmap">
|
||||||
|
<pixmap resource="../data/icons.qrc">:/icons/other/feed.png</pixmap>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Read RSS</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="closeButton">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="autoRaise">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources>
|
||||||
|
<include location="../data/icons.qrc"/>
|
||||||
|
</resources>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
|
@ -1,12 +1,29 @@
|
||||||
#include "rsswidget.h"
|
#include "rsswidget.h"
|
||||||
#include "ui_rsswidget.h"
|
#include "ui_rsswidget.h"
|
||||||
|
#include "mainapplication.h"
|
||||||
|
#include "webview.h"
|
||||||
|
#include "rssmanager.h"
|
||||||
|
#include "rssnotification.h"
|
||||||
|
|
||||||
RSSWidget::RSSWidget(QList<QPair<QString, QString> > availableRss, QWidget *parent)
|
RSSWidget::RSSWidget(WebView *view, QList<QPair<QString, QString> > availableRss, QWidget *parent)
|
||||||
:QMenu(parent)
|
:QMenu(parent)
|
||||||
,ui(new Ui::RSSWidget)
|
,ui(new Ui::RSSWidget)
|
||||||
,m_avRss(availableRss)
|
,m_avRss(availableRss)
|
||||||
|
,m_view(view)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
for (int i = 0; i < m_avRss.count(); i++) {
|
||||||
|
QPair<QString, QString> rss = m_avRss.at(i);
|
||||||
|
QPushButton* button = new QPushButton(this);
|
||||||
|
button->setText(tr("Add"));
|
||||||
|
button->setWhatsThis(rss.second);
|
||||||
|
button->setToolTip(rss.first);
|
||||||
|
QLabel* label = new QLabel(this);
|
||||||
|
label->setText(rss.first);
|
||||||
|
ui->gridLayout->addWidget(label, i, 0);
|
||||||
|
ui->gridLayout->addWidget(button, i, 1);
|
||||||
|
connect(button, SIGNAL(clicked()), this, SLOT(addRss()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RSSWidget::showAt(QWidget* _parent)
|
void RSSWidget::showAt(QWidget* _parent)
|
||||||
|
@ -16,6 +33,41 @@ void RSSWidget::showAt(QWidget* _parent)
|
||||||
show();
|
show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RSSWidget::addRss()
|
||||||
|
{
|
||||||
|
if(!m_view)
|
||||||
|
return;
|
||||||
|
if (QPushButton *button = qobject_cast<QPushButton*>(sender())) {
|
||||||
|
QUrl url = QUrl(button->whatsThis());
|
||||||
|
QString urlString = button->whatsThis();
|
||||||
|
if(url.host().isEmpty()) {
|
||||||
|
if(!urlString.startsWith("/"))
|
||||||
|
urlString="/"+urlString;
|
||||||
|
urlString = m_view->url().host()+urlString;
|
||||||
|
QUrl temp(urlString);
|
||||||
|
if(temp.scheme().isEmpty())
|
||||||
|
urlString="http://"+urlString;
|
||||||
|
temp = QUrl(urlString);
|
||||||
|
if(temp.scheme().isEmpty() || temp.host().isEmpty())
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!url.isValid())
|
||||||
|
return;
|
||||||
|
|
||||||
|
QString title;
|
||||||
|
if (button->toolTip().isEmpty())
|
||||||
|
title = m_view->url().host();
|
||||||
|
else
|
||||||
|
title = button->toolTip();
|
||||||
|
|
||||||
|
if (MainApplication::getInstance()->rssManager()->addRssFeed(urlString, title)) {
|
||||||
|
RSSNotification* notif = new RSSNotification(title, m_view);
|
||||||
|
m_view->addNotification(notif);
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
RSSWidget::~RSSWidget()
|
RSSWidget::~RSSWidget()
|
||||||
{
|
{
|
||||||
delete ui;
|
delete ui;
|
||||||
|
|
|
@ -3,24 +3,31 @@
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
|
#include <QPushButton>
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class RSSWidget;
|
class RSSWidget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class WebView;
|
||||||
class RSSWidget : public QMenu
|
class RSSWidget : public QMenu
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit RSSWidget(QList<QPair<QString,QString> > availableRss, QWidget *parent = 0);
|
explicit RSSWidget(WebView* view, QList<QPair<QString,QString> > availableRss, QWidget *parent = 0);
|
||||||
~RSSWidget();
|
~RSSWidget();
|
||||||
|
|
||||||
void showAt(QWidget* _parent);
|
void showAt(QWidget* _parent);
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void addRss();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::RSSWidget *ui;
|
Ui::RSSWidget *ui;
|
||||||
QList<QPair<QString,QString> > m_avRss;
|
QList<QPair<QString,QString> > m_avRss;
|
||||||
|
WebView* m_view;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // RSSWIDGET_H
|
#endif // RSSWIDGET_H
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>245</width>
|
<width>247</width>
|
||||||
<height>66</height>
|
<height>97</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -22,35 +22,58 @@
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
<enum>QFrame::NoFrame</enum>
|
<enum>QFrame::NoFrame</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
<property name="horizontalSpacing">
|
<property name="spacing">
|
||||||
<number>6</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="margin">
|
<item>
|
||||||
<number>9</number>
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
</property>
|
<property name="spacing">
|
||||||
<item row="0" column="0">
|
<number>0</number>
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<item>
|
||||||
<string/>
|
<widget class="QLabel" name="label">
|
||||||
</property>
|
<property name="sizePolicy">
|
||||||
<property name="pixmap">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
<pixmap resource="../data/icons.qrc">:/icons/other/bigrss.png</pixmap>
|
<horstretch>0</horstretch>
|
||||||
</property>
|
<verstretch>0</verstretch>
|
||||||
</widget>
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="pixmap">
|
||||||
|
<pixmap resource="../data/icons.qrc">:/icons/other/bigrss.png</pixmap>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Add RSS Feeds from this site</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item>
|
||||||
<widget class="QLabel" name="label_2">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<property name="text">
|
<property name="leftMargin">
|
||||||
<string>Add RSS Feeds from this site</string>
|
<number>10</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="horizontalSpacing">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="verticalSpacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
|
@ -24,7 +24,6 @@ TabWidget::TabWidget(QupZilla* mainClass, QWidget *parent) :
|
||||||
|
|
||||||
connect(this, SIGNAL(currentChanged(int)), this, SLOT(tabChanged(int)));
|
connect(this, SIGNAL(currentChanged(int)), this, SLOT(tabChanged(int)));
|
||||||
connect(this, SIGNAL(currentChanged(int)), p_QupZilla, SLOT(refreshHistory()));
|
connect(this, SIGNAL(currentChanged(int)), p_QupZilla, SLOT(refreshHistory()));
|
||||||
connect(this, SIGNAL(currentChanged(int)), p_QupZilla->locationBar(), SLOT(checkRss()));
|
|
||||||
connect(this, SIGNAL(currentChanged(int)), p_QupZilla->locationBar(), SLOT(siteIconChanged()));
|
connect(this, SIGNAL(currentChanged(int)), p_QupZilla->locationBar(), SLOT(siteIconChanged()));
|
||||||
|
|
||||||
connect(this, SIGNAL(tabCloseRequested(int)), this, SLOT(closeTab(int)));
|
connect(this, SIGNAL(tabCloseRequested(int)), this, SLOT(closeTab(int)));
|
||||||
|
@ -138,7 +137,6 @@ int TabWidget::addView(QUrl url, QString title, OpenUrlIn openIn, bool selectLin
|
||||||
|
|
||||||
connect(weView(index), SIGNAL(siteIconChanged()), p_QupZilla->locationBar(), SLOT(siteIconChanged()));
|
connect(weView(index), SIGNAL(siteIconChanged()), p_QupZilla->locationBar(), SLOT(siteIconChanged()));
|
||||||
connect(weView(index), SIGNAL(showUrl(QUrl)), p_QupZilla->locationBar(), SLOT(showUrl(QUrl)));
|
connect(weView(index), SIGNAL(showUrl(QUrl)), p_QupZilla->locationBar(), SLOT(showUrl(QUrl)));
|
||||||
connect(weView(index), SIGNAL(checkRss()), p_QupZilla->locationBar(), SLOT(checkRss()));
|
|
||||||
connect(weView(index), SIGNAL(wantsCloseTab(int)), this, SLOT(closeTab(int)));
|
connect(weView(index), SIGNAL(wantsCloseTab(int)), this, SLOT(closeTab(int)));
|
||||||
connect(weView(index), SIGNAL(changed()), p_QupZilla->getMainApp(), SLOT(setChanged()));
|
connect(weView(index), SIGNAL(changed()), p_QupZilla->getMainApp(), SLOT(setChanged()));
|
||||||
connect(weView(index), SIGNAL(ipChanged(QString)), p_QupZilla->ipLabel(), SLOT(setText(QString)));
|
connect(weView(index), SIGNAL(ipChanged(QString)), p_QupZilla->ipLabel(), SLOT(setText(QString)));
|
||||||
|
@ -168,7 +166,6 @@ void TabWidget::closeTab(int index)
|
||||||
if (weView(index)) {
|
if (weView(index)) {
|
||||||
disconnect(weView(index), SIGNAL(siteIconChanged()), p_QupZilla->locationBar(), SLOT(siteIconChanged()));
|
disconnect(weView(index), SIGNAL(siteIconChanged()), p_QupZilla->locationBar(), SLOT(siteIconChanged()));
|
||||||
disconnect(weView(index), SIGNAL(showUrl(QUrl)), p_QupZilla->locationBar(), SLOT(showUrl(QUrl)));
|
disconnect(weView(index), SIGNAL(showUrl(QUrl)), p_QupZilla->locationBar(), SLOT(showUrl(QUrl)));
|
||||||
disconnect(weView(index), SIGNAL(checkRss()), p_QupZilla->locationBar(), SLOT(checkRss()));
|
|
||||||
disconnect(weView(index), SIGNAL(wantsCloseTab(int)), this, SLOT(closeTab(int)));
|
disconnect(weView(index), SIGNAL(wantsCloseTab(int)), this, SLOT(closeTab(int)));
|
||||||
disconnect(weView(index), SIGNAL(changed()), p_QupZilla->getMainApp(), SLOT(setChanged()));
|
disconnect(weView(index), SIGNAL(changed()), p_QupZilla->getMainApp(), SLOT(setChanged()));
|
||||||
disconnect(weView(index), SIGNAL(ipChanged(QString)), p_QupZilla->ipLabel(), SLOT(setText(QString)));
|
disconnect(weView(index), SIGNAL(ipChanged(QString)), p_QupZilla->ipLabel(), SLOT(setText(QString)));
|
||||||
|
|
4
tools_/a_showLines.sh
Executable file
4
tools_/a_showLines.sh
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
|
cd /home/david/Programování/Qt\ C++/QupZilla/src/ && python /home/david/Programování/Qt\ C++/QupZilla/tools/pythonLineCounter.py
|
||||||
|
read -p "Press [ENTER] to close terminal"
|
||||||
|
exit
|
20
tools_/pythonLineCounter.py
Normal file
20
tools_/pythonLineCounter.py
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
#!/usr/bin/python
|
||||||
|
import commands, re
|
||||||
|
|
||||||
|
cpp=commands.getoutput("find . -name '*.cpp' | xargs wc -l |grep celkem")
|
||||||
|
headers=commands.getoutput("find . -name '*.h' | xargs wc -l |grep celkem")
|
||||||
|
|
||||||
|
intcpp=int(re.findall(r"\d+",cpp)[0])
|
||||||
|
intheaders=int(re.findall(r"\d+",headers)[0])
|
||||||
|
|
||||||
|
print "\n"
|
||||||
|
print "##########################"
|
||||||
|
print "## nowrep line counter! ##"
|
||||||
|
print "##########################"
|
||||||
|
print "\n"
|
||||||
|
print "Lines in Headers (.h files): "+str(intheaders)
|
||||||
|
print "Lines in Sources (.cpp files): "+str(intcpp)
|
||||||
|
print "----------------------------------------"
|
||||||
|
print "\n"
|
||||||
|
print "::: "+str(intheaders + intcpp)+" LINES IN SUMMARY :::"
|
||||||
|
print "\n"
|
8
tools_/updatePluginTranslations.sh
Executable file
8
tools_/updatePluginTranslations.sh
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
/home/david/Programování/qtsdk-2010.05/qt/bin/lupdate /home/david/Programování/Qt\ C++/QupZilla/plugins/TestPlugin/src/TestPlugin.pro -no-obsolete -ts /home/david/Programování/Qt\ C++/QupZilla/plugins/TestPlugin/cs_CZ.ts
|
||||||
|
|
||||||
|
/home/david/Programování/qtsdk-2010.05/qt/bin/lupdate /home/david/Programování/Qt\ C++/QupZilla/plugins/TestPlugin/src/TestPlugin.pro -no-obsolete -ts /home/david/Programování/Qt\ C++/QupZilla/plugins/TestPlugin/sk_SK.ts
|
||||||
|
|
||||||
|
read -p "Press [ENTER] to close terminal"
|
||||||
|
exit
|
14
tools_/updateTranslations.sh
Executable file
14
tools_/updateTranslations.sh
Executable file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
## circular inclusions workaround - we comment that buggy line
|
||||||
|
sed -i 's/include(3rdparty/##temp/g' /home/david/Programování/Qt\ C++/QupZilla/src/QupZilla.pro
|
||||||
|
|
||||||
|
/home/david/Programování/qtsdk-2010.05/qt/bin/lupdate /home/david/Programování/Qt\ C++/QupZilla/src/QupZilla.pro -no-obsolete -ts /home/david/Programování/Qt\ C++/QupZilla/translations/cs_CZ.ts
|
||||||
|
|
||||||
|
/home/david/Programování/qtsdk-2010.05/qt/bin/lupdate /home/david/Programování/Qt\ C++/QupZilla/src/QupZilla.pro -no-obsolete -ts /home/david/Programování/Qt\ C++/QupZilla/translations/sk_SK.ts
|
||||||
|
|
||||||
|
## uncomment it now
|
||||||
|
sed -i 's/##temp/include(3rdparty/g' /home/david/Programování/Qt\ C++/QupZilla/src/QupZilla.pro
|
||||||
|
|
||||||
|
read -p "Press [ENTER] to close terminal"
|
||||||
|
exit
|
Loading…
Reference in New Issue
Block a user