quake-tools/source/quam/project.h

46 lines
859 B
C++

#pragma once
#include "common.h"
#include "quam/archive.h"
#include "quam/ui_project.h"
#include <QWidget>
class QErrorMessage;
class QSortFilterProxyModel;
class Project : public QWidget, private Ui::Project {
Q_OBJECT
public:
explicit Project(std::istream &st, QErrorMessage *errors, QWidget *parent);
virtual ~Project();
bool seekHistory(std::ptrdiff_t newPos);
bool seekPath(std::string path);
void seekTop();
public slots:
bool goBack();
bool goForward();
bool goTop();
bool goUp();
private slots:
bool goPath();
void dirChanged(Arc::Dir *from, Arc::Dir *to);
private:
bool m_seekingDir;
std::size_t m_histPos;
std::vector<std::string> m_hist;
Arc::Arc *m_arc;
QErrorMessage *m_errors;
Arc::Model *m_model;
QSortFilterProxyModel *m_sorter;
};
// EOF