parent
800255a7e4
commit
22aca9c81c
20 changed files with 326 additions and 72 deletions
@ -0,0 +1 @@ |
||||
qupzilla |
||||
@ -0,0 +1 @@ |
||||
libExamplePlugin.so |
||||
|
After Width: | Height: | Size: 1.8 KiB |
@ -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; |
||||
} |
||||
@ -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
|
||||
@ -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> |
||||
@ -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" |
||||
Loading…
Reference in new issue