code format

This commit is contained in:
2022-12-14 14:13:33 +03:00
parent 37480c9d1f
commit 2622737a52
39 changed files with 1295 additions and 1265 deletions

View File

@@ -1,43 +1,46 @@
/*
QCD Utils - Qt bindings/utilites for CD Utils
QCD Utils - Qt bindings/utilites for CD Utils
Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru
Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef QCD_VIEW_H
#define QCD_VIEW_H
#include <QTreeView>
#include "piobject.h"
#include "cd_qt_export.h"
#include "piobject.h"
#include <QTreeView>
namespace CDUtils {
class CDType;
class CDSection;
}
class CDType;
class CDSection;
} // namespace CDUtils
class CDItemModel;
class QSortFilterProxyModel;
class CD_QT_EXPORT CDView: public QTreeView, public PIObject
{
class CD_QT_EXPORT CDView
: public QTreeView
, public PIObject {
Q_OBJECT
PIOBJECT(CDView);
public:
explicit CDView(QWidget *parent = 0);
explicit CDView(QWidget * parent = 0);
~CDView();
void setType(int cdt);
@@ -47,11 +50,11 @@ public:
CDUtils::CDSection * root();
QString typeLetter() const;
CDItemModel * CDModel() {return model_;}
CDItemModel * CDModel() { return model_; }
protected:
void mousePressEvent(QMouseEvent * ) override;
void mouseReleaseEvent(QMouseEvent * ) override;
void mousePressEvent(QMouseEvent *) override;
void mouseReleaseEvent(QMouseEvent *) override;
void currentChanged(const QModelIndex & cur, const QModelIndex & prev) override;
public slots:
@@ -77,12 +80,12 @@ private slots:
private:
bool filterTree(const QModelIndex & ti, const QString & filter);
EVENT_HANDLER(void, pi_cd_sendFailed) {emit _qcd_sendFailed();}
EVENT_HANDLER(void, pi_cd_sendSucceed) {emit _qcd_sendSucceed();}
EVENT_HANDLER(void, pi_cd_receiveFailed) {emit _qcd_receiveFailed();}
EVENT_HANDLER(void, pi_cd_receiveSucceed) {emit _qcd_receiveSucceed();}
EVENT_HANDLER(void, pi_cd_receivedX) {emit _qcd_receivedX();}
EVENT_HANDLER(void, pi_cd_changedGlobal) {emit _qcd_changedGlobal();}
EVENT_HANDLER(void, pi_cd_sendFailed) { emit _qcd_sendFailed(); }
EVENT_HANDLER(void, pi_cd_sendSucceed) { emit _qcd_sendSucceed(); }
EVENT_HANDLER(void, pi_cd_receiveFailed) { emit _qcd_receiveFailed(); }
EVENT_HANDLER(void, pi_cd_receiveSucceed) { emit _qcd_receiveSucceed(); }
EVENT_HANDLER(void, pi_cd_receivedX) { emit _qcd_receivedX(); }
EVENT_HANDLER(void, pi_cd_changedGlobal) { emit _qcd_changedGlobal(); }
EVENT_HANDLER3(void, pi_cd_messageReceived, PIDeque<int>, path, int, type, PIString, msg);
CDItemModel * model_;
@@ -101,13 +104,12 @@ signals:
void messageReceived(QString path, int type, QString msg);
void busyStatusChanged(bool busy);
void _qcd_sendFailed(); // PRIVATE
void _qcd_sendSucceed(); // PRIVATE
void _qcd_receiveFailed(); // PRIVATE
void _qcd_sendFailed(); // PRIVATE
void _qcd_sendSucceed(); // PRIVATE
void _qcd_receiveFailed(); // PRIVATE
void _qcd_receiveSucceed(); // PRIVATE
void _qcd_receivedX(); // PRIVATE
void _qcd_changedGlobal(); // PRIVATE
void _qcd_receivedX(); // PRIVATE
void _qcd_changedGlobal(); // PRIVATE
};
#endif // QCD_VIEW_H