summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
Diffstat (limited to 'Swift')
-rw-r--r--Swift/Controllers/ChatController.h2
-rw-r--r--Swift/Controllers/LoginWindowFactory.h4
-rw-r--r--Swift/Controllers/MainController.cpp2
-rw-r--r--Swift/QtUI/ChatView/main.cpp96
-rw-r--r--Swift/QtUI/Roster/QtTreeWidget.cpp2
-rw-r--r--Swift/QtUI/Roster/main.cpp14
6 files changed, 60 insertions, 60 deletions
diff --git a/Swift/Controllers/ChatController.h b/Swift/Controllers/ChatController.h
index 2103d25..ea844ad 100644
--- a/Swift/Controllers/ChatController.h
+++ b/Swift/Controllers/ChatController.h
@@ -10,7 +10,7 @@ namespace Swift {
public:
ChatController(const JID& self, StanzaChannel* stanzaChannel, IQRouter* iqRouter, ChatWindowFactory* chatWindowFactory, const JID &contact, NickResolver* nickResolver, PresenceOracle* presenceOracle, AvatarManager*);
- private:
+ private:
void handlePresenceChange(boost::shared_ptr<Presence> newPresence, boost::shared_ptr<Presence> previousPresence);
String getStatusChangeString(boost::shared_ptr<Presence> presence);
bool isIncomingMessageFromMe(boost::shared_ptr<Message> message);
diff --git a/Swift/Controllers/LoginWindowFactory.h b/Swift/Controllers/LoginWindowFactory.h
index d52325e..3edd200 100644
--- a/Swift/Controllers/LoginWindowFactory.h
+++ b/Swift/Controllers/LoginWindowFactory.h
@@ -5,8 +5,8 @@
namespace Swift {
class LoginWindow;
- class String;
-
+ class String;
+
class LoginWindowFactory {
public:
virtual ~LoginWindowFactory() {};
diff --git a/Swift/Controllers/MainController.cpp b/Swift/Controllers/MainController.cpp
index 7a55d99..78f5f65 100644
--- a/Swift/Controllers/MainController.cpp
+++ b/Swift/Controllers/MainController.cpp
@@ -309,7 +309,7 @@ void MainController::handleServerDiscoInfoResponse(boost::shared_ptr<DiscoInfo>
}
bool MainController::isMUC(const JID& jid) const {
- return mucControllers_.find(jid.toBare()) != mucControllers_.end();
+ return mucControllers_.find(jid.toBare()) != mucControllers_.end();
}
void MainController::handleOwnVCardReceived(boost::shared_ptr<VCard> vCard, const boost::optional<Error>& error) {
diff --git a/Swift/QtUI/ChatView/main.cpp b/Swift/QtUI/ChatView/main.cpp
index 9345f16..771538f 100644
--- a/Swift/QtUI/ChatView/main.cpp
+++ b/Swift/QtUI/ChatView/main.cpp
@@ -19,42 +19,42 @@ using namespace Swift;
/*
class MyNetworkReply : public QNetworkReply {
- public:
- MyNetworkReply() {
- }
-
- qint64 readData(char*, qint64) {
- return 0;
- }
-
- virtual void abort() {
- }
+ public:
+ MyNetworkReply() {
+ }
+
+ qint64 readData(char*, qint64) {
+ return 0;
+ }
+
+ virtual void abort() {
+ }
};
class MyNetworkAccessManager : public QNetworkAccessManager {
- public:
- MyNetworkAccessManager() {
- }
+ public:
+ MyNetworkAccessManager() {
+ }
- QNetworkReply * createRequest (Operation op, const QNetworkRequest& request, QIODevice* outgoingData = 0) {
- assert(op == QNetworkAccessManager::GetOperation);
- qDebug() << "Requesting: " << request.url();
+ QNetworkReply * createRequest (Operation op, const QNetworkRequest& request, QIODevice* outgoingData = 0) {
+ assert(op == QNetworkAccessManager::GetOperation);
+ qDebug() << "Requesting: " << request.url();
return QNetworkAccessManager::createRequest(op, request, outgoingData);
- //return new MyNetworkReply();
- }
+ //return new MyNetworkReply();
+ }
};
- QVBoxLayout* mainLayout = new QVBoxLayout(this);
- webView_ = new QWebView(this);
+ QVBoxLayout* mainLayout = new QVBoxLayout(this);
+ webView_ = new QWebView(this);
QFile file(":/themes/Stockholm/Contents/Resources/Incoming/Content.html");
file.open(QIODevice::ReadOnly);
QString content = QString::fromUtf8(file.readAll());
- webPage_ = new QWebPage(this);
- webPage_->setNetworkAccessManager(new MyNetworkAccessManager());
- webView_->setPage(webPage_);
- QString pagehtml =
+ webPage_ = new QWebPage(this);
+ webPage_->setNetworkAccessManager(new MyNetworkAccessManager());
+ webView_->setPage(webPage_);
+ QString pagehtml =
"<head>"
//"<base href=\"file:///Users/remko/src/swift/resources/themes/Stockholm/Contents/Resources/\"/>"
"<base href=\"file:///Users/remko/src/swift/resources/themes/Stockholm/Contents/Resources/\"/>"
@@ -62,7 +62,7 @@ class MyNetworkAccessManager : public QNetworkAccessManager {
"<link rel=\"stylesheet\" type=\"text/css\" href=\"Variants/Alt Blue - Blue.css\"/>"
"</head><body>" + content + "</body>";
qDebug() << pagehtml;
- webPage_->mainFrame()->setHtml(pagehtml);
+ webPage_->mainFrame()->setHtml(pagehtml);
*/
@@ -81,13 +81,13 @@ class ChatView : public QWidget {
webView_->setFocusPolicy(Qt::NoFocus);
mainLayout->addWidget(webView_);
- webPage_ = new QWebPage(this);
+ webPage_ = new QWebPage(this);
webPage_->setLinkDelegationPolicy(QWebPage::DelegateAllLinks);
- webView_->setPage(webPage_);
+ webView_->setPage(webPage_);
connect(webPage_, SIGNAL(selectionChanged()), SLOT(copySelectionToClipboard()));
QString pageHTML = "<head></head><body><div id=\"chat\"></div></body>";
- webPage_->mainFrame()->setHtml(pageHTML);
+ webPage_->mainFrame()->setHtml(pageHTML);
}
void appendHTML(const QString& html) {
@@ -100,31 +100,31 @@ class ChatView : public QWidget {
}
private:
- QWebView* webView_;
- QWebPage* webPage_;
+ QWebView* webView_;
+ QWebPage* webPage_;
};
*/
class MyWidget : public QWidget {
- Q_OBJECT
+ Q_OBJECT
- public:
- MyWidget() : previousWasIncoming_(false), previousWasOutgoing_(false), previousWasSystem_(false) {
- QVBoxLayout* mainLayout = new QVBoxLayout(this);
+ public:
+ MyWidget() : previousWasIncoming_(false), previousWasOutgoing_(false), previousWasSystem_(false) {
+ QVBoxLayout* mainLayout = new QVBoxLayout(this);
chatView_ = new QtChatView(this);
- mainLayout->addWidget(chatView_);
- input1_ = new QLineEdit(this);
+ mainLayout->addWidget(chatView_);
+ input1_ = new QLineEdit(this);
connect(input1_, SIGNAL(returnPressed()), SLOT(addIncoming()));
- mainLayout->addWidget(input1_);
- input2_ = new QLineEdit(this);
+ mainLayout->addWidget(input1_);
+ input2_ = new QLineEdit(this);
connect(input2_, SIGNAL(returnPressed()), SLOT(addOutgoing()));
- mainLayout->addWidget(input2_);
- input3_ = new QLineEdit(this);
+ mainLayout->addWidget(input2_);
+ input3_ = new QLineEdit(this);
connect(input3_, SIGNAL(returnPressed()), SLOT(addSystem()));
- mainLayout->addWidget(input3_);
+ mainLayout->addWidget(input3_);
resize(300,200);
- }
+ }
public slots:
void addIncoming() {
@@ -151,7 +151,7 @@ class MyWidget : public QWidget {
input3_->clear();
}
- private:
+ private:
bool previousWasIncoming_;
bool previousWasOutgoing_;
bool previousWasSystem_;
@@ -160,13 +160,13 @@ class MyWidget : public QWidget {
QLineEdit* input2_;
QLineEdit* input3_;
};
-
+
int main(int argc, char* argv[]) {
- QApplication app(argc, argv);
- MyWidget w;
- w.show();
- return app.exec();
+ QApplication app(argc, argv);
+ MyWidget w;
+ w.show();
+ return app.exec();
}
#include "main.moc"
diff --git a/Swift/QtUI/Roster/QtTreeWidget.cpp b/Swift/QtUI/Roster/QtTreeWidget.cpp
index 18b28d2..b678e0c 100644
--- a/Swift/QtUI/Roster/QtTreeWidget.cpp
+++ b/Swift/QtUI/Roster/QtTreeWidget.cpp
@@ -9,7 +9,7 @@ QtTreeWidget::QtTreeWidget(QWidget* parent) : QTreeView(parent) {
treeRoot_ = new QtTreeWidgetItem(NULL);
model_ = new RosterModel();
model_->setRoot(treeRoot_);
- setModel(model_);
+ setModel(model_);
delegate_ = new RosterDelegate();
setItemDelegate(delegate_);
setHeaderHidden(true);
diff --git a/Swift/QtUI/Roster/main.cpp b/Swift/QtUI/Roster/main.cpp
index 660dce9..2ef6697 100644
--- a/Swift/QtUI/Roster/main.cpp
+++ b/Swift/QtUI/Roster/main.cpp
@@ -4,14 +4,14 @@
int main(int argc, char *argv[])
{
- QApplication app(argc, argv);
+ QApplication app(argc, argv);
- //Swift::RosterModel model;
+ //Swift::RosterModel model;
- //QTreeView view;
- //view.setModel(&model);
- //view.setWindowTitle("A roster");
- //view.show();
+ //QTreeView view;
+ //view.setModel(&model);
+ //view.setWindowTitle("A roster");
+ //view.show();
Swift::QtTreeWidgetFactory treeWidgetFactory;
Swift::QtTreeWidget* tree = dynamic_cast<Swift::QtTreeWidget*>(treeWidgetFactory.createTreeWidget());
@@ -31,5 +31,5 @@ int main(int argc, char *argv[])
item4->setText("Kim");
}
- return app.exec();
+ return app.exec();
} \ No newline at end of file