2021-12-04 00:18:05 +00:00
|
|
|
/* Copyright 2013-2021 MultiMC Contributors
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QFrame>
|
|
|
|
|
2023-08-02 17:35:35 +01:00
|
|
|
namespace Ui {
|
2021-12-04 00:18:05 +00:00
|
|
|
class ErrorFrame;
|
|
|
|
}
|
|
|
|
|
2023-08-02 17:35:35 +01:00
|
|
|
class ErrorFrame : public QFrame {
|
2021-12-04 00:18:05 +00:00
|
|
|
Q_OBJECT
|
|
|
|
|
2023-08-02 17:35:35 +01:00
|
|
|
public:
|
|
|
|
explicit ErrorFrame(QWidget* parent = 0);
|
2021-12-04 00:18:05 +00:00
|
|
|
~ErrorFrame();
|
|
|
|
|
|
|
|
void setTitle(QString text);
|
|
|
|
void setDescription(QString text);
|
|
|
|
|
|
|
|
void clear();
|
|
|
|
|
2023-08-02 17:35:35 +01:00
|
|
|
public slots:
|
|
|
|
void ellipsisHandler(const QString& link);
|
2021-12-04 00:18:05 +00:00
|
|
|
void boxClosed(int result);
|
|
|
|
|
2023-08-02 17:35:35 +01:00
|
|
|
private:
|
2021-12-04 00:18:05 +00:00
|
|
|
void updateHiddenState();
|
|
|
|
|
2023-08-02 17:35:35 +01:00
|
|
|
private:
|
|
|
|
Ui::ErrorFrame* ui;
|
2021-12-04 00:18:05 +00:00
|
|
|
QString desc;
|
2023-08-02 17:35:35 +01:00
|
|
|
class QMessageBox* currentBox = nullptr;
|
2021-12-04 00:18:05 +00:00
|
|
|
};
|