Deskflow 1.22.0.197
Keyboard and mouse sharing utility
|
Namespaces | |
namespace | core |
namespace | diagnostic |
namespace | ipc |
namespace | proxy |
Classes | |
class | ClientConnection |
class | CoreProcess |
class | FileTail |
class | IServerConfig |
class | Logger |
class | ServerConnection |
class | ServerMessage |
class | TlsUtility |
Enumerations | |
enum class | ServerProtocol { kSynergy , kBarrier } |
Functions | |
QString | processModeToString (Settings::ProcessMode mode) |
QString | processStateToString (CoreProcess::ProcessState state) |
QString | makeQuotedArgs (const QString &app, const QStringList &args) |
Wraps options that contain spaces in quotes. | |
QString | wrapIpv6 (const QString &address) |
If IPv6, ensures the IP is surround in square brackets. | |
QPair< QString, QString > | getPair (const QString &line) |
bool | open (QFile &file, const QString &filePath) |
void | dotenv (const QString &filename) |
A very basic Qt .env file parser. | |
QString | stripQuotes (const QString &value) |
QString | printLine (FILE *out, const QString &type, const QString &message, const QString &fileLine="") |
void | logVerbose (const QString &message) |
bool | isDarkMode () |
Detects dark mode in a universal manner (all Qt versions). Until better platform support is added, it's more reliable to use the old way (compare text and window lightness), because the newer versions in Qt 6.5+ are not always correct and some return UnknownScheme. https://www.qt.io/blog/dark-mode-on-windows-11-with-qt-6.5. | |
QString | iconMode () |
get a string for the iconMode |
Variables | |
const int | kRetryDelay = 1000 |
const auto | kServerConfigFilename = QStringLiteral("%1-server.conf").arg(kAppId) |
const auto | kLineSplitRegex = QRegularExpression("\r|\n|\r\n") |
const QString | kDefaultEnvFilename = ".env" |
const auto | kForceDebugMessages |
const auto | kDefaultProtocol = ServerProtocol::kBarrier |
const auto | kColorWhite = "#ffffff" |
const auto | kColorSecondary = "#4285f4" |
const auto | kColorTertiary = "#33b2cc" |
const auto | kColorError = "#ec4c47" |
const auto | kColorLightGrey = "#666666" |
const auto | kStyleLink |
const auto | kStyleLineEditErrorBorder |
const auto | kStyleErrorActiveLabel |
const auto | kStyleErrorInactiveLabel |
const auto | kStyleFlatButton = QStringLiteral("QAbstractButton{background-color: none; border: none;}") |
const auto | kStyleFlatButtonHoverable |
|
strong |
void deskflow::gui::dotenv | ( | const QString & | filename | ) |
A very basic Qt .env file parser.
Loads environment variables from a .env file.
This function re-invents the wheel to save adding a library dependency. It does not support many things that a proper .env parser would, such as trailing comments, escaping characters, multiline values, etc.
If this function is not sufficient, replace it with a library such as: https://github.com/adeharo9/cpp-dotenv
First checks current dir for .env, then looks in the app dir.
QPair< QString, QString > deskflow::gui::getPair | ( | const QString & | line | ) |
|
inline |
get a string for the iconMode
|
inline |
Detects dark mode in a universal manner (all Qt versions). Until better platform support is added, it's more reliable to use the old way (compare text and window lightness), because the newer versions in Qt 6.5+ are not always correct and some return UnknownScheme. https://www.qt.io/blog/dark-mode-on-windows-11-with-qt-6.5.
|
inline |
QString deskflow::gui::makeQuotedArgs | ( | const QString & | app, |
const QStringList & | args ) |
Wraps options that contain spaces in quotes.
Useful to handle things like paths with spaces (e.g. "C:\Program Files").
Can also be used to create a representation of a command that can be pasted into a terminal.
bool deskflow::gui::open | ( | QFile & | file, |
const QString & | filePath ) |
QString deskflow::gui::printLine | ( | FILE * | out, |
const QString & | type, | ||
const QString & | message, | ||
const QString & | fileLine = "" ) |
QString deskflow::gui::processModeToString | ( | Settings::ProcessMode | mode | ) |
QString deskflow::gui::processStateToString | ( | CoreProcess::ProcessState | state | ) |
QString deskflow::gui::stripQuotes | ( | const QString & | value | ) |
QString deskflow::gui::wrapIpv6 | ( | const QString & | address | ) |
If IPv6, ensures the IP is surround in square brackets.
const auto deskflow::gui::kColorError = "#ec4c47" |
const auto deskflow::gui::kColorLightGrey = "#666666" |
const auto deskflow::gui::kColorSecondary = "#4285f4" |
const auto deskflow::gui::kColorTertiary = "#33b2cc" |
const auto deskflow::gui::kColorWhite = "#ffffff" |
const QString deskflow::gui::kDefaultEnvFilename = ".env" |
const auto deskflow::gui::kDefaultProtocol = ServerProtocol::kBarrier |
const auto deskflow::gui::kForceDebugMessages |
const auto deskflow::gui::kLineSplitRegex = QRegularExpression("\r|\n|\r\n") |
const int deskflow::gui::kRetryDelay = 1000 |
const auto deskflow::gui::kServerConfigFilename = QStringLiteral("%1-server.conf").arg(kAppId) |
const auto deskflow::gui::kStyleErrorActiveLabel |
const auto deskflow::gui::kStyleErrorInactiveLabel |
const auto deskflow::gui::kStyleFlatButton = QStringLiteral("QAbstractButton{background-color: none; border: none;}") |
const auto deskflow::gui::kStyleFlatButtonHoverable |
const auto deskflow::gui::kStyleLineEditErrorBorder |
const auto deskflow::gui::kStyleLink |