Reindentation and code style update
This commit is contained in:
parent
a3bd380733
commit
3e6a3b0407
@ -1,3 +1,4 @@
|
||||
# vim: set syntax=yaml :
|
||||
AccessModifierOffset: -4
|
||||
AlignEscapedNewlinesLeft: false
|
||||
AlignTrailingComments: true
|
||||
@ -24,7 +25,7 @@ IndentFunctionDeclarationAfterType: false
|
||||
IndentWidth: 4
|
||||
Language: Cpp
|
||||
MaxEmptyLinesToKeep: 2
|
||||
NamespaceIndentation: None
|
||||
NamespaceIndentation: All
|
||||
ObjCSpaceAfterProperty: true
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
PenaltyBreakBeforeFirstCallParameter: 100
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class AboutBox;
|
||||
class AboutBox;
|
||||
}
|
||||
|
||||
class AboutBox : public QDialog {
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <cropeditor/cropscene.hpp>
|
||||
|
||||
namespace Ui {
|
||||
class BrushPenSelection;
|
||||
class BrushPenSelection;
|
||||
}
|
||||
|
||||
class BrushPenSelection : public QDialog {
|
||||
|
@ -4,14 +4,14 @@
|
||||
#include <QString>
|
||||
|
||||
namespace formats {
|
||||
enum class Normal { PNG, JPG, None };
|
||||
QString normalFormatName(Normal format);
|
||||
Normal normalFormatFromName(QString format);
|
||||
QString normalFormatMIME(Normal format);
|
||||
enum class Normal { PNG, JPG, None };
|
||||
QString normalFormatName(Normal format);
|
||||
Normal normalFormatFromName(QString format);
|
||||
QString normalFormatMIME(Normal format);
|
||||
|
||||
enum class Recording { GIF, WebM, MP4, None };
|
||||
QString recordingFormatName(Recording format);
|
||||
Recording recordingFormatFromName(QString format);
|
||||
QString recordingFormatMIME(Recording format);
|
||||
enum class Recording { GIF, WebM, MP4, None };
|
||||
QString recordingFormatName(Recording format);
|
||||
Recording recordingFormatFromName(QString format);
|
||||
QString recordingFormatMIME(Recording format);
|
||||
}
|
||||
#endif // FORMATS_HPP
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include <QString>
|
||||
|
||||
namespace formatter {
|
||||
QString format(QString toFormat, QString ext, QMap<QString, QString> variables = QMap<QString, QString>());
|
||||
QString format(QString toFormat, QString ext, QMap<QString, QString> variables = QMap<QString, QString>());
|
||||
}
|
||||
|
||||
#endif // FORMATTER_HPP
|
||||
|
@ -6,10 +6,10 @@
|
||||
#include <functional>
|
||||
|
||||
namespace hotkeying {
|
||||
void hotkey(QString seqName, QKeySequence seq, std::function<void()> func);
|
||||
bool valid(QString seq);
|
||||
void load(QString seqName, std::function<void()> func, QString def = QString());
|
||||
QString sequence(QString seqName);
|
||||
void hotkey(QString seqName, QKeySequence seq, std::function<void()> func);
|
||||
bool valid(QString seq);
|
||||
void load(QString seqName, std::function<void()> func, QString def = QString());
|
||||
QString sequence(QString seqName);
|
||||
}
|
||||
|
||||
#endif // HOTKEYING_HPP
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class HotkeyInputDialog;
|
||||
class HotkeyInputDialog;
|
||||
}
|
||||
|
||||
class HotkeyInputDialog : public QDialog {
|
||||
|
@ -8,23 +8,25 @@
|
||||
#include <functional>
|
||||
|
||||
namespace ioutils {
|
||||
extern QNetworkAccessManager networkManager;
|
||||
void getJson(QUrl target, QList<QPair<QString, QString>> headers, std::function<void(QJsonDocument, QByteArray, QNetworkReply *)> callback);
|
||||
void postJson(QUrl target,
|
||||
extern QNetworkAccessManager networkManager;
|
||||
void getJson(QUrl target,
|
||||
QList<QPair<QString, QString>> headers,
|
||||
std::function<void(QJsonDocument, QByteArray, QNetworkReply *)> callback);
|
||||
void postJson(QUrl target,
|
||||
QList<QPair<QString, QString>> headers,
|
||||
QByteArray body,
|
||||
std::function<void(QJsonDocument, QByteArray, QNetworkReply *)> callback);
|
||||
void getData(QUrl target, QList<QPair<QString, QString>> headers, std::function<void(QByteArray, QNetworkReply *)> callback);
|
||||
void postData(QUrl target, QList<QPair<QString, QString>> headers, QByteArray body, std::function<void(QByteArray, QNetworkReply *)> callback);
|
||||
void postMultipart(QUrl target,
|
||||
void getData(QUrl target, QList<QPair<QString, QString>> headers, std::function<void(QByteArray, QNetworkReply *)> callback);
|
||||
void postData(QUrl target, QList<QPair<QString, QString>> headers, QByteArray body, std::function<void(QByteArray, QNetworkReply *)> callback);
|
||||
void postMultipart(QUrl target,
|
||||
QList<QPair<QString, QString>> headers,
|
||||
QHttpMultiPart *body,
|
||||
std::function<void(QJsonDocument, QByteArray, QNetworkReply *)> callback);
|
||||
void postMultipartData(QUrl target,
|
||||
void postMultipartData(QUrl target,
|
||||
QList<QPair<QString, QString>> headers,
|
||||
QHttpMultiPart *body,
|
||||
std::function<void(QByteArray, QNetworkReply *)> callback);
|
||||
QString methodString(QNetworkAccessManager::Operation operation);
|
||||
QString methodString(QNetworkAccessManager::Operation operation);
|
||||
}
|
||||
|
||||
#endif // IOUTILS_HPP
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class HistoryDialog;
|
||||
class HistoryDialog;
|
||||
}
|
||||
|
||||
class HistoryDialog : public QDialog {
|
||||
|
@ -7,15 +7,15 @@
|
||||
|
||||
|
||||
namespace requestlogging {
|
||||
struct RequestContext {
|
||||
struct RequestContext {
|
||||
QByteArray response;
|
||||
QNetworkReply *reply;
|
||||
};
|
||||
};
|
||||
|
||||
class LoggedRequest {
|
||||
class LoggedRequest {
|
||||
friend QList<LoggedRequest> getRequests();
|
||||
|
||||
public:
|
||||
public:
|
||||
QString getUrl() {
|
||||
return url;
|
||||
}
|
||||
@ -32,15 +32,15 @@ public:
|
||||
return QFile(settings::dir().absoluteFilePath("responses/" + time)).readAll();
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
QString url;
|
||||
QString type;
|
||||
QString time;
|
||||
int responseCode;
|
||||
};
|
||||
};
|
||||
|
||||
QList<LoggedRequest> getRequests();
|
||||
void addEntry(RequestContext context);
|
||||
QList<LoggedRequest> getRequests();
|
||||
void addEntry(RequestContext context);
|
||||
}
|
||||
|
||||
#endif // REQUESTLOGGING_HPP
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <uploaders/uploader.hpp>
|
||||
|
||||
namespace Ui {
|
||||
class MainWindow;
|
||||
class MainWindow;
|
||||
}
|
||||
|
||||
class MainWindow : public QMainWindow {
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class MonospaceTextDialog;
|
||||
class MonospaceTextDialog;
|
||||
}
|
||||
|
||||
class MonospaceTextDialog : public QDialog {
|
||||
|
@ -5,8 +5,8 @@
|
||||
#include <QSystemTrayIcon>
|
||||
|
||||
namespace notifications {
|
||||
void notify(QString title, QString body, QSystemTrayIcon::MessageIcon icon = QSystemTrayIcon::Information);
|
||||
void notifyNolog(QString title, QString body, QSystemTrayIcon::MessageIcon icon = QSystemTrayIcon::Information);
|
||||
void notify(QString title, QString body, QSystemTrayIcon::MessageIcon icon = QSystemTrayIcon::Information);
|
||||
void notifyNolog(QString title, QString body, QSystemTrayIcon::MessageIcon icon = QSystemTrayIcon::Information);
|
||||
}
|
||||
|
||||
#endif // NOTIFICATIONS_HPP
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class EncoderSettingsDialog;
|
||||
class EncoderSettingsDialog;
|
||||
}
|
||||
|
||||
class EncoderSettingsDialog : public QDialog {
|
||||
|
@ -2,14 +2,14 @@
|
||||
#define SCREENSHOTTER_HPP
|
||||
|
||||
namespace screenshotter {
|
||||
void fullscreen();
|
||||
void fullscreenDelayed();
|
||||
void fullscreen();
|
||||
void fullscreenDelayed();
|
||||
|
||||
void area();
|
||||
void areaDelayed();
|
||||
void area();
|
||||
void areaDelayed();
|
||||
|
||||
void activeDelayed();
|
||||
void active();
|
||||
void activeDelayed();
|
||||
void active();
|
||||
}
|
||||
|
||||
#endif // SCREENSHOTTER_HPP
|
||||
|
@ -5,12 +5,13 @@
|
||||
#include <QWidget>
|
||||
|
||||
namespace screenshotutil {
|
||||
QPixmap fullscreen(bool cursor = true);
|
||||
QPixmap fullscreenArea(bool cursor = true, qreal x = 0, qreal y = 0, qreal w = -1, qreal h = -1);
|
||||
QPixmap window(WId wid, QScreen *w = QApplication::primaryScreen());
|
||||
void toClipboard(QString value);
|
||||
QPoint smallestScreenCoordinate();
|
||||
QPixmap renderText(QString toRender, int padding = 5, QColor background = Qt::transparent, QColor pen = Qt::white, QFont font = QFont());
|
||||
QPixmap fullscreen(bool cursor = true);
|
||||
QPixmap fullscreenArea(bool cursor = true, qreal x = 0, qreal y = 0, qreal w = -1, qreal h = -1);
|
||||
QPixmap window(WId wid, QScreen *w = QApplication::primaryScreen());
|
||||
void toClipboard(QString value);
|
||||
QPoint smallestScreenCoordinate();
|
||||
QPixmap
|
||||
renderText(QString toRender, int padding = 5, QColor background = Qt::transparent, QColor pen = Qt::white, QFont font = QFont());
|
||||
}
|
||||
|
||||
#endif // SCREENSHOTUTIL_HPP
|
||||
|
@ -5,8 +5,8 @@
|
||||
#include <QSettings>
|
||||
|
||||
namespace settings {
|
||||
QSettings &settings();
|
||||
QDir dir();
|
||||
QSettings &settings();
|
||||
QDir dir();
|
||||
}
|
||||
|
||||
#endif // SETTINGS_HPP
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include <uploaders/uploader.hpp>
|
||||
|
||||
namespace Ui {
|
||||
class SettingsDialog;
|
||||
class SettingsDialog;
|
||||
}
|
||||
|
||||
class SettingsDialog : public QDialog {
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class ImgurSettingsDialog;
|
||||
class ImgurSettingsDialog;
|
||||
}
|
||||
|
||||
class ImgurSettingsDialog : public QDialog {
|
||||
|
Loading…
Reference in New Issue
Block a user