Skip to content

Commit d167459

Browse files
authored
Merge pull request #4 from Emotyco/develop
Version 0.2
2 parents 33ea141 + 4549ec7 commit d167459

85 files changed

Lines changed: 4801 additions & 1035 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.travis.yml‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
language: cpp
2+
3+
os: linux
4+
dist: trusty
5+
sudo: required
6+
compiler: gcc
7+
8+
before_install:
9+
- sudo add-apt-repository --yes ppa:ubuntu-sdk-team/ppa
10+
- sudo add-apt-repository --yes ppa:beineri/opt-qt58-trusty
11+
- sudo apt-get -qq update
12+
13+
install:
14+
- sudo apt-get -y install build-essential libgl1-mesa-dev
15+
- sudo apt-get -y install libpulse-mainloop-glib0 libpulse0 libpulse-dev
16+
- sudo apt-get -y install qt58base qt58graphicaleffects qt58quickcontrols qt58quickcontrols2 qt58svg qt58tools qt58multimedia
17+
18+
script:
19+
- source /opt/qt58/bin/qt58-env.sh
20+
- /opt/qt58/bin/qmake
21+
- make

‎Bridge/LoginWindow/loginwindow_main.cpp‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525

2626
//Emoty-GUI
2727
#include "loginwindow_main.h"
28+
#include "../../Util/screensize.h"
2829

2930
#ifdef BORDERLESS_LOGIN
3031
//Emoty-GUI
3132
#include "borderlesswindow.h"
32-
#include "../../util/screensize.h"
3333
#endif
3434
#ifndef BORDERLESS_LOGIN
3535
//Qt
@@ -53,8 +53,10 @@ int loginwindow_main(int argc, char **argv)
5353
QQuickView view;
5454
view.setResizeMode(QQuickView::SizeRootObjectToView);
5555

56-
view.setMaximumSize(QSize(400, 470));
57-
view.setMinimumSize(QSize(400, 470));
56+
ScreenSize screenSize;
57+
58+
view.setMaximumSize(QSize(screenSize.width()/2, screenSize.height()/2));
59+
view.setMinimumSize(QSize(screenSize.width()/2, screenSize.height()/2));
5860

5961
QObject::connect(&view, SIGNAL(closing(QQuickCloseEvent*)), &app, SLOT(quit()));
6062

@@ -82,7 +84,7 @@ int loginwindow_main(int argc, char **argv)
8284

8385
// Create window
8486
ScreenSize screenSize;
85-
BorderlessWindow window(windowBackground, (screenSize.width()-400)/2, (screenSize.height()-470)/2, 400, 470);
87+
BorderlessWindow window(windowBackground, screenSize.width()/4, screenSize.height()/4, screenSize.width()/2, screenSize.height()/2);
8688
#endif
8789

8890
return app.exec();

‎Bridge/MainWindow/mainwindowpanel.cpp‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include "notifier.h"
3737
#include "soundnotifier.h"
3838
#include "Util/runstatehelper.h"
39+
#include "Bridge/Models/contactsmodel.h"
3940

4041
MainWindowPanel::MainWindowPanel(HWND hWnd) : QWinView(hWnd)
4142
{
@@ -57,6 +58,7 @@ MainWindowPanel::MainWindowPanel(HWND hWnd) : QWinView(hWnd)
5758
rsApi = new LibresapiLocalClient();
5859
rsApi->openConnection(sockPath);
5960

61+
base64 = new Base64();
6062
QQmlContext *ctxt = this->rootContext();
6163
ctxt->setContextProperty("view", this);
6264
ctxt->setContextProperty("qMainPanel", this);
@@ -67,10 +69,37 @@ MainWindowPanel::MainWindowPanel(HWND hWnd) : QWinView(hWnd)
6769
ctxt->setContextProperty("soundNotifier", SoundNotifier::getInstance());
6870
ctxt->setContextProperty("rsApi", rsApi);
6971
ctxt->setContextProperty("runStateHelper", RunStateHelper::getInstance());
72+
ctxt->setContextProperty("base64", base64);
73+
74+
ctxt->setContextProperty("gxsModel", ContactsModel::getInstance());
75+
76+
contactsModel = new ContactsSortModel();
77+
contactsModel->setSourceModel(ContactsModel::getInstance());
78+
ctxt->setContextProperty("contactsModel", contactsModel);
79+
80+
identitiesModel = new IdentitiesSortModel();
81+
identitiesModel->setSourceModel(ContactsModel::getInstance());
82+
ctxt->setContextProperty("identitiesModel", identitiesModel);
83+
7084
this->setSource(QUrl("qrc:/Borderless.qml"));
7185
show();
7286
}
7387

88+
MainWindowPanel::~MainWindowPanel()
89+
{
90+
if(base64 != NULL)
91+
delete base64;
92+
base64 = NULL;
93+
94+
if(contactsModel != NULL)
95+
delete contactsModel;
96+
contactsModel = NULL;
97+
98+
if(identitiesModel != NULL)
99+
delete identitiesModel;
100+
identitiesModel = NULL;
101+
}
102+
74103
// Button events
75104
void MainWindowPanel::pushButtonMinimizeClicked()
76105
{

‎Bridge/MainWindow/mainwindowpanel.h‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,18 @@
2727
//Emoty-GUI
2828
#include "Bridge/Windows/qwinview.h"
2929
#include "libresapilocalclient.h"
30+
#include "Util/base64.h"
31+
32+
#include "Bridge/Models/contactssortmodel.h"
33+
#include "Bridge/Models/identitiessortmodel.h"
3034

3135
class MainWindowPanel : public QWinView
3236
{
3337
Q_OBJECT
3438

3539
public:
3640
MainWindowPanel(HWND hWnd);
41+
~MainWindowPanel();
3742

3843
public slots:
3944
void pushButtonMinimizeClicked();
@@ -51,6 +56,10 @@ public slots:
5156
private:
5257
HWND windowHandle;
5358
LibresapiLocalClient *rsApi;
59+
Base64 *base64;
60+
61+
ContactsSortModel *contactsModel;
62+
IdentitiesSortModel *identitiesModel;
5463
};
5564

5665
#endif // MainWindowPanel_H

0 commit comments

Comments
 (0)