Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/Remmina/QRema.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntenore Gatta <antenore@simbiosi.org>2019-08-16 19:17:54 +0300
committerAntenore Gatta <antenore@simbiosi.org>2019-08-16 19:17:54 +0300
commit66b1023bb079c7e5785ef6636c82c06de8854c4d (patch)
tree787471cb9eac82ad75c5dcebb25c1a53cdd1f2b9
parent1c6e0b850fb9cc5b23bdd2853c60081a6d7eb3dd (diff)
glib integration
-rw-r--r--QRema.pro15
-rw-r--r--data/ui/qremamain.ui22
-rw-r--r--src/qremamain.cpp8
-rw-r--r--src/qremamain.h3
-rw-r--r--src/qremaprofileparser.h1
5 files changed, 44 insertions, 5 deletions
diff --git a/QRema.pro b/QRema.pro
index 451827d..827e376 100644
--- a/QRema.pro
+++ b/QRema.pro
@@ -6,6 +6,21 @@
QT += core gui
+
+LIBS += -lglib-2.0
+LIBS += -lcairo
+
+INCLUDEPATH+=/usr/include/pixman-1
+INCLUDEPATH+=/usr/include/freetype2
+INCLUDEPATH+=/usr/include/libpng12
+INCLUDEPATH+=/usr/include/glib-2.0
+INCLUDEPATH+=/usr/lib64/glib-2.0/include
+INCLUDEPATH+=/usr/include/pango-1.0
+INCLUDEPATH+=/usr/include/cairo
+INCLUDEPATH+=/usr/include/gdk-pixbuf-2.0
+INCLUDEPATH+=/usr/include/gio-unix-2.0
+
+
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = QRema
diff --git a/data/ui/qremamain.ui b/data/ui/qremamain.ui
index 9af9811..a724c56 100644
--- a/data/ui/qremamain.ui
+++ b/data/ui/qremamain.ui
@@ -33,7 +33,7 @@
<widget class="QWidget" name="layoutWidget">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
- <widget class="QComboBox" name="comboBox_2">
+ <widget class="QComboBox" name="groupCombo">
<property name="editable">
<bool>true</bool>
</property>
@@ -47,7 +47,7 @@
<widget class="QWidget" name="layoutWidget">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
- <widget class="QComboBox" name="comboBox">
+ <widget class="QComboBox" name="profileCombo">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -81,7 +81,7 @@
<x>0</x>
<y>0</y>
<width>800</width>
- <height>28</height>
+ <height>21</height>
</rect>
</property>
<widget class="QMenu" name="menu_File">
@@ -181,5 +181,21 @@
</hint>
</hints>
</connection>
+ <connection>
+ <sender>groupCombo</sender>
+ <signal>currentTextChanged(QString)</signal>
+ <receiver>treeView</receiver>
+ <slot>update()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>128</x>
+ <y>80</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>139</x>
+ <y>136</y>
+ </hint>
+ </hints>
+ </connection>
</connections>
</ui>
diff --git a/src/qremamain.cpp b/src/qremamain.cpp
index 33a1536..f68b7d1 100644
--- a/src/qremamain.cpp
+++ b/src/qremamain.cpp
@@ -7,7 +7,7 @@ QRemaMain::QRemaMain(QWidget *parent) :
ui(new Ui::QRemaMain)
{
ui->setupUi(this);
- QString mPath = QDir::homePath() + "/remmina/profiles";
+ QString mPath = QDir::homePath() + "/remmina";
@@ -21,6 +21,9 @@ QRemaMain::QRemaMain(QWidget *parent) :
// QFileSystemModel requires root path
dirModel->setRootPath(mPath);
+ QSortFilterProxyModel *proxyDirModel = new QSortFilterProxyModel(this);
+ proxyDirModel->setSourceModel(dirModel);
+
// Attach the model to the view
ui->treeView->setModel(dirModel);
ui->treeView->header()->setSectionResizeMode(0, QHeaderView::ResizeToContents);
@@ -34,6 +37,9 @@ QRemaMain::QRemaMain(QWidget *parent) :
// FILES
+ GKeyFile *keyFile = g_key_file_new();
+
+
fileModel = new QFileSystemModel(this);
// Set filter
diff --git a/src/qremamain.h b/src/qremamain.h
index d0d27b2..2378546 100644
--- a/src/qremamain.h
+++ b/src/qremamain.h
@@ -6,6 +6,9 @@
#include <QFileSystemModel>
#include <QDesktopServices>
#include <QUrl>
+#include <QSortFilterProxyModel>
+#include <glib.h>
+#include <glib/gprintf.h>
diff --git a/src/qremaprofileparser.h b/src/qremaprofileparser.h
index d1742f1..e57926d 100644
--- a/src/qremaprofileparser.h
+++ b/src/qremaprofileparser.h
@@ -1,7 +1,6 @@
#ifndef QREMAPROFILEPARSER_H
#define QREMAPROFILEPARSER_H
-#include <glib.h>;
class QRemaProfileParser
{