[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r33501 - in gnunet-qt/SecureShare: . models qml
From: |
gnunet |
Subject: |
[GNUnet-SVN] r33501 - in gnunet-qt/SecureShare: . models qml |
Date: |
Wed, 4 Jun 2014 05:48:08 +0200 |
Author: bratao
Date: 2014-06-04 05:48:08 +0200 (Wed, 04 Jun 2014)
New Revision: 33501
Added:
gnunet-qt/SecureShare/qml/NewEgo.qml
Modified:
gnunet-qt/SecureShare/main.cpp
gnunet-qt/SecureShare/models/IdentityModel.cpp
gnunet-qt/SecureShare/models/IdentityModel.h
gnunet-qt/SecureShare/qml.qrc
gnunet-qt/SecureShare/qml/Splash.qml
gnunet-qt/SecureShare/qml/main.qml
Log:
Towards Add new ego and fix linux build
Modified: gnunet-qt/SecureShare/main.cpp
===================================================================
--- gnunet-qt/SecureShare/main.cpp 2014-06-03 17:17:42 UTC (rev 33500)
+++ gnunet-qt/SecureShare/main.cpp 2014-06-04 03:48:08 UTC (rev 33501)
@@ -15,7 +15,7 @@
Psyc psyc;
- QQmlApplicationEngine engine(QUrl(QStringLiteral("qrc:///qml/Main.qml")));
+ QQmlApplicationEngine engine(QUrl(QStringLiteral("qrc:///qml/main.qml")));
//Connect Window to quit signal
@@ -28,6 +28,8 @@
QObject::connect(&engine, SIGNAL(quit()), &app, SLOT(quit()));
+
+
//Create the tray icon
theApp->setupTray();
Modified: gnunet-qt/SecureShare/models/IdentityModel.cpp
===================================================================
--- gnunet-qt/SecureShare/models/IdentityModel.cpp 2014-06-03 17:17:42 UTC
(rev 33500)
+++ gnunet-qt/SecureShare/models/IdentityModel.cpp 2014-06-04 03:48:08 UTC
(rev 33501)
@@ -37,7 +37,7 @@
int IdentityModel::rowCount(const QModelIndex& parent) const
{
- return m_data.size();
+ return m_data.size()+1; // PLus one is because the last one is a "<CREATE>"
}
@@ -49,9 +49,12 @@
QVariant IdentityModel::data(const QModelIndex& index, int role) const
{
- if (index.row() < 0 || index.row() >= m_data.count())
+ if (index.row() < 0 || index.row() > m_data.count())
return QVariant();
+ else if ( index.row() == m_data.count())
+ return QString("<Create>");
+
Identity* iden = m_data[index.row()];
Modified: gnunet-qt/SecureShare/models/IdentityModel.h
===================================================================
--- gnunet-qt/SecureShare/models/IdentityModel.h 2014-06-03 17:17:42 UTC
(rev 33500)
+++ gnunet-qt/SecureShare/models/IdentityModel.h 2014-06-04 03:48:08 UTC
(rev 33501)
@@ -40,7 +40,7 @@
Identity *add(QString key, QString name);
- int getCount();
+ Q_INVOKABLE int getCount();
bool contains(QString id);
Q_INVOKABLE Identity *get(int index);
Added: gnunet-qt/SecureShare/qml/NewEgo.qml
===================================================================
--- gnunet-qt/SecureShare/qml/NewEgo.qml (rev 0)
+++ gnunet-qt/SecureShare/qml/NewEgo.qml 2014-06-04 03:48:08 UTC (rev
33501)
@@ -0,0 +1,22 @@
+import QtQuick.Window 2.1;
+import QtQuick 2.2
+import QtQuick.Controls 1.1
+import QtQuick.Layouts 1.1
+Window {
+ title: "Create Ego";
+ width: 200;
+ height: 50;
+
+
+ RowLayout{
+ Label {
+ text: "Ego Name"
+ }
+
+ TextField{
+ id:newName
+
+ }
+ }
+
+}
Modified: gnunet-qt/SecureShare/qml/Splash.qml
===================================================================
--- gnunet-qt/SecureShare/qml/Splash.qml 2014-06-03 17:17:42 UTC (rev
33500)
+++ gnunet-qt/SecureShare/qml/Splash.qml 2014-06-04 03:48:08 UTC (rev
33501)
@@ -1,7 +1,7 @@
import QtQuick 2.2
import QtQuick.Controls 1.1
import QtQuick.Layouts 1.1
-import QtQuick.Window 2.0
+import QtQuick.Window 2.1
import Psyc 1.0
Window {
@@ -38,6 +38,17 @@
width: 200
model: Psyc.models.identityModel
textRole: "name"
+
+ onActivated: {
+
+ if(index === model.getCount()){
+ var newego =
Qt.createComponent("qrc:///qml/NewEgo.qml");
+ var newegoWnd = newego.createObject();
+ newegoWnd.show();
+ }
+
+ }
+
}
}
Modified: gnunet-qt/SecureShare/qml/main.qml
===================================================================
--- gnunet-qt/SecureShare/qml/main.qml 2014-06-03 17:17:42 UTC (rev 33500)
+++ gnunet-qt/SecureShare/qml/main.qml 2014-06-04 03:48:08 UTC (rev 33501)
@@ -9,6 +9,9 @@
height: 600
id: mainWnd
+ property var firstRun: true
+ property var splashWnd
+
menuBar: MenuBar {
Menu {
title: qsTr("File")
@@ -21,19 +24,20 @@
- Splash{
- id:splashWnd
- visible: true;
- }
-
ConversationWindow{
id: conversationWnd
}
onActiveChanged: {
- if(splashWnd.visible)
+ if(firstRun){
visible = false;
+ firstRun= false;
+ //splashWnd.visible = true
+ var splash = Qt.createComponent("qrc:///qml/Splash.qml");
+ splashWnd = splash.createObject();
+ splashWnd.show();
+ }
}
Modified: gnunet-qt/SecureShare/qml.qrc
===================================================================
--- gnunet-qt/SecureShare/qml.qrc 2014-06-03 17:17:42 UTC (rev 33500)
+++ gnunet-qt/SecureShare/qml.qrc 2014-06-04 03:48:08 UTC (rev 33501)
@@ -1,11 +1,12 @@
<RCC>
<qresource prefix="/">
- <file>qml/Main.qml</file>
+ <file>qml/main.qml</file>
<file>qml/images/chat.png</file>
<file>qml/images/person.png</file>
<file>qml/ConversationWindow.qml</file>
<file>qml/ConversationTab.qml</file>
<file>qml/Splash.qml</file>
<file>assets/banner.png</file>
+ <file>qml/NewEgo.qml</file>
</qresource>
</RCC>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r33501 - in gnunet-qt/SecureShare: . models qml,
gnunet <=