Files
xtree.ng.zwo/application/xqdocumentstore.h
2025-08-13 18:30:47 +02:00

60 lines
1.3 KiB
C++

/***************************************************************************
source::worx xtree
Copyright © 2024-2025 c.holzheuer
christoph.holzheuer@gmail.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
***************************************************************************/
#ifndef XQDOCUMENTSTORE_H
#define XQDOCUMENTSTORE_H
#include <xqmaptor.h>
#include <xqnode.h>
class XQModel;
class XQItem;
// should this be internal??
struct XQDocument
{
XQDocument() = default;
XQDocument( const QString& aFileName, const QString& aFriendlyName, XQItem* aTreeItem, XQModel* aModelView );
virtual ~XQDocument();
QString fileName; // also used as key
QString friendlyName;
XQItem* treeItem{};
XQModel* modelView{};
};
class XQDocumentStore : public XQMaptor<XQDocument>
{
public:
XQDocumentStore() = default;
virtual ~ XQDocumentStore();
void addDocument( const QString& aFileName, const QString& aFriendlyName, XQItem* aTreeItem, XQModel* aModelView );
protected:
//?? needed?
//XQNodePtr _treeRootNode;//{ "treeRootNode" };
XQNode _treeRootNode{ "treeRootNode" };
};
#endif // XQDOCUMENTSTORE_H