SceneSwitcher/lib/utils/utility.hpp
Przemek Pawlas 01cf000cbe Refactor
* Minor style changes
* Move function definitions
* Split utility.hpp
* Enable include of export-symbol-helper.hpp in tests
2024-02-24 16:47:50 +01:00

32 lines
827 B
C++

#pragma once
#include "export-symbol-helper.hpp"
#include <optional>
#include <QListWidget>
#include <QMetaObject>
#include <QPushButton>
#include <QString>
#include <QWidget>
#include <string>
namespace advss {
EXPORT std::pair<int, int> GetCursorPos();
bool ReplaceAll(std::string &str, const std::string &from,
const std::string &to);
EXPORT std::optional<std::string> GetJsonField(const std::string &json,
const std::string &id);
EXPORT bool CompareIgnoringLineEnding(QString &s1, QString &s2);
std::string ToString(double value);
/* Legacy helpers */
void listAddClicked(QListWidget *list, QWidget *newWidget,
QPushButton *addButton = nullptr,
QMetaObject::Connection *addHighlight = nullptr);
bool listMoveUp(QListWidget *list);
bool listMoveDown(QListWidget *list);
} // namespace advss