1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-16 00:14:34 +02:00

Create new ItemList component

This commit is contained in:
Laurent Cozic
2017-02-05 17:57:04 +00:00
parent 73be4d9527
commit a4116a4bf8
15 changed files with 649 additions and 187 deletions

View File

@ -12,6 +12,10 @@
#include "constants.h"
#include "filters.h"
#include "qmlutils.h"
using namespace jop;
Application::Application(int &argc, char **argv) :
@ -56,13 +60,28 @@ Application::Application(int &argc, char **argv) :
QObject* rootObject = (QObject*)view_.rootObject();
connect(rootObject, SIGNAL(currentFolderChanged()), this, SLOT(view_currentFolderChanged()));
connect(rootObject, SIGNAL(currentNoteChanged()), this, SLOT(view_currentNoteChanged()));
connect(rootObject, SIGNAL(addFolderButtonClicked()), this, SLOT(view_addFolderButtonClicked()));
connect(rootObject, SIGNAL(addNoteButtonClicked()), this, SLOT(view_addNoteButtonClicked()));
connect(rootObject, SIGNAL(syncButtonClicked()), this, SLOT(view_syncButtonClicked()));
connect(rootObject, SIGNAL(loginClicked(QString,QString,QString)), this, SLOT(dispatcher_loginClicked(QString,QString,QString)));
connect(rootObject, SIGNAL(logoutClicked()), this, SLOT(dispatcher_logoutClicked()));
QObject* itemList = qmlUtils::childFromProperty(rootObject, "itemList");
qmlUtils::callQml(itemList, "testing");
//qDebug() << itemList;
// QObject* itemList = rootObject->findChild<QObject*>("itemList");
// qDebug() << "WWWWWWWWWW" << itemList;
//view_.callQml("testing");
// connect(rootObject, SIGNAL(currentFolderChanged()), this, SLOT(view_currentFolderChanged()));
// connect(rootObject, SIGNAL(currentNoteChanged()), this, SLOT(view_currentNoteChanged()));
// connect(rootObject, SIGNAL(addFolderButtonClicked()), this, SLOT(view_addFolderButtonClicked()));
// connect(rootObject, SIGNAL(addNoteButtonClicked()), this, SLOT(view_addNoteButtonClicked()));
// connect(rootObject, SIGNAL(syncButtonClicked()), this, SLOT(view_syncButtonClicked()));
// connect(rootObject, SIGNAL(loginClicked(QString,QString,QString)), this, SLOT(dispatcher_loginClicked(QString,QString,QString)));
// connect(rootObject, SIGNAL(logoutClicked()), this, SLOT(dispatcher_logoutClicked()));
view_.show();