1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-22 20:23:53 +00:00
openmw/apps/opencs/view/doc/operation.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

53 lines
956 B
C++
Raw Normal View History

2012-11-23 11:20:35 +00:00
#ifndef CSV_DOC_OPERATION_H
#define CSV_DOC_OPERATION_H
#include <QObject>
class QHBoxLayout;
class QPushButton;
class QProgressBar;
2022-10-19 17:02:00 +00:00
class QWidget;
2012-11-23 11:20:35 +00:00
namespace CSVDoc
{
class Operation : public QObject
2012-11-23 11:20:35 +00:00
{
Q_OBJECT
int mType;
bool mStalling;
QProgressBar* mProgressBar;
QPushButton* mAbortButton;
QHBoxLayout* mLayout;
2012-11-23 11:20:35 +00:00
// not implemented
Operation(const Operation&);
Operation& operator=(const Operation&);
void updateLabel(int threads = -1);
public:
Operation(int type, QWidget* parent);
~Operation() override;
2012-11-23 11:20:35 +00:00
void setProgress(int current, int max, int threads);
2012-11-23 11:20:35 +00:00
int getType() const;
QHBoxLayout* getLayout() const;
2012-11-23 11:20:35 +00:00
2022-09-22 18:26:05 +00:00
private:
2012-11-23 11:20:35 +00:00
void setBarColor(int type);
void initWidgets();
signals:
void abortOperation(int type);
private slots:
void abortOperation();
2012-11-23 11:20:35 +00:00
};
}
#endif