The macro defined namespaces confused the hell out of lupdate and more or less broke translations permanently. Looks like the only way we can do it is to have a hardcoded namespace, which goes against my instinct, but honestly how likely is it that we'll change the namespace anyway (I guess forks might want to do it, but that's their problem ;) )
58 lines
1006 B
C++
58 lines
1006 B
C++
#ifndef MAINWINDOWLAYOUTINFO_H
|
|
#define MAINWINDOWLAYOUTINFO_H
|
|
|
|
#include "project/item/folder/folder.h"
|
|
#include "project/item/sequence/sequence.h"
|
|
|
|
namespace olive {
|
|
|
|
class MainWindowLayoutInfo
|
|
{
|
|
public:
|
|
MainWindowLayoutInfo() = default;
|
|
|
|
void toXml(QXmlStreamWriter* writer) const;
|
|
|
|
static MainWindowLayoutInfo fromXml(QXmlStreamReader* reader, XMLNodeData &xml_data);
|
|
|
|
void add_folder(Folder* f);
|
|
|
|
struct OpenSequence {
|
|
Sequence* sequence;
|
|
QByteArray panel_state;
|
|
};
|
|
|
|
void add_sequence(const OpenSequence& seq);
|
|
|
|
void set_state(const QByteArray& layout);
|
|
|
|
const QList<Folder*>& open_folders() const
|
|
{
|
|
return open_folders_;
|
|
}
|
|
|
|
const QList<OpenSequence>& open_sequences() const
|
|
{
|
|
return open_sequences_;
|
|
}
|
|
|
|
const QByteArray& state() const
|
|
{
|
|
return state_;
|
|
}
|
|
|
|
private:
|
|
QByteArray state_;
|
|
|
|
QList<Folder*> open_folders_;
|
|
|
|
QList<OpenSequence> open_sequences_;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
Q_DECLARE_METATYPE(olive::MainWindowLayoutInfo)
|
|
|
|
#endif // MAINWINDOWLAYOUTINFO_H
|