66 lines
1.5 KiB
C++
66 lines
1.5 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 XQMAINWINDOW_H
|
|
#define XQMAINWINDOW_H
|
|
|
|
#include <QMainWindow>
|
|
#include <ui_xqmainwindow.h>
|
|
#include <xqdocumentstore.h>
|
|
#include <xqmainmodel.h>
|
|
#include <xqchildmodel.h>
|
|
#include <xqappdata.h>
|
|
|
|
class XQMainWindow : public QMainWindow, public Ui_XQMainWindow
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
XQMainWindow( QWidget* parent = nullptr );
|
|
virtual ~XQMainWindow() = default;
|
|
|
|
void initMainWindow();
|
|
|
|
public slots:
|
|
|
|
void onCreateDocument();
|
|
void onOpenDocument();
|
|
void onSaveDocument();
|
|
void onSaveDocumentAs();
|
|
void onCloseDocument();
|
|
void onAbout();
|
|
void onExit();
|
|
|
|
void onTreeItemClicked(const QModelIndex& index );
|
|
void onTabClicked( int index );
|
|
|
|
protected:
|
|
|
|
// showDocumentTab( XQItem* item)
|
|
// fixme implement
|
|
void showDocumnet( const QString& key ){}
|
|
void loadDocument( const QString& fileName );
|
|
void saveDocument( const QString& fileName );
|
|
|
|
QUndoStack _undoStack;
|
|
XQDocumentStore _documentStore;
|
|
|
|
XQMainModel _mainModelView;
|
|
|
|
|
|
};
|
|
|
|
#endif // XQMAINWINDOW_H
|