Skip to content

Commit

Permalink
Some refinements.
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob9elements committed Jun 25, 2016
1 parent 46c7f1e commit e806880
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 140 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
@@ -1,9 +1,6 @@
[submodule "qtwaitingspinner"]
path = qtwaitingspinner
url = https://github.com/cybercatalyst/qtwaitingspinner.git
[submodule "qtirc"]
path = qtirc
url = https://github.com/cybercatalyst/qtirc.git
[submodule "qt-pods-core"]
path = qt-pods-core
url = https://github.com/qt-pods/qt-pods-core.git
6 changes: 0 additions & 6 deletions .podinfo
Expand Up @@ -4,12 +4,6 @@ description=Qt Pods managment functions.
license=GPLv3
website=

[qtirc]
author=Jacob Dawid
description=IRC chat client.
license=GPLv3
website=

[qtwaitingspinner]
author="Alexander Turkin, William Hallatt, Jacob Dawid"
description=Floating waiting spinner widget.
Expand Down
1 change: 0 additions & 1 deletion pods-subdirs.pri
Expand Up @@ -5,6 +5,5 @@

SUBDIRS += \
qt-pods-core \
qtirc \
qtwaitingspinner

1 change: 0 additions & 1 deletion pods.pri
Expand Up @@ -4,6 +4,5 @@
# This file should be put under version control.

include(qt-pods-core/qt-pods-core.pri)
include(qtirc/qtirc.pri)
include(qtwaitingspinner/qtwaitingspinner.pri)

32 changes: 0 additions & 32 deletions qt-pods-gui/mainwindow.cpp
Expand Up @@ -37,12 +37,6 @@
#include <unistd.h>
#endif

class CustomWebPage : public QWebPage {
virtual QString userAgentForUrl(const QUrl&) const {
return "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36";
}
};

MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow) {
Expand Down Expand Up @@ -113,21 +107,13 @@ MainWindow::MainWindow(QWidget *parent) :
_availablePodsSpinnerWidget = new WaitingSpinnerWidget(ui->tabAvailablePods);
_localPodsSpinnerWidget = new WaitingSpinnerWidget(ui->tabLocalPods);
_developmentToolsSpinnerWidget = new WaitingSpinnerWidget(ui->tabDevelopmentTools);
_webViewSpinnerWidget = new WaitingSpinnerWidget(ui->webViewDevelopment);

connect(ui->webViewDevelopment, SIGNAL(loadStarted()), _webViewSpinnerWidget, SLOT(start()));
connect(ui->webViewDevelopment, SIGNAL(loadFinished(bool)), _webViewSpinnerWidget, SLOT(stop()));

updateBuildInfo();
loadSettings();

#ifndef QT_DEBUG
ui->tabWidget->removeTab(ui->tabWidget->indexOf(ui->tabDiagnostic));
#endif

ui->ircWidget->connectToServer("qtpodsuser", "irc.freenode.net", 6667, "#qtpods");
ui->webViewDevelopment->setPage(new CustomWebPage);
ui->webViewDevelopment->load(QUrl("https://github.com/cybercatalyst/qt-pods/issues"));
}

MainWindow::~MainWindow() {
Expand Down Expand Up @@ -562,24 +548,6 @@ void MainWindow::on_pushButtonDevelopmentPodInstall_clicked() {
}
}

void MainWindow::on_webViewDevelopment_urlChanged(QUrl url) {
#ifdef QT_DEBUG
qDebug() << __TIME__ << "[on_webViewDevelopment_urlChanged]";
#endif
ui->lineEditDevelopmentUrl->setText(url.toString());
}

void MainWindow::on_lineEditDevelopmentUrl_returnPressed() {
#ifdef QT_DEBUG
qDebug() << __TIME__ << "[on_lineEditDevelopmentUrl_returnPressed]";
#endif
QString urlString = ui->lineEditDevelopmentUrl->text();
if(!urlString.startsWith("http")) {
urlString.prepend("http://");
}
ui->webViewDevelopment->load(QUrl(urlString));
}

void MainWindow::closeEvent(QCloseEvent *closeEvent) {
#ifdef QT_DEBUG
qDebug() << __TIME__ << "[closeEvent]";
Expand Down
4 changes: 0 additions & 4 deletions qt-pods-gui/mainwindow.h
Expand Up @@ -84,9 +84,6 @@ public slots:
void on_pushButtonDevelopmentPodSanityCheck_clicked();
void on_pushButtonDevelopmentPodInstall_clicked();

void on_webViewDevelopment_urlChanged(QUrl url);
void on_lineEditDevelopmentUrl_returnPressed();

protected:
void closeEvent(QCloseEvent *closeEvent);

Expand Down Expand Up @@ -128,7 +125,6 @@ private slots:
WaitingSpinnerWidget *_availablePodsSpinnerWidget;
WaitingSpinnerWidget *_localPodsSpinnerWidget;
WaitingSpinnerWidget *_developmentToolsSpinnerWidget;
WaitingSpinnerWidget *_webViewSpinnerWidget;

Ui::MainWindow *ui;
};
94 changes: 5 additions & 89 deletions qt-pods-gui/mainwindow.ui
Expand Up @@ -309,16 +309,16 @@
<bool>true</bool>
</property>
<property name="toolTip">
<string>Attempt to update all pods in the current repository.</string>
<string>Attempt to update selected pods in the current repository.</string>
</property>
<property name="statusTip">
<string>Attempt to update all pods in the current repository.</string>
<string>Attempt to update selected pods in the current repository.</string>
</property>
<property name="whatsThis">
<string>Attempt to update all pods in the current repository.</string>
<string>Attempt to update selected pods in the current repository.</string>
</property>
<property name="text">
<string>Update pods</string>
<string>Update selected pods</string>
</property>
<property name="icon">
<iconset resource="resources.qrc">
Expand Down Expand Up @@ -625,60 +625,6 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="tabCommunityChat">
<attribute name="icon">
<iconset resource="resources.qrc">
<normaloff>:/icons/icons/empathy.svg</normaloff>:/icons/icons/empathy.svg</iconset>
</attribute>
<attribute name="title">
<string>Community chat</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<widget class="IRCWidget" name="ircWidget" native="true"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabDevelopment">
<attribute name="icon">
<iconset resource="resources.qrc">
<normaloff>:/icons/icons/setroubleshoot_icon.svg</normaloff>:/icons/icons/setroubleshoot_icon.svg</iconset>
</attribute>
<attribute name="title">
<string>Development</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QLineEdit" name="lineEditDevelopmentUrl"/>
</item>
<item>
<widget class="QPushButton" name="pushButtonDevelopmentBack">
<property name="text">
<string>Back</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QWebView" name="webViewDevelopment">
<property name="url">
<url>
<string>about:blank</string>
</url>
</property>
<property name="zoomFactor">
<double>1.000000000000000</double>
</property>
<property name="renderHints">
<set>QPainter::Antialiasing|QPainter::HighQualityAntialiasing|QPainter::SmoothPixmapTransform|QPainter::TextAntialiasing</set>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabDevelopmentTools">
<property name="toolTip">
<string>Tools for pod developers.</string>
Expand Down Expand Up @@ -965,38 +911,8 @@
<widget class="QStatusBar" name="statusBar"/>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
<class>QWebView</class>
<extends>QWidget</extends>
<header>QtWebKitWidgets/QWebView</header>
</customwidget>
<customwidget>
<class>IRCWidget</class>
<extends>QWidget</extends>
<header>ircwidget.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources>
<include location="resources.qrc"/>
</resources>
<connections>
<connection>
<sender>pushButtonDevelopmentBack</sender>
<signal>clicked()</signal>
<receiver>webViewDevelopment</receiver>
<slot>back()</slot>
<hints>
<hint type="sourcelabel">
<x>845</x>
<y>98</y>
</hint>
<hint type="destinationlabel">
<x>454</x>
<y>367</y>
</hint>
</hints>
</connection>
</connections>
<connections/>
</ui>
2 changes: 1 addition & 1 deletion qt-pods-gui/qt-pods-gui.pro
Expand Up @@ -18,7 +18,7 @@
## ##
##############################################################################/

QT += core gui network widgets webkitwidgets svg
QT += core gui network widgets svg

TARGET = qt-pods-gui
TEMPLATE = app
Expand Down
4 changes: 2 additions & 2 deletions qt-pods.pro
Expand Up @@ -4,5 +4,5 @@ SUBDIRS += \
qt-pods-gui \
qt-pods-cli

qt-pods-cli.depends = qt-pods-core qtirc qtwaitingspinner
qt-pods-gui.depends = qt-pods-core qtirc qtwaitingspinner
qt-pods-cli.depends = qt-pods-core qtwaitingspinner
qt-pods-gui.depends = qt-pods-core qtwaitingspinner
1 change: 0 additions & 1 deletion qtirc
Submodule qtirc deleted from 410c11

0 comments on commit e806880

Please sign in to comment.