id
int64
0
755k
file_name
stringlengths
3
109
file_path
stringlengths
13
185
content
stringlengths
31
9.38M
size
int64
31
9.38M
language
stringclasses
1 value
extension
stringclasses
11 values
total_lines
int64
1
340k
avg_line_length
float64
2.18
149k
max_line_length
int64
7
2.22M
alphanum_fraction
float64
0
1
repo_name
stringlengths
6
65
repo_stars
int64
100
47.3k
repo_forks
int64
0
12k
repo_open_issues
int64
0
3.4k
repo_license
stringclasses
9 values
repo_extraction_date
stringclasses
92 values
exact_duplicates_redpajama
bool
2 classes
near_duplicates_redpajama
bool
2 classes
exact_duplicates_githubcode
bool
2 classes
exact_duplicates_stackv2
bool
1 class
exact_duplicates_stackv1
bool
2 classes
near_duplicates_githubcode
bool
2 classes
near_duplicates_stackv1
bool
2 classes
near_duplicates_stackv2
bool
1 class
18,298
sleeptimer.h
hluk_CopyQ/src/common/sleeptimer.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef SLEEPTIMER_H #define SLEEPTIMER_H #include <QCoreApplication> #include <QElapsedTimer> class SleepTimer final { public: explicit SleepTimer(int timeoutMs, int minSleepCount = 2) : m_timeoutMs(timeoutMs) , m_minSleepCount(minSleepCount) { m_timer.start(); } bool sleep() { if (m_minSleepCount <= 0 && m_timer.elapsed() >= m_timeoutMs) return false; --m_minSleepCount; QCoreApplication::processEvents(QEventLoop::AllEvents, 5); return true; } private: QElapsedTimer m_timer; int m_timeoutMs; int m_minSleepCount = 2; }; inline void waitFor(int ms) { SleepTimer t(ms); while (t.sleep()) {} } #endif // SLEEPTIMER_H
786
C++
.h
33
19.151515
69
0.66129
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,299
appconfig.h
hluk_CopyQ/src/common/appconfig.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef APPCONFIG_H #define APPCONFIG_H #include "common/navigationstyle.h" #include "common/settings.h" class QString; class QVariant; QString defaultClipboardTabName(); namespace Config { const int maxItems = 100'000; template<typename ValueType> struct Config { using Value = ValueType; static Value defaultValue() { return Value(); } static Value value(Value v) { return v; } static const char *description() { return nullptr; } }; struct autostart : Config<bool> { static QString name() { return QStringLiteral("autostart"); } static Value defaultValue(); }; struct maxitems : Config<int> { static QString name() { return QStringLiteral("maxitems"); } static Value defaultValue() { return 200; } static Value value(Value v) { return qBound(0, v, maxItems); } }; struct item_data_threshold : Config<int> { static QString name() { return QStringLiteral("item_data_threshold"); } static Value defaultValue() { return 1024; } static const char *description() { return "Maximum item data size in bytes to save in tab data file" " (larger data are stored in separate files)"; } }; struct clipboard_tab : Config<QString> { static QString name() { return QStringLiteral("clipboard_tab"); } static Value defaultValue() { return defaultClipboardTabName(); } }; struct expire_tab : Config<int> { static QString name() { return QStringLiteral("expire_tab"); } }; struct editor : Config<QString> { static QString name() { return QStringLiteral("editor"); } static Value defaultValue(); }; struct item_popup_interval : Config<int> { static QString name() { return QStringLiteral("item_popup_interval"); } }; struct notification_position : Config<int> { static QString name() { return QStringLiteral("notification_position"); } static Value defaultValue() { return 3; } }; struct clipboard_notification_lines : Config<int> { static QString name() { return QStringLiteral("clipboard_notification_lines"); } static Value value(Value v) { return qBound(0, v, 100); } }; struct notification_horizontal_offset : Config<int> { static QString name() { return QStringLiteral("notification_horizontal_offset"); } static Value defaultValue() { return 10; } }; struct notification_vertical_offset : Config<int> { static QString name() { return QStringLiteral("notification_vertical_offset"); } static Value defaultValue() { return 10; } }; struct notification_maximum_width : Config<int> { static QString name() { return QStringLiteral("notification_maximum_width"); } static Value defaultValue() { return 300; } }; struct notification_maximum_height : Config<int> { static QString name() { return QStringLiteral("notification_maximum_height"); } static Value defaultValue() { return 100; } }; struct edit_ctrl_return : Config<bool> { static QString name() { return QStringLiteral("edit_ctrl_return"); } static Value defaultValue() { return true; } }; struct move : Config<bool> { static QString name() { return QStringLiteral("move"); } static Value defaultValue() { return true; } }; struct show_simple_items : Config<bool> { static QString name() { return QStringLiteral("show_simple_items"); } static Value defaultValue() { return false; } }; struct number_search : Config<bool> { static QString name() { return QStringLiteral("number_search"); } static Value defaultValue() { return false; } }; struct check_clipboard : Config<bool> { static QString name() { return QStringLiteral("check_clipboard"); } static Value defaultValue() { return true; } }; struct confirm_exit : Config<bool> { static QString name() { return QStringLiteral("confirm_exit"); } static Value defaultValue() { return true; } }; struct navigation_style : Config<NavigationStyle> { static QString name() { return QStringLiteral("navigation_style"); } }; struct save_filter_history : Config<bool> { static QString name() { return QStringLiteral("save_filter_history"); } }; struct filter_regular_expression : Config<bool> { static QString name() { return QStringLiteral("filter_regular_expression"); } static Value defaultValue() { return false; } static const char *description() { return "Use regular expressions to search items"; } }; struct filter_case_insensitive : Config<bool> { static QString name() { return QStringLiteral("filter_case_insensitive"); } static Value defaultValue() { return true; } static const char *description() { return "Use case-insensitive item search"; } }; struct always_on_top : Config<bool> { static QString name() { return QStringLiteral("always_on_top"); } }; struct close_on_unfocus : Config<bool> { static QString name() { return QStringLiteral("close_on_unfocus"); } static Value defaultValue() { return true; } }; struct close_on_unfocus_delay_ms : Config<int> { static QString name() { return QStringLiteral("close_on_unfocus_delay_ms"); } static Value defaultValue() { return 500; } static const char *description() { return "Delay to close the main window when unfocused/deactivated"; } }; struct open_windows_on_current_screen : Config<bool> { static QString name() { return QStringLiteral("open_windows_on_current_screen"); } static Value defaultValue() { return true; } }; struct restore_geometry : Config<bool> { static QString name() { return QStringLiteral("restore_geometry"); } static Value defaultValue() { return true; } static const char *description() { return "Restore position and size for the main window and other dialogs"; } }; struct transparency_focused : Config<int> { static QString name() { return QStringLiteral("transparency_focused"); } static Value value(Value v) { return qBound(0, v, 100); } }; struct transparency : Config<int> { static QString name() { return QStringLiteral("transparency"); } static Value value(Value v) { return qBound(0, v, 100); } }; struct hide_tabs : Config<bool> { static QString name() { return QStringLiteral("hide_tabs"); } }; struct hide_toolbar : Config<bool> { static QString name() { return QStringLiteral("hide_toolbar"); } }; struct hide_toolbar_labels : Config<bool> { static QString name() { return QStringLiteral("hide_toolbar_labels"); } static Value defaultValue() { return true; } }; struct disable_tray : Config<bool> { static QString name() { return QStringLiteral("disable_tray"); } }; struct hide_main_window : Config<bool> { static QString name() { return QStringLiteral("hide_main_window"); } }; struct hide_main_window_in_task_bar : Config<bool> { static QString name() { return QStringLiteral("hide_main_window_in_task_bar"); } static Value defaultValue() { return false; } static const char *description() { return "Avoid showing entry for the main window in the task bar"; } }; struct tab_tree : Config<bool> { static QString name() { return QStringLiteral("tab_tree"); } }; struct show_tab_item_count : Config<bool> { static QString name() { return QStringLiteral("show_tab_item_count"); } }; struct text_wrap : Config<bool> { static QString name() { return QStringLiteral("text_wrap"); } static Value defaultValue() { return true; } }; struct text_tab_width : Config<int> { static QString name() { return QStringLiteral("text_tab_width"); } static Value defaultValue() { return 8; } static const char *description() { return "Width of Tab character in number of spaces"; } }; struct activate_item_with_single_click : Config<bool> { static QString name() { return QStringLiteral("activate_item_with_single_click"); } static Value defaultValue() { return false; } }; struct activate_closes : Config<bool> { static QString name() { return QStringLiteral("activate_closes"); } static Value defaultValue() { return true; } }; struct activate_focuses : Config<bool> { static QString name() { return QStringLiteral("activate_focuses"); } static Value defaultValue() { return true; } }; struct activate_pastes : Config<bool> { static QString name() { return QStringLiteral("activate_pastes"); } static Value defaultValue() { return true; } }; struct tray_items : Config<int> { static QString name() { return QStringLiteral("tray_items"); } static Value defaultValue() { return 5; } static Value value(Value v) { return qBound(0, v, 99); } }; struct tray_item_paste : Config<bool> { static QString name() { return QStringLiteral("tray_item_paste"); } static Value defaultValue() { return true; } }; struct tray_commands : Config<bool> { static QString name() { return QStringLiteral("tray_commands"); } static Value defaultValue() { return true; } }; struct tray_tab_is_current : Config<bool> { static QString name() { return QStringLiteral("tray_tab_is_current"); } static Value defaultValue() { return true; } }; struct tray_images : Config<bool> { static QString name() { return QStringLiteral("tray_images"); } static Value defaultValue() { return true; } }; struct tray_menu_open_on_left_click : Config<bool> { static QString name() { return QStringLiteral("tray_menu_open_on_left_click"); } static Value defaultValue() { return false; } static const char *description() { return "Open tray menu on left mouse button"; } }; struct tray_tab : Config<QString> { static QString name() { return QStringLiteral("tray_tab"); } }; struct command_history_size : Config<int> { static QString name() { return QStringLiteral("command_history_size"); } static Value defaultValue() { return 100; } static const char *description() { return "Number of commands to keep in action dialog history"; } }; struct check_selection : Config<bool> { static QString name() { return QStringLiteral("check_selection"); } }; struct copy_clipboard : Config<bool> { static QString name() { return QStringLiteral("copy_clipboard"); } }; struct copy_selection : Config<bool> { static QString name() { return QStringLiteral("copy_selection"); } }; struct run_selection : Config<bool> { static QString name() { return QStringLiteral("run_selection"); } static Value defaultValue() { return true; } }; struct tabs : Config<QStringList> { static QString name() { return QStringLiteral("tabs"); } static Value value(Value v) { v.removeAll(QString()); v.removeDuplicates(); return v; } static const char *description() { return "Ordered list of tabs"; } }; struct show_advanced_command_settings : Config<bool> { static QString name() { return QStringLiteral("show_advanced_command_settings"); } static Value defaultValue() { return false; } static const char *description() { return "Show advanced command configuration in Command dialog"; } }; struct autocompletion : Config<bool> { static QString name() { return QStringLiteral("autocompletion"); } static Value defaultValue() { return true; } }; struct max_process_manager_rows : Config<uint> { static QString name() { return QStringLiteral("max_process_manager_rows"); } static Value defaultValue() { return 1000; } static const char *description() { return "Maximum number of rows in process manager dialog"; } }; struct save_delay_ms_on_item_added : Config<int> { static QString name() { return QStringLiteral("save_delay_ms_on_item_added"); } static Value defaultValue() { return 5 * 60 * 1000; } static const char *description() { return "Tab save delay after an item is added to the tab"; } }; struct save_delay_ms_on_item_modified : Config<int> { static QString name() { return QStringLiteral("save_delay_ms_on_item_modified"); } static Value defaultValue() { return 5 * 60 * 1000; } static const char *description() { return "Tab save delay after an item is modified in the tab"; } }; struct save_delay_ms_on_item_removed : Config<int> { static QString name() { return QStringLiteral("save_delay_ms_on_item_removed"); } static Value defaultValue() { return 10 * 60 * 1000; } static const char *description() { return "Tab save delay after an item is removed from the tab"; } }; struct save_delay_ms_on_item_moved : Config<int> { static QString name() { return QStringLiteral("save_delay_ms_on_item_moved"); } static Value defaultValue() { return 30 * 60 * 1000; } static const char *description() { return "Tab save delay after an item is moved in the tab"; } }; struct save_delay_ms_on_item_edited : Config<int> { static QString name() { return QStringLiteral("save_delay_ms_on_item_edited"); } static Value defaultValue() { return 1000; } static const char *description() { return "Tab save delay after an item is edited in the tab"; } }; struct save_on_app_deactivated : Config<bool> { static QString name() { return QStringLiteral("save_on_app_deactivated"); } static Value defaultValue() { return true; } static const char *description() { return "Save unsaved tabs immediately after the app is deactivated (main window loses focus)"; } }; struct native_menu_bar : Config<bool> { static QString name() { return QStringLiteral("native_menu_bar"); } #ifdef Q_OS_MAC // Native menu bar doesn't show on macOS. // See: https://github.com/hluk/CopyQ/issues/1444 static Value defaultValue() { return false; } #else static Value defaultValue() { return true; } #endif static const char *description() { return "Use native menu bar, otherwise the menu bar shows in the main window"; } }; struct native_tray_menu : Config<bool> { static QString name() { return QStringLiteral("native_tray_menu"); } static Value defaultValue() { return false; } static const char *description() { return "Use native tray menu (menu items search may not work)"; } }; struct script_paste_delay_ms : Config<int> { static QString name() { return QStringLiteral("script_paste_delay_ms"); } static Value defaultValue() { return 250; } static const char *description() { return "Delay after pasting from script (when using `paste()`)"; } }; struct window_paste_with_ctrl_v_regex : Config<QString> { static QString name() { return QStringLiteral("window_paste_with_ctrl_v_regex"); } static const char *description() { return "Regular expression matching window titles where Ctrl+V should be used for pasting" " instead of the default Shift+Insert"; } }; struct window_wait_before_raise_ms : Config<int> { static QString name() { return QStringLiteral("window_wait_before_raise_ms"); } #ifdef Q_OS_WIN static Value defaultValue() { return 0; } #else static Value defaultValue() { return 20; } #endif static const char *description() { return "Delay before trying to raise target window for pasting"; } }; struct window_wait_raised_ms : Config<int> { static QString name() { return QStringLiteral("window_wait_raised_ms"); } static Value defaultValue() { return 150; } static const char *description() { return "Wait interval for raising target window for pasting"; } }; struct window_wait_after_raised_ms : Config<int> { static QString name() { return QStringLiteral("window_wait_after_raised_ms"); } #ifdef Q_OS_WIN static Value defaultValue() { return 150; } #elif defined(Q_OS_MAC) static Value defaultValue() { return 0; } #else static Value defaultValue() { return 50; } #endif static const char *description() { return "Delay after raising target window for pasting"; } }; struct window_key_press_time_ms : Config<int> { static QString name() { return QStringLiteral("window_key_press_time_ms"); } #ifdef Q_OS_WIN static Value defaultValue() { return 0; } #elif defined(Q_OS_MAC) static Value defaultValue() { return 100; } #else static Value defaultValue() { return 50; } #endif static const char *description() { return "Interval to keep simulated keys (Shift+Insert) pressed for pasting" " (needed for some apps)"; } }; struct window_wait_for_modifier_released_ms : Config<int> { static QString name() { return QStringLiteral("window_wait_for_modifier_released_ms"); } static Value defaultValue() { return 2000; } static const char *description() { return "Wait for any keyboard modifiers to be released before simulating/sending" " shortcut for pasting"; } }; struct update_clipboard_owner_delay_ms : Config<int> { static QString name() { return QStringLiteral("update_clipboard_owner_delay_ms"); } static Value defaultValue() { return -1; } static const char *description() { return "Delay to update new clipboard owner window title" " (use negative value for the default interval)"; } }; struct row_index_from_one : Config<bool> { static QString name() { return QStringLiteral("row_index_from_one"); } static Value defaultValue() { return true; } static const char *description() { return "Index items/rows in UI starting from 1 instead of 0" " (in scripts, rows are always indexed from 0)"; } }; struct style : Config<QString> { static QString name() { return QStringLiteral("style"); } static const char *description() { return "Current application style (available styles can be listed with `copyq styles` command)"; } }; struct native_notifications : Config<bool> { static QString name() { return QStringLiteral("native_notifications"); } static Value defaultValue() { return true; } }; } // namespace Config class AppConfig final { public: QVariant option(const QString &name) const; template <typename T> T option(const QString &name, T defaultValue) const { const QVariant value = option(name); return value.isValid() ? value.value<T>() : defaultValue; } template <typename T> typename T::Value option() const { typename T::Value value = option(T::name(), T::defaultValue()); return T::value(value); } void setOption(const QString &name, const QVariant &value); void removeOption(const QString &name); Settings &settings() { return m_settings; } private: Settings m_settings; }; #endif // APPCONFIG_H
18,630
C++
.h
464
36.140086
104
0.698301
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,300
temporaryfile.h
hluk_CopyQ/src/common/temporaryfile.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef TEMPORARYFILE_H #define TEMPORARYFILE_H class QString; class QTemporaryFile; bool openTemporaryFile(QTemporaryFile *file, const QString &suffix); #endif // TEMPORARYFILE_H
228
C++
.h
7
31.142857
68
0.825688
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,301
sanitize_text_document.h
hluk_CopyQ/src/common/sanitize_text_document.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef SANITIZE_TEXT_DOCUMENT_H #define SANITIZE_TEXT_DOCUMENT_H class QTextDocument; void sanitizeTextDocument(QTextDocument *document); #endif // SANITIZE_TEXT_DOCUMENT_H
223
C++
.h
6
35.5
51
0.826291
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,302
predefinedcommands.h
hluk_CopyQ/src/common/predefinedcommands.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef PREDEFINEDCOMMANDS_H #define PREDEFINEDCOMMANDS_H #include "common/command.h" #include <QtContainerFwd> QVector<Command> predefinedCommands(); #endif // PREDEFINEDCOMMANDS_H
232
C++
.h
7
31.428571
44
0.822727
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,303
temporarysettings.h
hluk_CopyQ/src/common/temporarysettings.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef TEMPORARYSETTINGS_H #define TEMPORARYSETTINGS_H #include <QSettings> /** * Temporary ini settings which is removed after destroyed. * * Use this to get ini as data instead of saving to a file. */ class TemporarySettings final { public: /// Creates temporary settings file. explicit TemporarySettings(const QByteArray &content = QByteArray()); /// Destroys underlying settings and removes settings file. ~TemporarySettings(); /// Returns underlying settings. QSettings *settings(); /// Return content of settings file. QByteArray content(); TemporarySettings(const TemporarySettings &) = delete; TemporarySettings &operator=(const TemporarySettings &) = delete; private: QSettings *m_settings; }; #endif // TEMPORARYSETTINGS_H
837
C++
.h
26
28.961538
73
0.752809
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,304
action.h
hluk_CopyQ/src/common/action.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef ACTION_H #define ACTION_H #include <QStringList> #include <QVariantMap> class QAction; class QProcess; /** * Terminate process or kill if it takes too long. */ void terminateProcess(QProcess *p); /** * Execute external program and emits signals * to create or change items from the program's stdout. */ class Action final : public QObject { Q_OBJECT public: /** Create action with command line parameters. */ explicit Action(QObject *parent = nullptr); ~Action(); /** Return true only if command execution failed. */ bool actionFailed() const { return m_failed; } /** Return standard error output string. */ const QByteArray &errorOutput() const { return m_errorOutput; } /** Return command line. */ QString commandLine() const; /// Set command and texts to be placed as %2..%9 in command. void setCommand(const QString &commandLine, const QStringList &arguments = QStringList()); /// Set command with arguments. void setCommand(const QStringList &arguments); /// Return programs and arguments. const QList<QList<QStringList>> &command() const { return m_cmds; } /** Return input. */ const QByteArray &input() const { return m_input; } void setInput(const QByteArray &input) { m_input = input; } /** Set data for input and input format. */ void setInputWithFormat(const QVariantMap &data, const QString &inputFormat); /** Return input formats. */ const QStringList &inputFormats() const { return m_inputFormats; } /** Set working directory path (default is empty so it doesn't change working directory). */ void setWorkingDirectory(const QString &path) { m_workingDirectoryPath = path; } /** Execute command. */ void start(); bool waitForFinished(int msecs = -1); bool isRunning() const; /** Set human-readable name for action. */ void setName(const QString &actionName) { m_name = actionName; } /** Return human-readable name for action. */ QString name() const { return m_name; } void setExitCode(int exitCode) { m_exitCode = exitCode; } int exitCode() const { return m_exitCode; } QString errorString() const { return m_errorString; } void setData(const QVariantMap &data); const QVariantMap &data() const; void setId(int actionId) { m_id = actionId; } int id() const { return m_id; } void setReadOutput(bool read) { m_readOutput = read; } void appendOutput(const QByteArray &output); void appendErrorOutput(const QByteArray &errorOutput); /** Terminate (kill) process. */ void terminate(); signals: /** Emitted when finished. */ void actionFinished(Action *act); /** Emitter when started. */ void actionStarted(Action *act); void actionOutput(const QByteArray &output); private: void onSubProcessError(int error); void onSubProcessStarted(); void onSubProcessFinished(); void onSubProcessOutput(); void onSubProcessErrorOutput(); void writeInput(); void onBytesWritten(); void closeSubCommands(); void finish(); QByteArray m_input; QList< QList<QStringList> > m_cmds; QStringList m_inputFormats; QString m_workingDirectoryPath; QByteArray m_errorOutput; bool m_failed; bool m_readOutput = false; int m_currentLine; QString m_name; QVariantMap m_data; QList<QProcess*> m_processes; int m_exitCode; QString m_errorString; int m_id = -1; }; #endif // ACTION_H
3,546
C++
.h
95
32.831579
96
0.699649
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,305
commandstatus.h
hluk_CopyQ/src/common/commandstatus.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef COMMANDSTATUS_H #define COMMANDSTATUS_H /** Command status. */ enum CommandStatus { /** Script finished */ CommandFinished = 0, /** Script finished with exit code 1 (fail() was called) */ CommandError = 1, /** Bad command syntax */ CommandBadSyntax = 2, /** Exception thrown */ CommandException = 4, /** Print on stdout */ CommandPrint = 5, CommandFunctionCall = 8, CommandFunctionCallReturnValue = 9, CommandStop = 10, CommandInputDialogFinished = 11, CommandData = 12, CommandReceiveData = 13, }; #endif // COMMANDSTATUS_H
651
C++
.h
23
24.130435
63
0.680129
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,306
compatibility.h
hluk_CopyQ/src/common/compatibility.h
#pragma once #include <QtGlobal> #if QT_VERSION >= QT_VERSION_CHECK(5,14,0) # define SKIP_EMPTY_PARTS Qt::SkipEmptyParts #else # define SKIP_EMPTY_PARTS QString::SkipEmptyParts #endif
190
C++
.h
7
25.857143
51
0.773481
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,307
textdata.h
hluk_CopyQ/src/common/textdata.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef TEXTDATA_H #define TEXTDATA_H #include <QVariantMap> class QByteArray; class QString; uint hash(const QVariantMap &data); QString quoteString(const QString &str); QString escapeHtml(const QString &str); QString getTextData(const QByteArray &bytes); /** * Get given text format from data; null string if not available. * Assumes that text data is UTF8 encoded. */ QString getTextData(const QVariantMap &data, const QString &mime); /** Helper function that calls getTextData(data, "text/plain"). */ QString getTextData(const QVariantMap &data); void setTextData(QVariantMap *data, const QString &text, const QString &mime); void setTextData(QVariantMap *data, const QString &text); QVariantMap createDataMap(const QString &format, const QVariant &value); QVariantMap createDataMap(const QString &format, const QByteArray &value); QVariantMap createDataMap(const QString &format, const QString &value); /// Returns text without accents/diacritics. QString accentsRemoved(const QString &text); #endif // TEXTDATA_H
1,083
C++
.h
25
41.56
78
0.801344
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,308
settings.h
hluk_CopyQ/src/common/settings.h
// SPDX-License-Identifier: GPL-3.0-or-later #pragma once #include <QSettings> class QString; /** * Simple wrapper class for QSettings. */ class Settings final : public QSettings { public: Settings(); explicit Settings(const QString &path); Settings(const Settings &) = delete; Settings &operator=(const Settings &) = delete; };
353
C++
.h
15
20.933333
51
0.728916
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,309
command.h
hluk_CopyQ/src/common/command.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef COMMAND_H #define COMMAND_H #include <QString> #include <QStringList> #include <QRegularExpression> namespace CommandType { enum CommandType { None = 0, Invalid = 1, Automatic = 1 << 1, GlobalShortcut = 1 << 2, Menu = 1 << 3, Script = 1 << 4, Display = 1 << 5, Disabled = 1 << 6 }; } // namespace CommandType /** * Command for matched items. * * Executes an command for matched items. * Possible commands are (can be combined): * * execute program, * * copy item to other tab or * * don't add new item to list. */ struct Command { bool operator==(const Command &other) const; bool operator!=(const Command &other) const; int type() const; /** Name or short description. Used for menu item. */ QString name; /** Regular expression to match items (empty matches all). */ QRegularExpression re; /** Regular expression to match window titles (empty matches all). */ QRegularExpression wndre; /** * Program to execute to match items. * Contains space separated list of arguments. * Item is passed to stdin of the program. */ QString matchCmd; /** * Program to execute on matched items. * Contains space separated list of arguments. * Argument %1 stands for item text. */ QString cmd; /** Separator for output items. */ QString sep; /** * If not empty send item text to program's standard input. * Also match only items with this format (match all if empty). */ QString input; /** MIME for new items created from program's stdout. */ QString output; /** Open action dialog before executing program. */ bool wait = false; /** If true run command automatically on new matched items. */ bool automatic = false; /** If true, run command automatically when displaying matched items. */ bool display = false; /** If true show command in context menu on matching items. */ bool inMenu = false; /** If true command can be triggered by global shortcut. */ bool isGlobalShortcut = false; /** If true, overrides scripting functionality. */ bool isScript = false; /** If true change item data, don't create any new items. */ bool transform = false; /** If true remove matched items. */ bool remove = false; /** If true close window after command is activated from menu. */ bool hideWindow = false; /** If false command is disabled and should not be used. */ bool enable = true; /** Icon for menu item. */ QString icon; /** Shortcut for menu item. */ QStringList shortcuts; /** Global/system shortcut. */ QStringList globalShortcuts; /** Copy item to other tab (automatically on new matched item). */ QString tab; /** Tab for output items. */ QString outputTab; QString internalId; }; QDataStream &operator<<(QDataStream &out, const Command &command); QDataStream &operator>>(QDataStream &in, Command &command); namespace Private { #if QT_VERSION >= QT_VERSION_CHECK(6,0,0) constexpr bool testCommandMetaType() { return QTypeTraits::has_stream_operator_v<QDataStream, Command>; } constexpr const bool testCommandMetaTypeOk = testCommandMetaType(); static_assert(testCommandMetaTypeOk, ""); #endif } #if QT_VERSION < QT_VERSION_CHECK(6,0,0) Q_DECLARE_METATYPE(Command) #endif #endif // COMMAND_H
3,465
C++
.h
106
28.537736
76
0.68231
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,310
clipboardmode.h
hluk_CopyQ/src/common/clipboardmode.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef CLIPBOARDMODE_H #define CLIPBOARDMODE_H enum class ClipboardMode { Clipboard, Selection, }; #endif // CLIPBOARDMODE_H
182
C++
.h
8
20.375
44
0.77193
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,311
display.h
hluk_CopyQ/src/common/display.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef DISPLAY_H #define DISPLAY_H class QPoint; class QWidget; int smallIconSize(); QPoint toScreen(QPoint pos, QWidget *w); int pointsToPixels(int points, QWidget *w = nullptr); #endif // DISPLAY_H
252
C++
.h
9
26.333333
53
0.780591
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,312
option.h
hluk_CopyQ/src/common/option.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef OPTION_H #define OPTION_H #include <QVariant> class QObject; /** * Configuration option. */ class Option final { public: Option(); /** * Create option with a default value. * Current value is taken from object's property. */ explicit Option( const QVariant &default_value, const char *property_name, QObject *obj ); explicit Option( const QVariant &default_value, const char *description = nullptr ); /** Return current value. */ QVariant value() const; /** Set current value. */ bool setValue(const QVariant &value); /** Reset option to default value. */ void reset(); /** * Tooltip for option. * This text is taken from toolTip property of a QObject which was passed * to constructor. */ QString tooltip() const; private: QVariant m_default_value; QVariant m_value; const char *m_property_name = nullptr; const char *m_description = nullptr; QObject *m_obj = nullptr; }; #endif // OPTION_H
1,118
C++
.h
44
20.477273
77
0.645951
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,313
common.h
hluk_CopyQ/src/common/common.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef COMMON_H #define COMMON_H #include <QtGlobal> // Q_WS_* #include <QStringList> #include <QVariantMap> class QByteArray; class QDropEvent; class QFont; class QKeyEvent; class QMimeData; class QProcess; class QString; bool isMainThread(); QByteArray makeClipboardOwnerData(); /** Clone data for given formats (text or HTML will be UTF8 encoded). */ QVariantMap cloneData(const QMimeData &data, QStringList formats, const long int *clipboardSequenceNumber = nullptr); /** Clone all data as is. */ QVariantMap cloneData(const QMimeData &data); QString cloneText(const QMimeData &data); QMimeData* createMimeData(const QVariantMap &data); /** Return true if clipboard content was created by any session of this application. */ bool anySessionOwnsClipboardData(const QVariantMap &data); /** * Elide text with given font or to maximum length * * @param text text to shorten * @param format optional format for result, e.g. "-- %1 --" * @param font used to calculate ideal width if @a maxChars is zero or negative * @param escapeAmpersands escape ampersands because only key hint can follow it * @param maxWidthPixels maximum width of result text in pixels * @param maxLines maximum number of lines * * @return shortened text (or same text if not too long) */ QString elideText(const QString &text, const QFont &font, const QString &format, bool escapeAmpersands = false, int maxWidthPixels = -1, int maxLines = 1); /** * Show small label for data. * * @param data data * @param font font for label * @param format optional format for result, e.g. "-- %1 --" * @param escapeAmpersands escape ampersand characters for labes * (unescaped ampersand is used for shortcut key in labels) * @param maxWidthPixels maximum width in pixels * @param maxLines maximum number of lines * * @return result text */ QString textLabelForData(const QVariantMap &data, const QFont &font, const QString &format, bool escapeAmpersands = false, int maxWidthPixels = -1, int maxLines = 1); QString textLabelForData(const QVariantMap &data); void renameToUnique(QString *name, const QStringList &names); QString dataToText(const QByteArray &bytes, const QString &mime = QString()); bool isClipboardData(const QVariantMap &data); /** * Handle key for Vi mode. */ bool handleViKey(QKeyEvent *event, QObject *eventReceiver); /** * Handle key for Emacs mode. */ bool handleEmacsKey(QKeyEvent *event, QObject *eventReceiver); /** * Return true only if tabs can accept the drag'n'drop event. */ bool canDropToTab(const QDropEvent &event); /** * Accept any proposed drop action, preferably "move" if items data available. */ void acceptDrag(QDropEvent *event); #endif // COMMON_H
2,896
C++
.h
75
35.773333
117
0.731071
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,314
globalshortcutcommands.h
hluk_CopyQ/src/common/globalshortcutcommands.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef GLOBALSHORTCUTCOMMANDS_H #define GLOBALSHORTCUTCOMMANDS_H #include "common/command.h" #include <QtContainerFwd> class QString; QVector<Command> globalShortcutCommands(); QString pasteAsPlainTextScript(const QString &what); #endif // GLOBALSHORTCUTCOMMANDS_H
318
C++
.h
9
33.555556
52
0.84106
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,315
contenttype.h
hluk_CopyQ/src/common/contenttype.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef CONTENTTYPE_H #define CONTENTTYPE_H #include <Qt> /** * Enum values are used in ClipboardModel class to fetch or set data from ClipboardItem. * @see ClipboardModel:setData(), ClipboardModel::data() */ namespace contentType { enum { /** * Set/get data as QVarianMap (key is MIME type and value is QByteArray). */ data = Qt::UserRole, /** * Update existing data. Clears non-internal data if passed data map contains non-internal data. */ updateData, /** * Remove formats (QStringList of MIME types). */ removeFormats, hasText, hasHtml, text, html, notes, /// Item color (string expression as used in themes). color, /// If true, hide content of item (not notes, tags etc.). isHidden }; } #endif // CONTENTTYPE_H
867
C++
.h
34
21.441176
100
0.672749
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,316
server.h
hluk_CopyQ/src/common/server.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef SERVER_H #define SERVER_H #include <QMetaType> #include <QObject> #include <memory> class ClientSocket; class QEventLoop; class QLocalServer; using ClientSocketPtr = std::shared_ptr<ClientSocket>; Q_DECLARE_METATYPE(ClientSocketPtr) class Server final : public QObject { Q_OBJECT public: explicit Server(const QString &name, QObject *parent = nullptr); ~Server(); void start(); bool isListening() const; void close(); signals: void newConnection(const ClientSocketPtr &socket); private: void onNewConnection(); void onSocketDestroyed(); struct PrivateData; std::unique_ptr<PrivateData> m_data; }; #endif // SERVER_H
727
C++
.h
29
22.068966
68
0.754386
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,317
tabs.h
hluk_CopyQ/src/common/tabs.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef TABS_H #define TABS_H #include <QString> #include <QStringList> #include <memory> class QSettings; struct TabProperties { QString name; QString iconName; int maxItemCount = 0; bool storeItems = true; }; class Tabs { public: Tabs(); ~Tabs(); Tabs(const Tabs &other); Tabs &operator=(const Tabs &other); TabProperties tabProperties(const QString &name) const; void setTabProperties(const TabProperties &tabProperties); void save(QSettings *settings, const QStringList &tabs); private: struct PrivateData; std::unique_ptr<PrivateData> m_data; }; #endif // TABS_H
676
C++
.h
28
20.892857
62
0.729984
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,318
actionoutput.h
hluk_CopyQ/src/common/actionoutput.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef ACTIONOUTPUT_H #define ACTIONOUTPUT_H class Action; class MainWindow; class QString; class QRegularExpression; class QModelIndex; void actionOutput( MainWindow *wnd, Action *action, const QString &outputItemFormat, const QString &outputTabName, const QRegularExpression &itemSeparator ); void actionOutput( MainWindow *wnd, Action *action, const QString &outputItemFormat, const QString &outputTabName ); void actionOutput( MainWindow *wnd, Action *action, const QString &outputItemFormat, const QModelIndex &index ); #endif // ACTIONOUTPUT_H
730
C++
.h
28
20.285714
47
0.689655
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,319
log.h
hluk_CopyQ/src/common/log.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef LOG_H #define LOG_H class QByteArray; class QString; enum LogLevel { LogAlways, LogError, LogWarning, LogNote, LogDebug, LogTrace }; void initLogging(); const QString &logFileName(); QByteArray readLogFile(int maxReadSize); bool removeLogFiles(); void createSessionMutex(); bool hasLogLevel(LogLevel level); QByteArray logLevelLabel(LogLevel level); #define COPYQ_LOG(msg) do { if ( hasLogLevel(LogDebug) ) log(msg, LogDebug); } while (false) #define COPYQ_LOG_VERBOSE(msg) do { if ( hasLogLevel(LogTrace) ) log(msg, LogTrace); } while (false) void log(const char *text, LogLevel level = LogNote); void log(const QString &text, LogLevel level = LogNote); void log(const QByteArray &text, LogLevel level = LogNote); void setLogLabel(const QByteArray &name); QByteArray &logLabel(); /// True if stdout and stderr can be used. bool canUseStandardOutput(); #endif // LOG_H
962
C++
.h
30
29.733333
100
0.762009
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,320
timer.h
hluk_CopyQ/src/common/timer.h
#ifndef TIMER_H #define TIMER_H #include <QTimer> template <typename Receiver, typename Slot> void initSingleShotTimer(QTimer *timer, int milliseconds, const Receiver *receiver, Slot slot) { timer->setSingleShot(true); timer->setInterval(milliseconds); Q_ASSERT(receiver); if (!receiver) return; // Unique connection only works with member functions. const auto flags = std::is_invocable<Slot&>() ? Qt::AutoConnection : Qt::UniqueConnection; QObject::connect(timer, &QTimer::timeout, receiver, slot, flags); } #endif // TIMER_H
569
C++
.h
16
32
94
0.733577
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,321
commandstore.h
hluk_CopyQ/src/common/commandstore.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef COMMANDSTORE_H #define COMMANDSTORE_H #include "common/command.h" #include <QVector> class QSettings; using Commands = QVector<Command>; Commands loadAllCommands(); void saveCommands(const Commands &commands); Commands loadCommands(QSettings *settings); void saveCommands(const Commands &commands, QSettings *settings); Commands importCommandsFromFile(const QString &filePath); Commands importCommandsFromText(const QString &commands); QString exportCommands(const Commands &commands); #endif // COMMANDSTORE_H
573
C++
.h
15
36.6
65
0.834244
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,322
mimetypes.h
hluk_CopyQ/src/common/mimetypes.h
// SPDX-License-Identifier: GPL-3.0-or-later #pragma once class QLatin1String; #define COPYQ_MIME_PREFIX "application/x-copyq-" // Prefix for MIME format not visible to user for data private to plugins. #define COPYQ_MIME_PRIVATE_PREFIX COPYQ_MIME_PREFIX "private-" extern const QLatin1String mimePrivatePrefix; extern const QLatin1String mimeText; extern const QLatin1String mimeTextUtf8; extern const QLatin1String mimeHtml; extern const QLatin1String mimeUriList; extern const QLatin1String mimeWindowTitle; extern const QLatin1String mimeItems; extern const QLatin1String mimeItemNotes; extern const QLatin1String mimeIcon; extern const QLatin1String mimeOwner; extern const QLatin1String mimeClipboardMode; extern const QLatin1String mimeCurrentTab; extern const QLatin1String mimeSelectedItems; extern const QLatin1String mimeCurrentItem; extern const QLatin1String mimeHidden; extern const QLatin1String mimeShortcut; extern const QLatin1String mimeColor; extern const QLatin1String mimeOutputTab; extern const QLatin1String mimeDisplayItemInMenu; extern const QLatin1String mimeSecret;
1,097
C++
.h
26
41.076923
74
0.875468
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,323
shortcuts.h
hluk_CopyQ/src/common/shortcuts.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef SHORTCUTS_H #define SHORTCUTS_H class QString; class QKeySequence; /** * Shortcut to remove items, formats etc. */ QString shortcutToRemove(); QString portableShortcutText(const QKeySequence &shortcut); QString toPortableShortcutText(const QString &shortcutNativeText); /// Returns true only if UI name contains key hint (unescaped '&'). bool hasKeyHint(const QString &name); /// Removes key hint (first unescaped '&') from UI name. QString &removeKeyHint(QString *name); #endif // SHORTCUTS_H
557
C++
.h
16
33.1875
67
0.787992
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,324
processsignals.h
hluk_CopyQ/src/common/processsignals.h
#ifndef PROCESSSIGNALS_H #define PROCESSSIGNALS_H #include <QObject> #include <QProcess> template <typename Receiver> void connectProcessFinished(QProcess *process, Receiver *receiver, void (Receiver::*slot)()) { const auto processFinishedSignal = static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished); QObject::connect( process, processFinishedSignal, receiver, [receiver, slot](int, QProcess::ExitStatus) { (receiver->*slot)(); }); } template <typename Receiver> void connectProcessFinished(QProcess *process, Receiver *receiver, void (Receiver::*slot)(int, QProcess::ExitStatus)) { const auto processFinishedSignal = static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished); QObject::connect(process, processFinishedSignal, receiver, slot); } template <typename Receiver, typename Slot> void connectProcessError(QProcess *process, Receiver receiver, Slot slot) { QObject::connect( process, &QProcess::errorOccurred, receiver, slot ); } #endif // PROCESSSIGNALS_H
1,076
C++
.h
26
38.038462
119
0.751196
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,325
config.h
hluk_CopyQ/src/common/config.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef CONFIG_H #define CONFIG_H class QByteArray; class QPoint; class QString; class QVariant; class QWidget; bool ensureSettingsDirectoryExists(); const QString &getConfigurationFilePath(); QString getConfigurationFilePath(const char *suffix); const QString &settingsDirectoryPath(); QVariant geometryOptionValue(const QString &optionName); void setGeometryOptionValue(const QString &optionName, const QVariant &value); void restoreWindowGeometry(QWidget *w, bool openOnCurrentScreen); void saveWindowGeometry(QWidget *w, bool openOnCurrentScreen); QByteArray mainWindowState(const QString &mainWindowObjectName); void saveMainWindowState(const QString &mainWindowObjectName, const QByteArray &state); void moveToCurrentWorkspace(QWidget *w); void moveWindowOnScreen(QWidget *w, QPoint pos); void setGeometryGuardBlockedUntilHidden(QWidget *w, bool blocked); bool isGeometryGuardBlockedUntilHidden(const QWidget *w); #endif // CONFIG_H
999
C++
.h
23
41.782609
87
0.851197
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,326
scriptabledir.h
hluk_CopyQ/src/scriptable/scriptabledir.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef SCRIPTABLEDIR_H #define SCRIPTABLEDIR_H #include <QDir> #include <QObject> #include <QJSValue> class ScriptableDir final : public QObject { Q_OBJECT public: Q_INVOKABLE explicit ScriptableDir(const QString &path = QString()); ~ScriptableDir(); public slots: QJSValue absoluteFilePath(const QJSValue &fileName); QJSValue absolutePath(); QJSValue canonicalPath(); bool cd(const QJSValue &dirName); bool cdUp(); uint count(); QJSValue dirName(); QStringList entryList(const QStringList &nameFilters = QStringList()); bool exists(const QJSValue &name); bool exists(); QJSValue filePath(const QJSValue &fileName); bool isAbsolute(); bool isReadable(); bool isRelative(); bool isRoot(); bool makeAbsolute(); bool mkdir(const QJSValue &dirName); bool mkpath(const QJSValue &dirPath); QStringList nameFilters(); QJSValue path(); void refresh(); QJSValue relativeFilePath(const QJSValue &fileName); bool remove(const QJSValue &fileName); bool rename(const QJSValue &oldName, const QJSValue &newName); bool rmdir(const QJSValue &dirName); bool rmpath(const QJSValue &dirPath); void setNameFilters(const QStringList &nameFilters); void setPath(const QJSValue &path); void addSearchPath(const QJSValue &prefix, const QJSValue &path); QJSValue cleanPath(const QJSValue &path); QJSValue currentPath(); QJSValue fromNativeSeparators(const QJSValue &pathName); QJSValue home(); QJSValue homePath(); bool isAbsolutePath(const QJSValue &path); bool isRelativePath(const QJSValue &path); bool match(const QJSValue &filter, const QJSValue &fileName); bool match(const QStringList &filters, const QJSValue &fileName); QJSValue root(); QJSValue rootPath(); QStringList searchPaths(const QJSValue &prefix); QJSValue separator(); bool setCurrent(const QJSValue &path); void setSearchPaths(const QJSValue &prefix, const QStringList &searchPaths); QJSValue temp(); QJSValue tempPath(); QJSValue toNativeSeparators(const QJSValue &pathName); private: QDir *self(); QJSEngine *engine() const; QJSValue newDir(const QDir &dir) const; QDir *m_self = nullptr; QString m_path; }; #endif // SCRIPTABLEDIR_H
2,357
C++
.h
68
30.279412
80
0.732778
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,327
commandhelp.h
hluk_CopyQ/src/scriptable/commandhelp.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef COMMANDHELP_H #define COMMANDHELP_H #include <QList> #include <QString> struct CommandHelp { CommandHelp(); CommandHelp(const char *command, const QString &description); CommandHelp &addArg(const QString &arg); QString toString() const; QString cmd; QString desc; QString args; }; QList<CommandHelp> commandHelp(); #endif // COMMANDHELP_H
429
C++
.h
16
23.5
65
0.74505
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,328
scriptable.h
hluk_CopyQ/src/scriptable/scriptable.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef SCRIPTABLE_H #define SCRIPTABLE_H #include "common/clipboardmode.h" #include "common/command.h" #include "common/mimetypes.h" #include <QObject> #include <QString> #include <QJSValue> #include <QVariantMap> #include <QVector> #include "platform/platformnativeinterface.h" class Action; class ScriptableByteArray; class ClipboardBrowser; class ItemFactory; class NetworkReply; class ScriptableProxy; class QFile; class QMimeData; class QNetworkReply; class QNetworkAccessManager; class QJSEngine; enum class ClipboardOwnership; class Scriptable final : public QObject { Q_OBJECT Q_PROPERTY(QJSValue inputSeparator READ getInputSeparator WRITE setInputSeparator) Q_PROPERTY(QJSValue mimeText READ getMimeText CONSTANT) Q_PROPERTY(QJSValue mimeTextUtf8 READ getMimeTextUtf8 CONSTANT) Q_PROPERTY(QJSValue mimeHtml READ getMimeHtml CONSTANT) Q_PROPERTY(QJSValue mimeUriList READ getMimeUriList CONSTANT) Q_PROPERTY(QJSValue mimeWindowTitle READ getMimeWindowTitle CONSTANT) Q_PROPERTY(QJSValue mimeItems READ getMimeItems CONSTANT) Q_PROPERTY(QJSValue mimeItemNotes READ getMimeItemNotes CONSTANT) Q_PROPERTY(QJSValue mimeIcon READ getMimeIcon CONSTANT) Q_PROPERTY(QJSValue mimeOwner READ getMimeOwner CONSTANT) Q_PROPERTY(QJSValue mimeClipboardMode READ getMimeClipboardMode CONSTANT) Q_PROPERTY(QJSValue mimeCurrentTab READ getMimeCurrentTab CONSTANT) Q_PROPERTY(QJSValue mimeSelectedItems READ getMimeSelectedItems CONSTANT) Q_PROPERTY(QJSValue mimeCurrentItem READ getMimeCurrentItem CONSTANT) Q_PROPERTY(QJSValue mimeHidden READ getMimeHidden CONSTANT) Q_PROPERTY(QJSValue mimeShortcut READ getMimeShortcut CONSTANT) Q_PROPERTY(QJSValue mimeColor READ getMimeColor CONSTANT) Q_PROPERTY(QJSValue mimeOutputTab READ getMimeOutputTab CONSTANT) Q_PROPERTY(QJSValue mimeDisplayItemInMenu READ getMimeDisplayItemInMenu CONSTANT) Q_PROPERTY(QJSValue mimeSecret READ getMimeSecret CONSTANT) Q_PROPERTY(QJSValue plugins READ getPlugins CONSTANT) Q_PROPERTY(QJSValue _copyqUncaughtException READ uncaughtException WRITE setUncaughtException) Q_PROPERTY(QJSValue _copyqHasUncaughtException READ hasUncaughtException) public: Scriptable( QJSEngine *engine, ScriptableProxy *proxy, ItemFactory *factory = nullptr, QObject *parent = nullptr); enum class Abort { None, CurrentEvaluation, AllEvaluations, }; QJSValue argumentsArray() const; int argumentCount() const; QJSValue argument(int index) const; QJSValue newByteArray(const QByteArray &bytes) const; QJSValue newByteArray(ScriptableByteArray *ba) const; QByteArray fromString(const QString &value) const; QVariant toVariant(const QJSValue &value); bool toInt(const QJSValue &value, int *number) const; QVariantMap toDataMap(const QJSValue &value) const; QJSValue fromDataMap(const QVariantMap &dataMap) const; QByteArray makeByteArray(const QJSValue &value) const; /** * Set data for item converted from @a value. * Return true if data was successfully converted and set. * * If mime starts with "text/" or isn't byte array the value is re-encoded * from local encoding to UTF8. */ bool toItemData(const QJSValue &value, const QString &mime, QVariantMap *data) const; QJSValue getInputSeparator() const; void setInputSeparator(const QJSValue &separator); QString getCurrentPath() const; void setCurrentPath(const QString &path); QString getAbsoluteFilePath(const QString &fileName) const; QString arg(int i, const QString &defaultValue = QString()); QJSValue throwError(const QString &errorMessage); QJSValue throwSaveError(const QString &filePath); QJSValue throwImportError(const QString &filePath); bool hasUncaughtException() const; void clearExceptions(); QJSValue uncaughtException() const { return m_uncaughtException; } void setUncaughtException(const QJSValue &exc); QJSEngine *engine() const { return m_engine; } bool canContinue() const { return m_abort == Abort::None && !m_failed; } void installObject(QObject *fromObj, const QMetaObject *metaObject, QJSValue &toObject); QJSValue getMimeText() const { return mimeText; } QJSValue getMimeTextUtf8() const { return mimeTextUtf8; } QJSValue getMimeHtml() const { return mimeHtml; } QJSValue getMimeUriList() const { return mimeUriList; } QJSValue getMimeWindowTitle() const { return mimeWindowTitle; } QJSValue getMimeItems() const { return mimeItems; } QJSValue getMimeItemNotes() const { return mimeItemNotes; } QJSValue getMimeIcon() const { return mimeIcon; } QJSValue getMimeOwner() const { return mimeOwner; } QJSValue getMimeClipboardMode() const { return mimeClipboardMode; } QJSValue getMimeCurrentTab() const { return mimeCurrentTab; } QJSValue getMimeSelectedItems() const { return mimeSelectedItems; } QJSValue getMimeCurrentItem() const { return mimeCurrentItem; } QJSValue getMimeHidden() const { return mimeHidden; } QJSValue getMimeShortcut() const { return mimeShortcut; } QJSValue getMimeColor() const { return mimeColor; } QJSValue getMimeOutputTab() const { return mimeOutputTab; } QJSValue getMimeDisplayItemInMenu() const { return mimeDisplayItemInMenu; } QJSValue getMimeSecret() const { return mimeSecret; } QJSValue getPlugins(); QJSValue eval(const QString &script, const QString &label); QJSValue call(const QString &label, QJSValue *fn, const QVariantList &arguments); QJSValue call(const QString &label, QJSValue *fn, const QJSValueList &arguments = QJSValueList()); void setActionId(int actionId); void setActionName(const QString &actionName); int executeArguments(const QStringList &args); int executeArgumentsSimple(const QStringList &args); void abortEvaluation(Abort abort = Abort::AllEvaluations); public slots: QJSValue ByteArray() const; QJSValue File() const; QJSValue TemporaryFile() const; QJSValue Dir() const; QJSValue ItemSelection() const; QJSValue Settings() const; QJSValue version(); QJSValue help(); void show(); void showAt(); void hide(); QJSValue toggle(); QJSValue menu(); void exit(); void disable(); void enable(); QJSValue monitoring(); QJSValue visible(); QJSValue focused(); QJSValue focusPrevious(); QJSValue preview(); QJSValue filter(); void ignore(); QJSValue clipboard(); QJSValue selection(); QJSValue hasClipboardFormat(); QJSValue hasSelectionFormat(); QJSValue isClipboard(); QJSValue copy(); QJSValue copySelection(); QJSValue paste(); QJSValue tab(); QJSValue removeTab(); QJSValue removetab() { return removeTab(); } QJSValue renameTab(); QJSValue renametab() { return renameTab(); } QJSValue tabIcon(); QJSValue tabicon() { return tabIcon(); } QJSValue unload(); void forceUnload(); QJSValue length(); QJSValue size() { return length(); } QJSValue count() { return length(); } QJSValue select(); void next(); void previous(); void add(); void insert(); QJSValue remove(); void edit(); QJSValue editItem(); QJSValue move(); QJSValue read(); QJSValue write(); QJSValue change(); void separator(); void action(); void popup(); QJSValue notification(); QJSValue exportTab(); void exporttab() { exportTab(); } QJSValue importTab(); void importtab() { importTab(); } QJSValue importData(); QJSValue exportData(); QJSValue config(); QJSValue toggleConfig(); QJSValue info(); QJSValue eval(); QJSValue source(); QJSValue currentPath(); QJSValue currentpath() { return currentPath(); } QJSValue str(); QJSValue input(); QJSValue toUnicode(); QJSValue fromUnicode(); QJSValue dataFormats(); QJSValue data(); QJSValue setData(); QJSValue removeData(); void print(); void abort(); void fail(); QJSValue keys(); QJSValue testSelected(); void serverLog(); QJSValue logs(); void setCurrentTab(); QJSValue selectItems(); QJSValue selectitems() { return selectItems(); } QJSValue selectedTab(); QJSValue selectedtab() { return selectedTab(); } QJSValue selectedItems(); QJSValue selecteditems() { return selectedItems(); } QJSValue currentItem(); QJSValue currentitem() { return currentItem(); } QJSValue index() { return currentItem(); } QJSValue selectedItemData(); QJSValue setSelectedItemData(); QJSValue selectedItemsData(); void setSelectedItemsData(); QJSValue escapeHtml(); QJSValue escapeHTML() { return escapeHtml(); } QJSValue unpack(); QJSValue pack(); QJSValue getItem(); QJSValue getitem() { return getItem(); } void setItem(); void setitem() { setItem(); } QJSValue toBase64(); QJSValue tobase64() { return toBase64(); } QJSValue fromBase64(); QJSValue frombase64() { return fromBase64(); } QJSValue md5sum(); QJSValue sha1sum(); QJSValue sha256sum(); QJSValue sha512sum(); QJSValue open(); QJSValue execute(); QJSValue currentWindowTitle(); QJSValue currentClipboardOwner(); QJSValue dialog(); QJSValue menuItems(); QJSValue settings(); QJSValue dateString(); QJSValue commands(); void setCommands(); void addCommands(); QJSValue importCommands(); QJSValue exportCommands(); QJSValue networkGet(); QJSValue networkPost(); QJSValue networkGetAsync(); QJSValue networkPostAsync(); QJSValue env(); QJSValue setEnv(); QJSValue sleep(); QJSValue afterMilliseconds(); // Call scriptable method. QVariant call(const QString &method, const QVariantList &arguments); QVariantList currentArguments(); void throwException(const QString &errorMessage); QJSValue screenshot(); QJSValue screenshotSelect(); QJSValue screenNames(); QJSValue queryKeyboardModifiers(); QJSValue pointerPosition(); QJSValue setPointerPosition(); QJSValue iconColor(); QJSValue iconTag(); QJSValue iconTagColor(); QJSValue loadTheme(); void onClipboardChanged(); void onOwnClipboardChanged(); void onHiddenClipboardChanged(); void onClipboardUnchanged(); void onSecretClipboardChanged(); void onStart() {} void onExit() {} void synchronizeToSelection(); void synchronizeFromSelection(); void setClipboardData(); void updateTitle(); void setTitle(); void saveData(); QJSValue hasData(); void showDataNotification(); void hideDataNotification(); void updateClipboardData(); void clearClipboardData(); QJSValue runAutomaticCommands(); void runDisplayCommands(); void runMenuCommandFilters(); void monitorClipboard(); void provideClipboard(); void provideSelection(); QJSValue isClipboardMonitorRunning(); QJSValue clipboardFormatsToSave(); QJSValue styles(); void onItemsAdded() {} void onItemsRemoved() {} void onItemsChanged() {} void onTabSelected() {} void onItemsLoaded() {} void collectScriptOverrides(); signals: void finished(); void dataReceived(const QByteArray &data); void receiveData(); private: void onMonitorClipboardChanged(const QVariantMap &data); void onMonitorSecretClipboardChanged(const QVariantMap &data); void onMonitorHiddenClipboardChanged(const QVariantMap &data); void onMonitorOwnClipboardChanged(const QVariantMap &data); void onMonitorClipboardUnchanged(const QVariantMap &data); void onSynchronizeSelection(ClipboardMode sourceMode, uint sourceTextHash, uint targetTextHash); void onFetchCurrentClipboardOwner(QString *title); bool sourceScriptCommands(); void callDisplayFunctions(QJSValueList displayFunctions); void processUncaughtException(const QString &cmd); void showExceptionMessage(const QString &message); QVector<int> getRows() const; /** * Parses arguments as one of these or raises an argument error: * - item... * - mimeType, data, [mimeType, data]... * - list of items * - text */ QVector<QVariantMap> getItemArguments(int begin, int end, QString *error); QVector<QVariantMap> getItemList(int begin, int end, const QJSValue &arguments); QJSValue copy(ClipboardMode mode); QJSValue changeItem(bool create); void nextToClipboard(int where); void editContent(int editRow, const QString &format, const QByteArray &content, bool changeClipboard); QJSValue screenshot(bool select); QByteArray serialize(const QJSValue &value); QJSValue eval(const QString &script); bool runAction(Action *action); bool runCommands(CommandType::CommandType type); bool canExecuteCommand(const Command &command, QStringList *arguments); bool canExecuteCommandFilter(const QString &matchCommand); bool verifyClipboardAccess(); void provideClipboard(ClipboardMode mode); void insert(int argumentsEnd); void insert(int row, int argumentsBegin, int argumentsEnd); QStringList arguments(); QVariantList argumentsAsVariants(); void print(const QByteArray &message); void printError(const QByteArray &message); void getActionData(); void getActionData(int actionId); void setActionData(); QByteArray getClipboardData(const QString &mime, ClipboardMode mode = ClipboardMode::Clipboard); bool hasClipboardFormat(const QString &mime, ClipboardMode mode = ClipboardMode::Clipboard); bool canSynchronizeSelection(ClipboardMode targetMode); void saveData(const QString &tab); QJSValue readInput(); PlatformClipboard *clipboardInstance(); void interruptibleSleep(int msec); NetworkReply *networkGetHelper(); NetworkReply *networkPostHelper(); QJSValue newQObject(QObject *obj, const QJSValue &prototype) const; ScriptableProxy *m_proxy; QJSEngine *m_engine; ItemFactory *m_factory; QJSValue m_temporaryFileClass; QString m_inputSeparator; QJSValue m_input; QVariantMap m_data; QVariantMap m_oldData; int m_actionId = -1; QString m_actionName; Abort m_abort = Abort::None; int m_skipArguments = 0; bool m_modifyDisplayDataOnly = false; QJSValue m_plugins; Action *m_action = nullptr; bool m_failed = false; QString m_tabName; PlatformClipboardPtr m_clipboard; QJSValue m_uncaughtException; bool m_hasUncaughtException = false; QStringList m_stack; QStringList m_uncaughtExceptionStack; QJSValue m_safeCall; QJSValue m_safeEval; QJSValue m_createFn; QJSValue m_createFnB; QJSValue m_createProperty; QJSValue m_byteArrayPrototype; QJSValue m_filePrototype; QJSValue m_temporaryFilePrototype; QJSValue m_dirPrototype; QJSValue m_itemSelectionPrototype; QJSValue m_settingsPrototype; }; class NetworkReply final : public QObject { Q_OBJECT Q_PROPERTY(QJSValue data READ data CONSTANT) Q_PROPERTY(QJSValue error READ error CONSTANT) Q_PROPERTY(QJSValue status READ status CONSTANT) Q_PROPERTY(QJSValue redirect READ redirect CONSTANT) Q_PROPERTY(QJSValue headers READ headers CONSTANT) Q_PROPERTY(QJSValue finished READ finished CONSTANT) public: static NetworkReply *get(const QString &url, Scriptable *scriptable); static NetworkReply *post(const QString &url, const QByteArray &postData, Scriptable *scriptable); ~NetworkReply(); QJSValue data(); QJSValue error(); QJSValue status(); QJSValue redirect(); QJSValue headers(); QJSValue finished(); QJSValue toScriptValue(); private: explicit NetworkReply(const QString &url, const QByteArray &postData, Scriptable *scriptable); Scriptable *m_scriptable; QNetworkAccessManager *m_manager; QNetworkReply *m_reply; QJSValue m_data; QJSValue m_self; QByteArray m_rawData; }; class ScriptablePlugins final : public QObject { Q_OBJECT public: ScriptablePlugins(Scriptable *scriptable, ItemFactory *factory); public slots: QJSValue load(const QString &name); private: Scriptable *m_scriptable; ItemFactory *m_factory; QMap<QString, QJSValue> m_plugins; }; #endif // SCRIPTABLE_H
16,605
C++
.h
442
32.511312
106
0.738116
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,329
scriptvaluefactory.h
hluk_CopyQ/src/scriptable/scriptvaluefactory.h
// SPDX-License-Identifier: GPL-3.0-or-later #include "common/command.h" #include "scriptable/scriptablebytearray.h" #include "scriptable/scriptablefile.h" #include <QFileInfo> #include <QJSEngine> #include <QJSValueIterator> #include <QRegularExpression> #include <QUrl> static QFile *getFile(const QJSValue &value, QJSEngine *engine) { auto obj = engine->fromScriptValue<ScriptableFile*>(value); return obj ? obj->self() : nullptr; } static QJSValue newByteArray(ScriptableByteArray *ba, QJSEngine *engine) { const QJSValue globalObject = engine->globalObject(); const QJSValue byteArrayPrototype = globalObject.property("ByteArray").property(QStringLiteral("prototype")); auto value = engine->newQObject(ba); value.setPrototype(byteArrayPrototype); return value; } static QVariant toVariant(const QJSValue &value) { const auto variant = value.toVariant(); Q_ASSERT(value.isUndefined() || value.isNull() || variant.isValid()); return variant; } template <typename T> struct ScriptValueFactory { static QJSValue toScriptValue(const T &value, QJSEngine *) { return QJSValue(value); } static T fromScriptValue(const QJSValue &value, QJSEngine *) { const auto variant = toVariant(value); Q_ASSERT( variant.canConvert<T>() ); return variant.value<T>(); } }; template <typename T> QJSValue toScriptValue(const T &value, QJSEngine *engine) { return ScriptValueFactory<T>::toScriptValue(value, engine); } template <typename T> T fromScriptValue(const QJSValue &value, QJSEngine *engine) { return ScriptValueFactory<T>::fromScriptValue(value, engine); } template <typename T> void fromScriptValueIfValid(const QJSValue &value, QJSEngine *engine, T *outputValue) { if (!value.isUndefined()) *outputValue = ScriptValueFactory<T>::fromScriptValue(value, engine); } template <typename List, typename T> struct ScriptValueListFactory { static QJSValue toScriptValue(const List &list, QJSEngine *engine) { QJSValue array = engine->newArray(); for ( int i = 0; i < list.size(); ++i ) { const auto value = ScriptValueFactory<T>::toScriptValue(list[i], engine); array.setProperty( static_cast<quint32>(i), value ); } return array; } static List fromScriptValue(const QJSValue &value, QJSEngine *engine) { if ( !value.isArray() ) return List(); const quint32 length = value.property("length").toUInt(); List list; for ( quint32 i = 0; i < length; ++i ) { const auto item = value.property(i); list.append( ScriptValueFactory<T>::fromScriptValue(item, engine) ); } return list; } }; template <typename T> struct ScriptValueFactory< QList<T> > : ScriptValueListFactory< QList<T>, T > {}; // QVector is alias for a QList in Qt 6. #if QT_VERSION < QT_VERSION_CHECK(6,0,0) template <typename T> struct ScriptValueFactory< QVector<T> > : ScriptValueListFactory< QVector<T>, T > {}; #endif template <> struct ScriptValueFactory<QVariantMap> { static QJSValue toScriptValue(const QVariantMap &dataMap, QJSEngine *engine) { QJSValue value = engine->newObject(); for (auto it = dataMap.constBegin(); it != dataMap.constEnd(); ++it) value.setProperty( it.key(), ::toScriptValue(it.value(), engine) ); return value; } static QVariantMap fromScriptValue(const QJSValue &value, QJSEngine *engine) { QVariantMap result; QJSValueIterator it(value); while ( it.hasNext() ) { it.next(); auto itemValue = ::fromScriptValue<QVariant>( it.value(), engine ); if (itemValue.type() == QVariant::String) itemValue = itemValue.toString().toUtf8(); result.insert(it.name(), itemValue); } return result; } }; template <> struct ScriptValueFactory<QByteArray> { static QJSValue toScriptValue(const QByteArray &bytes, QJSEngine *engine) { return newByteArray(new ScriptableByteArray(bytes), engine); } }; #if QT_VERSION < QT_VERSION_CHECK(6,0,0) template <> struct ScriptValueFactory<QStringList> { static QJSValue toScriptValue(const QStringList &list, QJSEngine *engine) { return ScriptValueFactory< QList<QString> >::toScriptValue(list, engine); } static QStringList fromScriptValue(const QJSValue &value, QJSEngine *engine) { return ScriptValueFactory< QList<QString> >::fromScriptValue(value, engine); } }; #endif template <> struct ScriptValueFactory<QString> { static QJSValue toScriptValue(const QString &text, QJSEngine *) { return QJSValue(text); } static QString fromScriptValue(const QJSValue &value, QJSEngine *) { return toString(value); } }; template <> struct ScriptValueFactory<QRegularExpression> { static QJSValue toScriptValue(const QRegularExpression &re, QJSEngine *engine) { #if QT_VERSION >= QT_VERSION_CHECK(5,13,0) return engine->toScriptValue(re); #else const auto caseSensitivity = re.patternOptions().testFlag(QRegularExpression::CaseInsensitiveOption) ? Qt::CaseInsensitive : Qt::CaseSensitive; const QRegExp re2(re.pattern(), caseSensitivity); return engine->toScriptValue(re2); #endif } static QRegularExpression fromScriptValue(const QJSValue &value, QJSEngine *) { if (value.isRegExp()) { const auto variant = value.toVariant(); #if QT_VERSION >= QT_VERSION_CHECK(5,15,0) return variant.toRegularExpression(); #else // Support for Qt 5.12.z and below. if ( variant.canConvert<QRegularExpression>() ) return variant.toRegularExpression(); const QRegExp reOld = variant.toRegExp(); const auto caseSensitivity = reOld.caseSensitivity() == Qt::CaseInsensitive ? QRegularExpression::CaseInsensitiveOption : QRegularExpression::NoPatternOption; return QRegularExpression(reOld.pattern(), caseSensitivity); #endif } if (value.isVariant()) { const auto variant = value.toVariant(); return variant.toRegularExpression(); } return QRegularExpression( toString(value) ); } }; template <> struct ScriptValueFactory<Command> { static QJSValue toScriptValue(const Command &command, QJSEngine *engine) { QJSValue value = engine->newObject(); value.setProperty(QStringLiteral("name"), command.name); value.setProperty(QStringLiteral("re"), ::toScriptValue(command.re, engine)); value.setProperty(QStringLiteral("wndre"), ::toScriptValue(command.wndre, engine)); value.setProperty(QStringLiteral("matchCmd"), command.matchCmd); value.setProperty(QStringLiteral("cmd"), command.cmd); value.setProperty(QStringLiteral("sep"), command.sep); value.setProperty(QStringLiteral("input"), command.input); value.setProperty(QStringLiteral("output"), command.output); value.setProperty(QStringLiteral("wait"), command.wait); value.setProperty(QStringLiteral("automatic"), command.automatic); value.setProperty(QStringLiteral("display"), command.display); value.setProperty(QStringLiteral("inMenu"), command.inMenu); value.setProperty(QStringLiteral("isGlobalShortcut"), command.isGlobalShortcut); value.setProperty(QStringLiteral("isScript"), command.isScript); value.setProperty(QStringLiteral("transform"), command.transform); value.setProperty(QStringLiteral("remove"), command.remove); value.setProperty(QStringLiteral("hideWindow"), command.hideWindow); value.setProperty(QStringLiteral("enable"), command.enable); value.setProperty(QStringLiteral("icon"), command.icon); value.setProperty(QStringLiteral("shortcuts"), ::toScriptValue(command.shortcuts, engine)); value.setProperty(QStringLiteral("globalShortcuts"), ::toScriptValue(command.globalShortcuts, engine)); value.setProperty(QStringLiteral("tab"), command.tab); value.setProperty(QStringLiteral("outputTab"), command.outputTab); value.setProperty(QStringLiteral("internalId"), command.internalId); return value; } static Command fromScriptValue(const QJSValue &value, QJSEngine *engine) { Command command; ::fromScriptValueIfValid( value.property("name"), engine, &command.name ); ::fromScriptValueIfValid( value.property("re"), engine, &command.re ); ::fromScriptValueIfValid( value.property("wndre"), engine, &command.wndre ); ::fromScriptValueIfValid( value.property("matchCmd"), engine, &command.matchCmd ); ::fromScriptValueIfValid( value.property("cmd"), engine, &command.cmd ); ::fromScriptValueIfValid( value.property("sep"), engine, &command.sep ); ::fromScriptValueIfValid( value.property("input"), engine, &command.input ); ::fromScriptValueIfValid( value.property("output"), engine, &command.output ); ::fromScriptValueIfValid( value.property("wait"), engine, &command.wait ); ::fromScriptValueIfValid( value.property("automatic"), engine, &command.automatic ); ::fromScriptValueIfValid( value.property("display"), engine, &command.display ); ::fromScriptValueIfValid( value.property("inMenu"), engine, &command.inMenu ); ::fromScriptValueIfValid( value.property("isGlobalShortcut"), engine, &command.isGlobalShortcut ); ::fromScriptValueIfValid( value.property("isScript"), engine, &command.isScript ); ::fromScriptValueIfValid( value.property("transform"), engine, &command.transform ); ::fromScriptValueIfValid( value.property("remove"), engine, &command.remove ); ::fromScriptValueIfValid( value.property("hideWindow"), engine, &command.hideWindow ); ::fromScriptValueIfValid( value.property("enable"), engine, &command.enable ); ::fromScriptValueIfValid( value.property("icon"), engine, &command.icon ); ::fromScriptValueIfValid( value.property("shortcuts"), engine, &command.shortcuts ); ::fromScriptValueIfValid( value.property("globalShortcuts"), engine, &command.globalShortcuts ); ::fromScriptValueIfValid( value.property("tab"), engine, &command.tab ); ::fromScriptValueIfValid( value.property("outputTab"), engine, &command.outputTab ); ::fromScriptValueIfValid( value.property("internalId"), engine, &command.internalId ); return command; } }; template <> struct ScriptValueFactory<QVariant> { static QJSValue toScriptValue(const QVariant &variant, QJSEngine *engine) { if ( !variant.isValid() ) return QJSValue(QJSValue::UndefinedValue); if (variant.type() == QVariant::Bool) return ::toScriptValue(variant.toBool(), engine); if (variant.type() == QVariant::ByteArray) return ::toScriptValue(variant.toByteArray(), engine); if (variant.type() == QVariant::String) return ::toScriptValue(variant.toString(), engine); if (variant.type() == QVariant::Char) return ::toScriptValue(variant.toString(), engine); if (variant.type() == QVariant::RegularExpression) return ::toScriptValue(variant.toRegularExpression(), engine); if (variant.canConvert<QVariantList>()) return ::toScriptValue(variant.value<QVariantList>(), engine); if (variant.canConvert<QVariantMap>()) return ::toScriptValue(variant.value<QVariantMap>(), engine); if (variant.canConvert<QByteArray>()) return newByteArray(new ScriptableByteArray(variant), engine); return engine->toScriptValue(variant); } static QVariant fromScriptValue(const QJSValue &value, QJSEngine *engine) { const auto bytes = getByteArray(value); if (bytes) return QVariant(*bytes); auto file = getFile(value, engine); if (file) { const QFileInfo fileInfo(*file); const auto path = fileInfo.absoluteFilePath(); return QVariant::fromValue( QUrl::fromLocalFile(path) ); } if (value.isArray()) return ScriptValueFactory<QVariantList>::fromScriptValue(value, engine); const auto variant = toVariant(value); if (variant.type() == QVariant::ByteArray) return variant; if (value.isObject()) return ScriptValueFactory<QVariantMap>::fromScriptValue(value, engine); Q_ASSERT(value.isUndefined() || value.isNull() || variant.isValid()); return variant; } };
12,857
C++
.h
289
37.522491
113
0.684644
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,330
scriptablefile.h
hluk_CopyQ/src/scriptable/scriptablefile.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef SCRIPTABLEFILE_H #define SCRIPTABLEFILE_H #include <QJSValue> #include <QObject> class QJSEngine; class QFile; class ScriptableFile : public QObject { Q_OBJECT public: Q_INVOKABLE explicit ScriptableFile(const QString &path = QString()); public slots: bool open(); bool openReadOnly(); bool openWriteOnly(); bool openAppend(); void close(); QJSValue read(qint64 maxSize); QJSValue readLine(qint64 maxSize = 0); QJSValue readAll(); qint64 write(const QJSValue &value); bool atEnd(); qint64 bytesAvailable(); qint64 bytesToWrite(); bool canReadLine(); QJSValue errorString(); bool isOpen(); bool isReadable(); bool isWritable(); QJSValue peek(qint64 maxSize); qint64 pos(); bool reset(); bool seek(qint64 pos); void setTextModeEnabled(bool enabled); qint64 size(); QJSValue fileName(); bool exists(); bool flush(); bool remove(); virtual QFile *self(); protected: void setFile(QFile *file); QJSEngine *engine() const; private: QJSValue newByteArray(const QByteArray &bytes); QFile *m_self = nullptr; QString m_path; }; #endif // SCRIPTABLEFILE_H
1,253
C++
.h
50
20.94
73
0.699242
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,331
scriptableproxy.h
hluk_CopyQ/src/scriptable/scriptableproxy.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef SCRIPTABLEPROXY_H #define SCRIPTABLEPROXY_H #include "common/clipboardmode.h" #include "common/command.h" #include "gui/clipboardbrowser.h" #include "gui/notificationbutton.h" #include <QList> #include <QMetaObject> #include <QObject> #include <QPersistentModelIndex> #include <QPoint> #include <QRect> #include <QVariant> #include <QVector> class ClipboardBrowser; class KeyClicker; class MainWindow; class QEventLoop; class QPersistentModelIndex; class QPixmap; struct NamedValue { NamedValue() {} NamedValue(const QString &name, const QVariant &value) : name(name), value(value) {} QString name; QVariant value; }; struct VariantMapList { QVector<QVariantMap> items; }; struct NamedValueList { QList<NamedValue> items; }; struct NotificationButtonList { QList<NotificationButton> items; }; struct KeyboardModifierList { Qt::KeyboardModifiers items; }; struct ItemSelection { QPointer<ClipboardBrowser> browser; QList<QPersistentModelIndex> indexes; }; Q_DECLARE_METATYPE(NamedValueList) Q_DECLARE_METATYPE(NotificationButtonList) Q_DECLARE_METATYPE(VariantMapList) Q_DECLARE_METATYPE(KeyboardModifierList) #if QT_VERSION < QT_VERSION_CHECK(6,0,0) Q_DECLARE_METATYPE(ClipboardMode) #endif QDataStream &operator<<(QDataStream &out, const NotificationButtonList &list); QDataStream &operator>>(QDataStream &in, NotificationButtonList &list); QDataStream &operator<<(QDataStream &out, const NamedValueList &list); QDataStream &operator>>(QDataStream &in, NamedValueList &list); QDataStream &operator<<(QDataStream &out, const VariantMapList &list); QDataStream &operator>>(QDataStream &in, VariantMapList &list); QDataStream &operator<<(QDataStream &out, ClipboardMode mode); QDataStream &operator>>(QDataStream &in, ClipboardMode &mode); QDataStream &operator<<(QDataStream &out, KeyboardModifierList value); QDataStream &operator>>(QDataStream &in, KeyboardModifierList &value); class ScriptableProxy final : public QObject { Q_OBJECT public: explicit ScriptableProxy(MainWindow* mainWindow, QObject *parent = nullptr); void callFunction(const QByteArray &serializedFunctionCall); int actionId() const { return m_actionId; } void setFunctionCallReturnValue(const QByteArray &bytes); void setInputDialogResult(const QByteArray &bytes); void safeDeleteLater(); public slots: QVariantMap getActionData(int id); void setActionData(int id, const QVariantMap &data); void exit(); void close(); bool showWindow(); bool showWindowAt(QRect rect); bool pasteToCurrentWindow(); bool copyFromCurrentWindow(); bool focusPrevious(); bool isMonitoringEnabled(); bool isMainWindowVisible(); bool isMainWindowFocused(); bool preview(const QVariant &arg); void disableMonitoring(bool arg1); void setClipboard(const QVariantMap &data, ClipboardMode mode); QString renameTab(const QString &arg1, const QString &arg2); QString removeTab(const QString &arg1); QString tabIcon(const QString &tabName); void setTabIcon(const QString &tabName, const QString &icon); QStringList unloadTabs(const QStringList &tabs); void forceUnloadTabs(const QStringList &tabs); bool showBrowser(const QString &tabName); bool showBrowserAt(const QString &tabName, QRect rect); void action(const QVariantMap &arg1, const Command &arg2); void runInternalAction(const QVariantMap &data, const QString &command); void showMessage(const QString &title, const QString &msg, const QString &icon, int msec, const QString &notificationId = QString(), const NotificationButtonList &buttons = NotificationButtonList()); QVariantMap nextItem(const QString &tabName, int where); void browserMoveToClipboard(const QString &tabName, int row); void browserSetCurrent(const QString &tabName, int arg1); QString browserRemoveRows(const QString &tabName, QVector<int> rows); void browserMoveSelected(int targetRow); void browserEditRow(const QString &tabName, int arg1, const QString &format); void browserEditNew(const QString &tabName, const QString &format, const QByteArray &content, bool changeClipboard); QStringList tabs(); bool toggleVisible(); bool toggleMenu(const QString &tabName, int maxItemCount, QPoint position); bool toggleCurrentMenu(); int findTabIndex(const QString &arg1); int menuItems(const VariantMapList &items); void openActionDialog(const QVariantMap &arg1); bool loadTab(const QString &arg1); bool saveTab(const QString &tabName, const QString &arg1); bool importData(const QString &fileName); bool exportData(const QString &fileName); QVariant config(const QVariantList &nameValue); QString configDescription(); QVariant toggleConfig(const QString &optionName); int browserLength(const QString &tabName); bool browserOpenEditor( const QString &tabName, int row, const QString &format, const QByteArray &content, bool changeClipboard); QString browserInsert(const QString &tabName, int row, const VariantMapList &items); QString browserChange(const QString &tabName, int row, const VariantMapList &items); QByteArray browserItemData(const QString &tabName, int arg1, const QString &arg2); QVariantMap browserItemData(const QString &tabName, int arg1); void setCurrentTab(const QString &tabName); QString tab(const QString &tabName); int currentItem(); bool selectItems(const QString &tabName, const QVector<int> &rows); QVector<int> selectedItems(); QString selectedTab(); QVariantMap selectedItemData(int selectedIndex); bool setSelectedItemData(int selectedIndex, const QVariantMap &data); VariantMapList selectedItemsData(); void setSelectedItemsData(const VariantMapList &dataList); int createSelection(const QString &tabName); int selectionCopy(int id); void destroySelection(int id); void selectionRemoveAll(int id); void selectionSelectRemovable(int id); void selectionInvert(int id); void selectionSelectAll(int id); void selectionSelect(int id, const QVariant &maybeRe, const QString &mimeFormat); void selectionDeselectIndexes(int id, const QVector<int> &indexes); void selectionDeselectSelection(int id, int toDeselectId); void selectionGetCurrent(int id); int selectionGetSize(int id); QString selectionGetTabName(int id); QVector<int> selectionGetRows(int id); QVariantMap selectionGetItemIndex(int id, int index); void selectionSetItemIndex(int id, int index, const QVariantMap &item); QVariantList selectionGetItemsData(int id); void selectionSetItemsData(int id, const QVariantList &dataList); QVariantList selectionGetItemsFormat(int id, const QString &format); void selectionSetItemsFormat(int id, const QString &mime, const QVariant &value); void selectionMove(int id, int row); void selectionSort(int id, const QVector<int> &indexes); #ifdef HAS_TESTS void sendKeys(const QString &expectedWidgetName, const QString &keys, int delay); bool sendKeysSucceeded(); bool sendKeysFailed(); QString testSelected(); #endif // HAS_TESTS void serverLog(const QString &text); QString currentWindowTitle(); int inputDialog(const NamedValueList &values); void setSelectedItemsData(const QString &mime, const QVariant &value); void filter(const QString &text); QString filter(); QVector<Command> commands(); void setCommands(const QVector<Command> &commands); void addCommands(const QVector<Command> &commands); QByteArray screenshot(const QString &format, const QString &screenName, bool select); QStringList screenNames(); KeyboardModifierList queryKeyboardModifiers(); QPoint pointerPosition(); void setPointerPosition(int x, int y); QString pluginsPath(); QString themesPath(); QString translationsPath(); QString iconColor(); bool setIconColor(const QString &name); QString iconTag(); void setIconTag(const QString &tag); QString iconTagColor(); bool setIconTagColor(const QString &name); void setClipboardData(const QVariantMap &data); void setTitle(const QString &title); void setTitleForData(const QVariantMap &data); void saveData(const QString &tab, const QVariantMap &data, ClipboardMode mode); void showDataNotification(const QVariantMap &data); bool enableMenuItem(int actionId, int currentRun, int menuItemMatchCommandIndex, const QVariantMap &menuItem); QVariantMap setDisplayData(int actionId, const QVariantMap &displayData); QVector<Command> automaticCommands(); QVector<Command> displayCommands(); QVector<Command> scriptCommands(); bool openUrls(const QStringList &urls); QString loadTheme(const QString &path); QByteArray getClipboardData(const QString &mime, ClipboardMode mode); bool hasClipboardFormat(const QString &mime, ClipboardMode mode); QStringList styles(); void setScriptOverrides(const QVector<int> &overrides); signals: void functionCallFinished(int functionCallId, const QVariant &returnValue); void inputDialogFinished(int dialogId, const NamedValueList &result); void sendMessage(const QByteArray &message, int messageCode); void clientDisconnected(); void abortEvaluation(); private: ClipboardBrowser *fetchBrowser(const QString &tabName); QVariantMap itemData(const QString &tabName, int i); QByteArray itemData(const QString &tabName, int i, const QString &mime); void setItemsData( ClipboardBrowser *c, const QList<QPersistentModelIndex> &indexes, const QString &mime, const QVariant &value); template<typename T> T getSelectionData(const QString &mime); QPersistentModelIndex currentIndex(); QList<QPersistentModelIndex> selectedIndexes(); ClipboardBrowser *browserForIndexes(const QList<QPersistentModelIndex> &indexes) const; QVariant waitForFunctionCallFinished(int functionId); QByteArray callFunctionHelper(const QByteArray &serializedFunctionCall); bool getSelectionData(); #ifdef HAS_TESTS KeyClicker *keyClicker(); KeyClicker *m_keyClicker = nullptr; #endif // HAS_TESTS MainWindow* m_wnd; QVariantMap m_actionData; int m_actionId = -1; int m_lastFunctionCallId = -1; int m_lastInputDialogId = -1; int m_functionCallStack = 0; bool m_shouldBeDeleted = false; int m_lastSelectionId = -1; QMap<int, ItemSelection> m_selections; bool m_disconnected = false; }; QString pluginsPath(); QString themesPath(); QString translationsPath(); void setClipboardMonitorRunning(bool running); bool isClipboardMonitorRunning(); #endif // SCRIPTABLEPROXY_H
10,881
C++
.h
248
39.391129
120
0.767764
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,332
scriptoverrides.h
hluk_CopyQ/src/scriptable/scriptoverrides.h
// SPDX-License-Identifier: GPL-3.0-or-later #pragma once namespace ScriptOverrides { enum ScriptOverrides { Paste = 0, OnItemsAdded = 1, OnItemsRemoved = 2, OnItemsChanged = 3, OnTabSelected = 4, OnItemsLoaded = 5, }; }
246
C++
.h
12
17.416667
44
0.699571
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,333
scriptablesettings.h
hluk_CopyQ/src/scriptable/scriptablesettings.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef SCRIPTABLESETTINGS_H #define SCRIPTABLESETTINGS_H #include <QJSValue> #include <QObject> #include <QSettings> class ScriptableSettings final : public QObject { Q_OBJECT public: Q_INVOKABLE explicit ScriptableSettings(); Q_INVOKABLE explicit ScriptableSettings(const QString &fileName); public slots: QStringList allKeys() { return m_settings.allKeys(); } void beginGroup(const QString &prefix) { m_settings.beginGroup(prefix); } QJSValue beginReadArray(const QString &prefix) { return m_settings.beginReadArray(prefix); } void beginWriteArray(const QString &prefix, int size = -1) { m_settings.beginWriteArray(prefix, size); } QStringList childGroups() { return m_settings.childGroups(); } QStringList childKeys() { return m_settings.childKeys(); } void clear() { m_settings.clear(); } QJSValue contains(const QString &key) { return m_settings.contains(key); } void endArray() { m_settings.endArray(); } void endGroup() { m_settings.endGroup(); } QJSValue fileName() { return m_settings.fileName(); } QJSValue group() { return m_settings.group(); } QJSValue isWritable() { return m_settings.isWritable(); } void remove(const QString &key) { m_settings.remove(key); } void setArrayIndex(int i) { m_settings.setArrayIndex(i); } void setValue(const QString &key, const QJSValue &value) { m_settings.setValue(key, value.toVariant()); } void sync() { m_settings.sync(); } QVariant value(const QString &key, const QJSValue &defaultValue = QJSValue()) { return m_settings.value(key, defaultValue.toVariant()); } private: QSettings m_settings; }; #endif // SCRIPTABLESETTINGS_H
1,717
C++
.h
35
45.371429
141
0.729117
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,334
scriptabletemporaryfile.h
hluk_CopyQ/src/scriptable/scriptabletemporaryfile.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef SCRIPTABLETEMPORARYFILE_H #define SCRIPTABLETEMPORARYFILE_H #include "scriptablefile.h" class QJSValue; class QTemporaryFile; class ScriptableTemporaryFile final : public ScriptableFile { Q_OBJECT public: Q_INVOKABLE explicit ScriptableTemporaryFile(const QString &path = QString()); public slots: bool autoRemove(); QString fileTemplate(); void setAutoRemove(bool autoRemove); void setFileTemplate(const QJSValue &name); QFile *self() override; private: QTemporaryFile *tmpFile(); QTemporaryFile *m_self = nullptr; }; #endif // SCRIPTABLETEMPORARYFILE_H
653
C++
.h
22
26.636364
82
0.784566
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,335
scriptableitemselection.h
hluk_CopyQ/src/scriptable/scriptableitemselection.h
// SPDX-License-Identifier: GPL-3.0-or-later #pragma once #include <QJSValue> #include <QObject> class ScriptableProxy; class ScriptableItemSelection final : public QObject { Q_OBJECT Q_PROPERTY(QJSValue length READ length) Q_PROPERTY(QJSValue tab READ tab) public: Q_INVOKABLE explicit ScriptableItemSelection(const QString &tabName = QString()); ~ScriptableItemSelection(); void init(const QJSValue &self, ScriptableProxy *proxy, const QString &currentTabName); public slots: QJSValue length(); QJSValue tab(); QJSValue valueOf(); QJSValue str(); QString toString(); QJSValue selectAll(); QJSValue select(const QJSValue &re, const QString &mimeFormat = QString()); QJSValue selectRemovable(); QJSValue invert(); QJSValue deselectIndexes(const QJSValue &indexes); QJSValue deselectSelection(const QJSValue &selection); QJSValue current(); QJSValue removeAll(); QJSValue copy(); QJSValue rows(); QJSValue itemAtIndex(int index); QJSValue setItemAtIndex(int index, const QJSValue &item); QJSValue items(); QJSValue setItems(const QJSValue &items); QJSValue itemsFormat(const QJSValue &format); QJSValue setItemsFormat(const QJSValue &format, const QJSValue &value); QJSValue move(int row); QJSValue sort(QJSValue compareFn); private: int m_id = -1; QString m_tabName; ScriptableProxy *m_proxy = nullptr; QJSValue m_self; };
1,476
C++
.h
44
29.068182
91
0.738483
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,336
scriptablebytearray.h
hluk_CopyQ/src/scriptable/scriptablebytearray.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef SCRIPTABLEBYTEARRAY_H #define SCRIPTABLEBYTEARRAY_H #include <QByteArray> #include <QJSValue> #include <QObject> #include <QVariant> class ScriptableByteArray final : public QObject { Q_OBJECT Q_PROPERTY(QJSValue length READ length WRITE setLength) public: Q_INVOKABLE ScriptableByteArray() {} Q_INVOKABLE explicit ScriptableByteArray(const QByteArray &bytes); Q_INVOKABLE explicit ScriptableByteArray(const QString &text); Q_INVOKABLE explicit ScriptableByteArray(const QVariant &value); Q_INVOKABLE explicit ScriptableByteArray(int size); Q_INVOKABLE ScriptableByteArray(const ScriptableByteArray &other); const QByteArray *data() { return &self(); } public slots: void chop(int n); bool equals(const QJSValue &other); QJSValue left(int len); QJSValue mid(int pos, int len = -1); QJSValue remove(int pos, int len); QJSValue right(int len); QJSValue simplified(); QJSValue toBase64(); QJSValue toLower(); QJSValue toUpper(); QJSValue trimmed(); void truncate(int pos); QJSValue valueOf(); int size(); QString toString(); QString toLatin1String(); QJSValue length(); void setLength(QJSValue size); private: QJSEngine *engine() const; QJSValue newByteArray(const QByteArray &bytes) const; QByteArray &self(); QByteArray m_self; QVariant m_variant; }; const QByteArray *getByteArray(const QJSValue &value); QByteArray toByteArray(const QJSValue &value); QString toString(const QJSValue &value); #endif // SCRIPTABLEBYTEARRAY_H
1,625
C++
.h
49
29.163265
70
0.747592
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,337
platformclipboard.h
hluk_CopyQ/src/platform/platformclipboard.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef PLATFORMCLIPBOARD_H #define PLATFORMCLIPBOARD_H #include "common/clipboardmode.h" #include <QObject> #include <QVariantMap> class QMimeData; /** * Interface for clipboard. */ class PlatformClipboard : public QObject { Q_OBJECT public: /** * Starts emitting changed. */ virtual void startMonitoring(const QStringList &formats) = 0; virtual void setMonitoringEnabled(ClipboardMode mode, bool enable) = 0; /** * Return clipboard data containing specified @a formats if available. */ virtual QVariantMap data(ClipboardMode mode, const QStringList &formats) const = 0; /** * Set data to clipboard. */ virtual void setData(ClipboardMode mode, const QVariantMap &dataMap) = 0; virtual void setRawData(ClipboardMode mode, QMimeData *mimeData) = 0; virtual const QMimeData *mimeData(ClipboardMode mode) const = 0; virtual bool isSelectionSupported() const = 0; virtual bool isHidden(const QMimeData &data) const = 0; virtual void setClipboardOwner(const QString &owner) = 0; signals: /// Notifies about clipboard changes. void changed(ClipboardMode mode); }; #endif // PLATFORMCLIPBOARD_H
1,239
C++
.h
37
29.621622
87
0.737374
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,338
platformnativeinterface.h
hluk_CopyQ/src/platform/platformnativeinterface.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef PLATFORMNATIVEINTERFACE_H #define PLATFORMNATIVEINTERFACE_H #include <QWidget> // WId #include <memory> class QApplication; class QCoreApplication; class QDir; class QGuiApplication; class QKeyEvent; class PlatformWindow; class PlatformClipboard; using PlatformWindowPtr = std::shared_ptr<PlatformWindow>; using PlatformClipboardPtr = std::shared_ptr<PlatformClipboard>; /** * Interface for platform dependent code. */ class PlatformNativeInterface { public: PlatformNativeInterface() = default; virtual ~PlatformNativeInterface() = default; /** * Get window from widget (nullptr if failed or not implemented). */ virtual PlatformWindowPtr getWindow(WId winId) = 0; /** * Get currently focused window (nullptr if failed or not implemented). */ virtual PlatformWindowPtr getCurrentWindow() = 0; /** * Return true only if window titles can be retrieved using PlatformWindow::getTitle(). */ virtual bool canGetWindowTitle() = 0; /** * Return true automatic the application start at system startup is supported. */ virtual bool canAutostart() = 0; /** * Return true if the application is automatically started at system startup. */ virtual bool isAutostartEnabled() = 0; /** * Enable automatic application start at system startup. */ virtual void setAutostartEnabled(bool enable) = 0; /** * Create QCoreApplication object for console output (to show help or version and quit). */ virtual QCoreApplication *createConsoleApplication(int &argc, char **argv) = 0; /** * Create QApplication object for server. */ virtual QApplication *createServerApplication(int &argc, char **argv) = 0; /** * Create QGuiApplication object for clipboard monitor. */ virtual QGuiApplication *createMonitorApplication(int &argc, char **argv) = 0; /** * Create QGuiApplication object that provides clipboard. */ virtual QGuiApplication *createClipboardProviderApplication(int &argc, char **argv) = 0; /** * Create QCoreApplication object for client. */ virtual QCoreApplication *createClientApplication(int &argc, char **argv) = 0; /** * Create QGuiApplication object for tests. */ virtual QGuiApplication *createTestApplication(int &argc, char **argv) = 0; /** * Return object for managing clipboard. */ virtual PlatformClipboardPtr clipboard() = 0; /** * Returns list of command line arguments without executable name (argv[0]). */ virtual QStringList getCommandLineArguments(int argc, char **argv) = 0; /** * Find directory with plugins and return true on success. */ virtual bool findPluginDir(QDir *pluginsDir) = 0; /** * Default editor command (e.g. "notepad %1"; "%1" will be replaced with file name to edit). */ virtual QString defaultEditorCommand() = 0; /** * Path to translations. * * Can be overridden by preprocessor flag COPYQ_TRANSLATION_PREFIX. * * Custom translation prefix can be added by setting COPYQ_TRANSLATION_PREFIX * environment variable. */ virtual QString translationPrefix() = 0; /** * Path to installed themes. * * Can be overridden by preprocessor flag COPYQ_THEME_PREFIX. * * Custom theme prefix can be added by setting COPYQ_THEME_PREFIX * environment variable. * * Note: Customized themes are saved to settings path. */ virtual QString themePrefix() = 0; PlatformNativeInterface(const PlatformNativeInterface &) = delete; PlatformNativeInterface &operator=(const PlatformNativeInterface &) = delete; }; PlatformNativeInterface *platformNativeInterface(); #endif // PLATFORMNATIVEINTERFACE_H
3,879
C++
.h
111
30.072072
96
0.706684
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,339
platformwindow.h
hluk_CopyQ/src/platform/platformwindow.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef PLATFORMWINDOW_H #define PLATFORMWINDOW_H #include <QByteArray> class QString; /** * Window storage class for platform. Used to raise/focus window and paste to window. */ class PlatformWindow { public: PlatformWindow() = default; virtual ~PlatformWindow() = default; /** * Return window title text. */ virtual QString getTitle() = 0; /** * Raise/focus window. */ virtual void raise() = 0; /** * Paste clipboard content to window. */ virtual void pasteClipboard() = 0; /** * Copy to clipboard from window. */ virtual void copy() = 0; PlatformWindow(const PlatformWindow &) = delete; PlatformWindow &operator=(const PlatformWindow &) = delete; }; #endif // PLATFORMWINDOW_H
826
C++
.h
33
20.969697
85
0.670077
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,340
platformcommon.h
hluk_CopyQ/src/platform/platformcommon.h
// SPDX-License-Identifier: GPL-3.0-or-later #pragma once class AppConfig; class PlatformWindow; bool pasteWithCtrlV(PlatformWindow &window, const AppConfig &config); void waitMs(int msec);
194
C++
.h
6
30.666667
69
0.820652
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,341
dummyclipboard.h
hluk_CopyQ/src/platform/dummy/dummyclipboard.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef DUMMYCLIPBOARD_H #define DUMMYCLIPBOARD_H #include "common/clipboardmode.h" #include "platform/platformclipboard.h" #include <QClipboard> QClipboard::Mode modeToQClipboardMode(ClipboardMode mode); class DummyClipboard : public PlatformClipboard { public: void startMonitoring(const QStringList &) override; void setMonitoringEnabled(ClipboardMode, bool) override {} QVariantMap data(ClipboardMode mode, const QStringList &formats) const override; void setData(ClipboardMode mode, const QVariantMap &dataMap) override; void setRawData(ClipboardMode mode, QMimeData *mimeData) override; const QMimeData *mimeData(ClipboardMode mode) const override; bool isSelectionSupported() const override { return false; } bool isHidden(const QMimeData &data) const override; void setClipboardOwner(const QString &) override {} protected: virtual const QMimeData *rawMimeData(ClipboardMode mode) const; virtual void onChanged(int mode); void onClipboardChanged(QClipboard::Mode mode); virtual const long int *clipboardSequenceNumber(ClipboardMode) const { return nullptr; } }; #endif // DUMMYCLIPBOARD_H
1,208
C++
.h
26
42.923077
92
0.798801
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,342
dummyplatform.h
hluk_CopyQ/src/platform/dummy/dummyplatform.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef DUMMYPLATFORM_H #define DUMMYPLATFORM_H #include "platform/platformnativeinterface.h" #include <QKeyEvent> #include <QString> class DummyPlatform : public PlatformNativeInterface { public: PlatformWindowPtr getWindow(WId) override { return PlatformWindowPtr(); } PlatformWindowPtr getCurrentWindow() override { return PlatformWindowPtr(); } bool canGetWindowTitle() override { return false; } bool canAutostart() override { return false; } bool isAutostartEnabled() override { return false; } void setAutostartEnabled(bool) override {} QCoreApplication *createConsoleApplication(int &argc, char **argv) override; QApplication *createServerApplication(int &argc, char **argv) override; QGuiApplication *createMonitorApplication(int &argc, char **argv) override; QGuiApplication *createClipboardProviderApplication(int &argc, char **argv) override; QCoreApplication *createClientApplication(int &argc, char **argv) override; QGuiApplication *createTestApplication(int &argc, char **argv) override; PlatformClipboardPtr clipboard() override; QStringList getCommandLineArguments(int argc, char **argv) override; bool findPluginDir(QDir *pluginsDir) override; QString defaultEditorCommand() override; QString translationPrefix() override; QString themePrefix() override { return QString(); } }; #endif // DUMMYPLATFORM_H
1,463
C++
.h
29
46.206897
89
0.78187
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,343
unixsignalhandler.h
hluk_CopyQ/src/platform/unix/unixsignalhandler.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef UNIXSIGNALHANDLER_H #define UNIXSIGNALHANDLER_H /** * Gracefully exit application on Unix signals SIGHUP, SIGINT and SIGTERM. * * More info at http://qt-project.org/doc/qt-4.8/unix-signals.html */ bool initUnixSignalHandler(); void startUnixSignalHandler(); #endif // UNIXSIGNALHANDLER_H
349
C++
.h
11
30
74
0.787425
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,344
x11platformclipboard.h
hluk_CopyQ/src/platform/x11/x11platformclipboard.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef X11PLATFORMCLIPBOARD_H #define X11PLATFORMCLIPBOARD_H #include "platform/dummy/dummyclipboard.h" #include <QByteArray> #include <QStringList> #include <QTimer> class X11PlatformClipboard final : public DummyClipboard { public: X11PlatformClipboard(); void startMonitoring(const QStringList &formats) override; void setMonitoringEnabled(ClipboardMode mode, bool enable) override; QVariantMap data(ClipboardMode mode, const QStringList &formats) const override; void setData(ClipboardMode mode, const QVariantMap &dataMap) override; void setRawData(ClipboardMode mode, QMimeData *mimeData) override; bool isSelectionSupported() const override { return m_selectionSupported; } void setClipboardOwner(const QString &owner) override { m_clipboardOwner = owner; } protected: const QMimeData *rawMimeData(ClipboardMode mode) const override; void onChanged(int mode) override; const long int *clipboardSequenceNumber(ClipboardMode mode) const override { return mode == ClipboardMode::Clipboard ? &m_clipboardData.sequenceNumber : &m_selectionData.sequenceNumber; } private: struct ClipboardData { QVariantMap newData; QVariantMap data; QString owner; QString newOwner; QTimer timerEmitChange; QStringList formats; quint32 newDataTimestamp; ClipboardMode mode; bool enabled = true; bool cloningData = false; long int sequenceNumber = 0; bool ignoreNext = false; int retry = 0; }; void check(); void updateClipboardData(ClipboardData *clipboardData); void useNewClipboardData(ClipboardData *clipboardData); void checkAgainLater(bool clipboardChanged, int interval); QTimer m_timerCheckAgain; ClipboardData m_clipboardData; ClipboardData m_selectionData; bool m_monitoring = false; bool m_selectionSupported = true; QString m_clipboardOwner; }; #endif // X11PLATFORMCLIPBOARD_H
2,070
C++
.h
54
32.703704
87
0.745245
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,345
x11platformwindow.h
hluk_CopyQ/src/platform/x11/x11platformwindow.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef X11PLATFORMWINDOW_H #define X11PLATFORMWINDOW_H #include "platform/platformwindow.h" #include <memory> class AppConfig; class QWidget; class X11PlatformWindow final : public PlatformWindow { public: explicit X11PlatformWindow(); explicit X11PlatformWindow(quintptr winId); QString getTitle() override; void raise() override; void pasteClipboard() override; void copy() override; bool isValid() const; private: bool waitForFocus(int ms); void sendKeyPress(int modifier, int key, const AppConfig &config); quintptr m_window; }; #endif // X11PLATFORMWINDOW_H
664
C++
.h
23
25.478261
70
0.771565
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,346
x11info.h
hluk_CopyQ/src/platform/x11/x11info.h
// SPDX-License-Identifier: GPL-3.0-or-later #pragma once #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wreserved-identifier" typedef struct _XDisplay Display; #pragma clang diagnostic pop class X11Info { public: static bool isPlatformX11(); static Display *display(); };
302
C++
.h
11
25.454545
56
0.791667
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,347
x11platform.h
hluk_CopyQ/src/platform/x11/x11platform.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef X11PLATFORM_H #define X11PLATFORM_H #include "platform/platformnativeinterface.h" #include <QKeyEvent> #include <QString> class X11Platform final : public PlatformNativeInterface { public: X11Platform() = default; ~X11Platform(); PlatformWindowPtr getWindow(WId winId) override; PlatformWindowPtr getCurrentWindow() override; bool canGetWindowTitle() override { return true; } bool canAutostart() override; /** * Return true only if "copyq.desktop" file exists in "autostart" directory of current user and * it doesn't contain "Hidden" property or its value is false. */ bool isAutostartEnabled() override; /** * Replace "Hidden" property in current user's autostart "copyq.desktop" file * (create the file if it doesn't exist). * * Additionally, replace "Exec" property with current application path. */ void setAutostartEnabled(bool) override; QCoreApplication *createConsoleApplication(int &argc, char **argv) override; QApplication *createServerApplication(int &argc, char **argv) override; QGuiApplication *createMonitorApplication(int &argc, char **argv) override; QGuiApplication *createClipboardProviderApplication(int &argc, char **argv) override; QCoreApplication *createClientApplication(int &argc, char **argv) override; QGuiApplication *createTestApplication(int &argc, char **argv) override; PlatformClipboardPtr clipboard() override; QStringList getCommandLineArguments(int argc, char **argv) override; bool findPluginDir(QDir *pluginsDir) override; QString defaultEditorCommand() override; QString translationPrefix() override; QString themePrefix() override { return QString(); } }; #endif // X11PLATFORM_H
1,829
C++
.h
41
39.902439
99
0.754535
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,348
waylandclipboard.h
hluk_CopyQ/src/platform/x11/systemclipboard/waylandclipboard.h
/* SPDX-FileCopyrightText: 2020 David Edmundson <davidedmundson@kde.org> SPDX-License-Identifier: LGPL-2.0-or-later */ #pragma once #include <QClipboard> #include <QObject> #include <memory> class DataControlDevice; class DataControlDeviceManager; class QMimeData; class WaylandClipboard final : public QObject { Q_OBJECT public: static WaylandClipboard *instance(); ~WaylandClipboard(); void setMimeData(QMimeData *mime, QClipboard::Mode mode); void clear(QClipboard::Mode mode); const QMimeData *mimeData(QClipboard::Mode mode) const; bool isActive() const { return m_device != nullptr; } bool isSelectionSupported() const; signals: void changed(QClipboard::Mode mode); private: explicit WaylandClipboard(QObject *parent); static WaylandClipboard *createInstance(); std::unique_ptr<DataControlDeviceManager> m_manager; std::unique_ptr<DataControlDevice> m_device; };
939
C++
.h
30
27.966667
73
0.767519
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,349
winplatform.h
hluk_CopyQ/src/platform/win/winplatform.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef WINPLATFORM_H #define WINPLATFORM_H #include "platform/platformnativeinterface.h" class WinPlatform final : public PlatformNativeInterface { public: WinPlatform() {} PlatformWindowPtr getWindow(WId winId) override; PlatformWindowPtr getCurrentWindow() override; bool canGetWindowTitle() override { return true; } /** Setting application autostart is not implemented for Windows (works just from installer). */ bool canAutostart() override { return false; } bool isAutostartEnabled() override { return false; } void setAutostartEnabled(bool) override {} QCoreApplication *createConsoleApplication(int &argc, char **argv) override; QApplication *createServerApplication(int &argc, char **argv) override; QGuiApplication *createMonitorApplication(int &argc, char **argv) override; QGuiApplication *createClipboardProviderApplication(int &argc, char **argv) override; QCoreApplication *createClientApplication(int &argc, char **argv) override; QGuiApplication *createTestApplication(int &argc, char **argv) override; PlatformClipboardPtr clipboard() override; QStringList getCommandLineArguments(int, char**) override; bool findPluginDir(QDir *pluginsDir) override; QString defaultEditorCommand() override; QString translationPrefix() override; QString themePrefix() override; }; #endif // WINPLATFORM_H
1,455
C++
.h
29
45.655172
100
0.779202
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,350
winplatformwindow.h
hluk_CopyQ/src/platform/win/winplatformwindow.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef WINPLATFORMWINDOW_H #define WINPLATFORMWINDOW_H #include "platform/platformwindow.h" #ifndef WINVER #define WINVER 0x0500 #endif #include <qt_windows.h> class AppConfig; class WinPlatformWindow final : public PlatformWindow { public: explicit WinPlatformWindow(HWND window); QString getTitle() override; void raise() override; void pasteClipboard() override; void copy() override; private: void sendKeyPress(WORD modifier, WORD key, const AppConfig &config); HWND m_window; }; #endif // WINPLATFORMWINDOW_H
599
C++
.h
22
24.454545
72
0.782686
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,351
winplatformclipboard.h
hluk_CopyQ/src/platform/win/winplatformclipboard.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef WINPLATFORMCLIPBOARD_H #define WINPLATFORMCLIPBOARD_H #include "platform/dummy/dummyclipboard.h" #include <qt_windows.h> class WinPlatformClipboard final : public DummyClipboard { public: void startMonitoring(const QStringList &) override; bool isHidden(const QMimeData &data) const override; protected: void onChanged(int) override; const long int *clipboardSequenceNumber(ClipboardMode) const override { return &m_lastClipboardSequenceNumber; } private: long int m_lastClipboardSequenceNumber = 0; }; #endif // WINPLATFORMCLIPBOARD_H
630
C++
.h
19
30
75
0.792703
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,352
mactimer.h
hluk_CopyQ/src/platform/mac/mactimer.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef MACTIMER_H #define MACTIMER_H #include <QObject> #ifdef __OBJC__ @class NSTimer; #else using NSTimer = void; #endif /** * Class similar to a QTimer but allows setting a tolerance, which * makes timers more battery-friendly on OSX. */ class MacTimer final : public QObject { Q_OBJECT public: explicit MacTimer(QObject *parent = 0); virtual ~MacTimer(); void setInterval(int msec); int interval() const { return m_interval; } inline void setSingleShot(bool singleShot); /** * Set the tolerance for the timer. See NSTimer::setTolerance. * * Tolerance is ignored on OS X < 10.9. */ void setTolerance(int msec); int tolerance() const { return m_tolerance; } public Q_SLOTS: void start(); void stop(); inline bool isSingleShot() const { return m_singleShot; } Q_SIGNALS: void timeout(); private: Q_DISABLE_COPY(MacTimer) void restart(); int m_interval; int m_tolerance; bool m_singleShot; NSTimer *m_nsTimer; }; #endif // MACTIMER_H
1,093
C++
.h
44
21.272727
66
0.69372
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,353
copyqpasteboardmime.h
hluk_CopyQ/src/platform/mac/copyqpasteboardmime.h
// SPDX-License-Identifier: GPL-3.0-or-later #pragma once #include <QtGlobal> #if QT_VERSION >= QT_VERSION_CHECK(6,0,0) # include <QUtiMimeConverter> using CopyqPasteboardMimeBase = QUtiMimeConverter; #else # include <QMacPasteboardMime> using CopyqPasteboardMimeBase = QMacPasteboardMime; #endif /** * Class for doing lossless conversions between OS X UTIs and "normal" mimeTypes. * * Useful links about UTIs: * - https://developer.apple.com/library/mac/documentation/FileManagement/Conceptual/understanding_utis/understand_utis_intro/understand_utis_intro.html * - https://developer.apple.com/library/mac/documentation/MobileCoreServices/Reference/UTTypeRef/Reference/reference.html * - http://alastairs-place.net/blog/2012/06/06/utis-are-better-than-you-think-and-heres-why/ * * Useful links about QMacPasteboardMime (and it's usage): * - http://doc-snapshot.qt-project.org/qdoc/qmacpasteboardmime.html * - https://www.qt.gitorious.org/qt/qt/source/src/gui/kernel/qmime_mac.cpp * - https://www.qt.gitorious.org/qt/qt/source/src/gui/kernel/qclipboard_mac.cpp */ class CopyQPasteboardMime final : public CopyqPasteboardMimeBase { public: #if QT_VERSION >= QT_VERSION_CHECK(6,0,0) QString mimeForUti(const QString &uti) const override; QString utiForMime(const QString &mime) const override; QVariant convertToMime(const QString &mime, const QList<QByteArray> &data, const QString &uti) const override; QList<QByteArray> convertFromMime(const QString &mime, const QVariant &data, const QString &uti) const override; #else CopyQPasteboardMime() : CopyqPasteboardMimeBase(MIME_ALL) {} QString convertorName() override; QString flavorFor(const QString &mime) override; QString mimeFor(QString uti) override; bool canConvert(const QString &mime, QString uti) override; QVariant convertToMime(const QString &mime, QList<QByteArray> data, QString uti) override; QList<QByteArray> convertFromMime(const QString &mime, QVariant data, QString uti) override; #endif };
2,023
C++
.h
40
48.075
152
0.783729
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,354
macplatform.h
hluk_CopyQ/src/platform/mac/macplatform.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef MACPLATFORM_H #define MACPLATFORM_H #include "platform/platformnativeinterface.h" #include <QKeyEvent> #include <QString> class MacPlatform final : public PlatformNativeInterface { public: MacPlatform(); PlatformWindowPtr getWindow(WId winId) override; PlatformWindowPtr getCurrentWindow() override; bool canGetWindowTitle() override { return true; } bool canAutostart() override { return true; } bool isAutostartEnabled() override; void setAutostartEnabled(bool) override; QCoreApplication *createConsoleApplication(int &argc, char **argv) override; QApplication *createServerApplication(int &argc, char **argv) override; QGuiApplication *createMonitorApplication(int &argc, char **argv) override; QGuiApplication *createClipboardProviderApplication(int &argc, char **argv) override; QCoreApplication *createClientApplication(int &argc, char **argv) override; QGuiApplication *createTestApplication(int &argc, char **argv) override; PlatformClipboardPtr clipboard() override; QStringList getCommandLineArguments(int argc, char **argv) override; bool findPluginDir(QDir *pluginsDir) override; QString defaultEditorCommand() override; QString translationPrefix() override; QString themePrefix() override; }; #endif // MACPLATFORM_H
1,379
C++
.h
30
41.8
89
0.785714
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,355
macplatformwindow.h
hluk_CopyQ/src/platform/mac/macplatformwindow.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef MACPLATFORMWINDOW_H #define MACPLATFORMWINDOW_H #include "platform/platformwindow.h" // For WId #include <QWidget> #ifdef __OBJC__ @class NSWindow; @class NSRunningApplication; #else using NSWindow = void; using NSRunningApplication = void; #endif class MacPlatformWindow final : public PlatformWindow { public: MacPlatformWindow(); explicit MacPlatformWindow(WId wid); explicit MacPlatformWindow(NSRunningApplication *runningApplication); virtual ~MacPlatformWindow(); /** * Return window title text of current window. * * On OS X, this gets the title of the application instead of the window. */ QString getTitle(); void raise(); void pasteClipboard(); void copy(); private: // Don't allow copies Q_DISABLE_COPY(MacPlatformWindow) long int m_windowNumber; NSWindow *m_window; NSRunningApplication *m_runningApplication; }; #endif // MACPLATFORMWINDOW_H
995
C++
.h
37
23.540541
77
0.749736
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,356
macactivity.h
hluk_CopyQ/src/platform/mac/macactivity.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef MACACTIVITY_H #define MACACTIVITY_H class QString; /** * RAII class for using activity blocks on OSX. */ class MacActivity { public: explicit MacActivity(const QString &reason); ~MacActivity(); private: void *m_activity; }; #endif // MACACTIVITY_H
319
C++
.h
16
17.8125
48
0.749164
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,357
macclipboard.h
hluk_CopyQ/src/platform/mac/macclipboard.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef MACCLIPBOARD_H #define MACCLIPBOARD_H #include "platform/dummy/dummyclipboard.h" class MacClipboard final : public DummyClipboard { public: void startMonitoring(const QStringList &) override; void setData(ClipboardMode mode, const QVariantMap &dataMap) override; bool isHidden(const QMimeData &data) const override; protected: void onChanged(int mode) override; const long int *clipboardSequenceNumber(ClipboardMode) const override { return &m_prevChangeCount; } private: void clipboardTimeout(); long int m_prevChangeCount = 0; }; #endif // MACCLIPBOARD_H
660
C++
.h
19
31.105263
75
0.772152
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,358
urlpasteboardmime.h
hluk_CopyQ/src/platform/mac/urlpasteboardmime.h
// SPDX-License-Identifier: GPL-3.0-or-later #pragma once #include <QtGlobal> #if QT_VERSION >= QT_VERSION_CHECK(6,0,0) # include <QUtiMimeConverter> using UrlPasteboardMimeBase = QUtiMimeConverter; #else # include <QMacPasteboardMime> using UrlPasteboardMimeBase = QMacPasteboardMime; #endif /** * Class for doing conversions of URLs between OS X UTIs and "normal" mimeTypes. */ class UrlPasteboardMime final : public UrlPasteboardMimeBase { public: //! Create an instance of UrlPasteboardMime which will try to convert to/from the given UTI. explicit UrlPasteboardMime(const QString &urlUti); #if QT_VERSION >= QT_VERSION_CHECK(6,0,0) QString mimeForUti(const QString &uti) const override; QString utiForMime(const QString &mime) const override; QVariant convertToMime(const QString &mime, const QList<QByteArray> &data, const QString &uti) const override; QList<QByteArray> convertFromMime(const QString &mime, const QVariant &data, const QString &uti) const override; #else QString convertorName() override; QString flavorFor(const QString &mime) override; QString mimeFor(QString uti) override; bool canConvert(const QString &mime, QString uti) override; QVariant convertToMime(const QString &mime, QList<QByteArray> data, QString uti) override; QList<QByteArray> convertFromMime(const QString &mime, QVariant data, QString uti) override; #endif private: QString m_urlUti; };
1,443
C++
.h
33
40.969697
116
0.779516
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,359
foregroundbackgroundfilter.h
hluk_CopyQ/src/platform/mac/foregroundbackgroundfilter.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef FOREGROUNDBACKGROUNDFILTER_H #define FOREGROUNDBACKGROUNDFILTER_H #include <QObject> /** * This event filter manages the "activationPolicy" for an OS X app by * ensuring that it is a "regular" app when there are windows shown, but * an "accessory" or "prohibited"/"background" app when there are none. * * This allows the app to not have a dock icon unless there is an open window. * * If only menu or some notifications are visible dock icon is hidden. */ class ForegroundBackgroundFilter final : public QObject { public: /** * Install the filter to parent. */ static void installFilter(QObject *parent); protected: bool eventFilter(QObject *obj, QEvent *ev); ForegroundBackgroundFilter(QObject *parent); }; #endif // FOREGROUNDBACKGROUNDFILTER_H
840
C++
.h
25
31.04
78
0.759259
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,360
clipboardmonitor.h
hluk_CopyQ/src/app/clipboardmonitor.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef CLIPBOARDMONITOR_H #define CLIPBOARDMONITOR_H #include "app/clipboardownermonitor.h" #include "common/clipboardmode.h" #include "common/common.h" #include "platform/platformnativeinterface.h" #include <QVariantMap> class ClipboardMonitor final : public QObject { Q_OBJECT public: explicit ClipboardMonitor(const QStringList &formats); void startMonitoring(); QString currentClipboardOwner(); void setClipboardOwner(const QString &owner); signals: void clipboardChanged(const QVariantMap &data); void secretClipboardChanged(const QVariantMap &data); void hiddenClipboardChanged(const QVariantMap &data); void ownClipboardChanged(const QVariantMap &data); void clipboardUnchanged(const QVariantMap &data); void saveData(const QVariantMap &data); void synchronizeSelection(ClipboardMode sourceMode, uint sourceTextHash, uint targetTextHash); void fetchCurrentClipboardOwner(QString *title); private: void onClipboardChanged(ClipboardMode mode); QVariantMap m_clipboardData; QVariantMap m_selectionData; PlatformClipboardPtr m_clipboard; QStringList m_formats; QString m_clipboardTab; bool m_storeClipboard; ClipboardOwnerMonitor m_ownerMonitor; #ifdef HAS_MOUSE_SELECTIONS bool m_storeSelection; bool m_runSelection; bool m_clipboardToSelection; bool m_selectionToClipboard; #endif QString m_clipboardOwner; }; #endif // CLIPBOARDMONITOR_H
1,508
C++
.h
43
31.325581
98
0.796692
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,361
app.h
hluk_CopyQ/src/app/app.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef APP_H #define APP_H class QCoreApplication; class QString; /** Application class. */ class App { public: explicit App( QCoreApplication *application, const QString &sessionName ); virtual ~App(); static void installTranslator(); /** * Execute application. Returns immediately if exit() was called before. * @return Exit code. */ int exec(); /** * Exit application with given exit code. */ virtual void exit(int exitCode=0); /** * Return true if exit() was called. */ bool wasClosed() const; App(const App &) = delete; App &operator=(const App &) = delete; private: QCoreApplication *m_app; int m_exitCode; bool m_started; bool m_closed; }; #endif // APP_H
851
C++
.h
37
18.162162
76
0.631382
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,362
clipboardownermonitor.h
hluk_CopyQ/src/app/clipboardownermonitor.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef CLIPBOARDOWNERMONITOR_H #define CLIPBOARDOWNERMONITOR_H #include <QAbstractNativeEventFilter> #include <QByteArray> #include <QTimer> class ClipboardMonitor; #if QT_VERSION >= QT_VERSION_CHECK(6,0,0) using NativeEventResult = qintptr; #else using NativeEventResult = long; #endif class ClipboardOwnerMonitor final : public QAbstractNativeEventFilter { public: explicit ClipboardOwnerMonitor(ClipboardMonitor *monitor); ~ClipboardOwnerMonitor(); bool nativeEventFilter( const QByteArray &, void *message, NativeEventResult *result) override; void setUpdateInterval(int ms) { m_timerSetOwner.setInterval(ms); } void update(); private: ClipboardMonitor *m_monitor; QString m_lastClipboardOwner; QStringList m_nextClipboardOwners; QTimer m_timerSetOwner; QTimer m_timerUpdateAfterEvent; }; #endif // CLIPBOARDOWNERMONITOR_H
931
C++
.h
29
29.103448
79
0.797085
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,363
applicationexceptionhandler.h
hluk_CopyQ/src/app/applicationexceptionhandler.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef APPLICATIONEXCEPTIONHANDLER_H #define APPLICATIONEXCEPTIONHANDLER_H #include <QObject> #include <exception> class QCoreApplication; class QEvent; void logException(const char *what = nullptr); namespace detail { class ApplicationExceptionHandlerBase : public QObject { Q_OBJECT protected: /// Exit application (thread-safe). void exit(int exitCode); private slots: void exitSlot(int exitCode); }; } // namespace detail template <typename QtApplication> class ApplicationExceptionHandler : public detail::ApplicationExceptionHandlerBase, public QtApplication { public: ApplicationExceptionHandler(int &argc, char **argv) : QtApplication(argc, argv) { } bool notify(QObject *receiver, QEvent *event) override { try { return QtApplication::notify(receiver, event); } catch (const std::exception &e) { logException(e.what()); } catch (...) { logException(); } detail::ApplicationExceptionHandlerBase::exit(1); return true; } }; #endif // APPLICATIONEXCEPTIONHANDLER_H
1,163
C++
.h
41
23.804878
104
0.714801
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,364
clipboardserver.h
hluk_CopyQ/src/app/clipboardserver.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef CLIPBOARDSERVER_H #define CLIPBOARDSERVER_H #include "app.h" #include "common/clipboardmode.h" #include "common/command.h" #include "common/server.h" #include "common/clientsocket.h" #include "gui/clipboardbrowsershared.h" #include <QMap> #include <QPointer> #include <QTimer> class Action; class ActionHandler; class AppConfig; class ItemFactory; class MainWindow; class NotificationDaemon; class ScriptableProxy; class Server; class QxtGlobalShortcut; class QApplication; class QSessionManager; struct NotificationButton; /** * The application main server. * * Creates clipboard monitor process when necessary and serves client commands. * * If user already run this server isListening() returns false. */ class ClipboardServer final : public QObject, public App { Q_OBJECT public: ClipboardServer(QApplication *app, const QString &sessionName); ~ClipboardServer(); /** Stop monitor application. */ void stopMonitoring(); /** Start monitor application. */ void startMonitoring(); /** * Create global shortcut for command. * * @see shortcutActivated() */ void createGlobalShortcut(const QKeySequence &shortcut, const Command &command); /** Load settings. */ void loadSettings(AppConfig *appConfig); signals: void closeClients(); protected: bool eventFilter(QObject *object, QEvent *ev) override; private: void onClientNewConnection(const ClientSocketPtr &client); void onClientMessageReceived(const QByteArray &message, int messageCode, ClientSocketId clientId); void onClientDisconnected(ClientSocketId clientId); void onClientConnectionFailed(ClientSocketId clientId); /** An error occurred on monitor connection. */ void onMonitorFinished(); void onNotificationButtonClicked(const NotificationButton &button); /** Shortcut was pressed on host system. */ void shortcutActivated(QxtGlobalShortcut *shortcut); void removeGlobalShortcuts(); /** Called when new commands are available. */ void onCommandsSaved(const QVector<Command> &commands); /** Clean up before quitting. */ void onAboutToQuit(); /** * Save all data before quitting and if some commands are still executing, * allow user to cancel quitting (if session manager supports it). */ void onCommitData(QSessionManager &sessionManager); /** * Save session name for next time. */ void onSaveState(QSessionManager &sessionManager); void onDisableClipboardStoringRequest(bool disabled); /** Quit application, but ask to cancel exit if there are any active commands. */ void maybeQuit(); /** Ask to cancel application exit if there are any active commands. */ bool askToQuit(); bool hasRunningCommands() const; void terminateClients(int waitMs); void waitForClientsToFinish(int waitMs); void waitForCallbackToFinish(); void callback(const QString &scriptFunction); ClientSocketPtr findClient(int actionId); void sendActionData(int actionId, const QByteArray &bytes); void cleanDataFiles(); Server *m_server = nullptr; MainWindow* m_wnd = nullptr; QPointer<Action> m_monitor; QPointer<Action> m_callback; bool m_exitting = false; bool m_ignoreNewConnections = false; QMap<QxtGlobalShortcut*, Command> m_shortcutActions; QTimer m_ignoreKeysTimer; QTimer m_updateThemeTimer; uint m_monitorCommandsStateHash = 0; int m_textTabSize = 8; bool m_saveOnDeactivate = true; ClipboardBrowserSharedPtr m_sharedData; QMap<int, QByteArray> m_actionDataToSend; QTimer m_timerClearUnsentActionData; QTimer m_timerCleanItemFiles; struct ClientData { ClientData() = default; ClientData(const ClientSocketPtr &client, ScriptableProxy *proxy) : client(client) , proxy(proxy) { } bool isValid() const { return client && proxy; } ClientSocketPtr client; ScriptableProxy *proxy = nullptr; }; QMap<ClientSocketId, ClientData> m_clients; }; #endif // CLIPBOARDSERVER_H
4,203
C++
.h
123
29.520325
102
0.734537
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,365
clipboardclient.h
hluk_CopyQ/src/app/clipboardclient.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef CLIPBOARDCLIENT_H #define CLIPBOARDCLIENT_H #include "app.h" #include <QObject> #include <QStringList> /** * Application client. * * Sends a command to the server and exits after the command is executed. * Exit code is same as exit code send by ClipboardServer::sendMessage(). * Also the received message is printed on standard output (if exit code is * zero) or standard error output. */ class ClipboardClient final : public QObject, public App { Q_OBJECT public: ClipboardClient( int &argc, char **argv, const QStringList &arguments, const QString &sessionName); signals: void functionCallResultReceived(const QByteArray &returnValue); void inputDialogFinished(const QByteArray &data); void dataReceived(const QByteArray &data); private: void onMessageReceived(const QByteArray &data, int messageCode); void onDisconnected(); void onConnectionFailed(); void start(const QStringList &arguments); }; #endif // CLIPBOARDCLIENT_H
1,045
C++
.h
31
30.645161
94
0.764179
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,366
icons.h
hluk_CopyQ/src/gui/icons.h
// This file is generated with "update_icon_font.py" from FontAwesome's metadata. #ifndef ICONS_H #define ICONS_H enum IconId { Icon0 = 0x30, Icon1 = 0x31, Icon2 = 0x32, Icon3 = 0x33, Icon4 = 0x34, Icon5 = 0x35, Icon6 = 0x36, Icon7 = 0x37, Icon8 = 0x38, Icon9 = 0x39, Icon42Group = 0xe080, Icon500Px = 0xf26e, IconA = 0x41, IconAccessibleIcon = 0xf368, IconAccusoft = 0xf369, IconAddressBook = 0xf2b9, IconAddressCard = 0xf2bb, IconAdn = 0xf170, IconAdversal = 0xf36a, IconAffiliatetheme = 0xf36b, IconAirbnb = 0xf834, IconAlgolia = 0xf36c, IconAlignCenter = 0xf037, IconAlignJustify = 0xf039, IconAlignLeft = 0xf036, IconAlignRight = 0xf038, IconAlipay = 0xf642, IconAmazon = 0xf270, IconAmazonPay = 0xf42c, IconAmilia = 0xf36d, IconAnchor = 0xf13d, IconAnchorCircleCheck = 0xe4aa, IconAnchorCircleExclamation = 0xe4ab, IconAnchorCircleXmark = 0xe4ac, IconAnchorLock = 0xe4ad, IconAndroid = 0xf17b, IconAngellist = 0xf209, IconAngleDown = 0xf107, IconAngleLeft = 0xf104, IconAngleRight = 0xf105, IconAngleUp = 0xf106, IconAnglesDown = 0xf103, IconAnglesLeft = 0xf100, IconAnglesRight = 0xf101, IconAnglesUp = 0xf102, IconAngrycreative = 0xf36e, IconAngular = 0xf420, IconAnkh = 0xf644, IconAppStore = 0xf36f, IconAppStoreIos = 0xf370, IconApper = 0xf371, IconApple = 0xf179, IconApplePay = 0xf415, IconAppleWhole = 0xf5d1, IconArchway = 0xf557, IconArrowDown = 0xf063, IconArrowDown19 = 0xf162, IconArrowDown91 = 0xf886, IconArrowDownAZ = 0xf15d, IconArrowDownLong = 0xf175, IconArrowDownShortWide = 0xf884, IconArrowDownUpAcrossLine = 0xe4af, IconArrowDownUpLock = 0xe4b0, IconArrowDownWideShort = 0xf160, IconArrowDownZA = 0xf881, IconArrowLeft = 0xf060, IconArrowLeftLong = 0xf177, IconArrowPointer = 0xf245, IconArrowRight = 0xf061, IconArrowRightArrowLeft = 0xf0ec, IconArrowRightFromBracket = 0xf08b, IconArrowRightLong = 0xf178, IconArrowRightToBracket = 0xf090, IconArrowRightToCity = 0xe4b3, IconArrowRotateLeft = 0xf0e2, IconArrowRotateRight = 0xf01e, IconArrowTrendDown = 0xe097, IconArrowTrendUp = 0xe098, IconArrowTurnDown = 0xf149, IconArrowTurnUp = 0xf148, IconArrowUp = 0xf062, IconArrowUp19 = 0xf163, IconArrowUp91 = 0xf887, IconArrowUpAZ = 0xf15e, IconArrowUpFromBracket = 0xe09a, IconArrowUpFromGroundWater = 0xe4b5, IconArrowUpFromWaterPump = 0xe4b6, IconArrowUpLong = 0xf176, IconArrowUpRightDots = 0xe4b7, IconArrowUpRightFromSquare = 0xf08e, IconArrowUpShortWide = 0xf885, IconArrowUpWideShort = 0xf161, IconArrowUpZA = 0xf882, IconArrowsDownToLine = 0xe4b8, IconArrowsDownToPeople = 0xe4b9, IconArrowsLeftRight = 0xf07e, IconArrowsLeftRightToLine = 0xe4ba, IconArrowsRotate = 0xf021, IconArrowsSpin = 0xe4bb, IconArrowsSplitUpAndLeft = 0xe4bc, IconArrowsToCircle = 0xe4bd, IconArrowsToDot = 0xe4be, IconArrowsToEye = 0xe4bf, IconArrowsTurnRight = 0xe4c0, IconArrowsTurnToDots = 0xe4c1, IconArrowsUpDown = 0xf07d, IconArrowsUpDownLeftRight = 0xf047, IconArrowsUpToLine = 0xe4c2, IconArtstation = 0xf77a, IconAsterisk = 0x2a, IconAsymmetrik = 0xf372, IconAt = 0x40, IconAtlassian = 0xf77b, IconAtom = 0xf5d2, IconAudible = 0xf373, IconAudioDescription = 0xf29e, IconAustralSign = 0xe0a9, IconAutoprefixer = 0xf41c, IconAvianex = 0xf374, IconAviato = 0xf421, IconAward = 0xf559, IconAws = 0xf375, IconB = 0x42, IconBaby = 0xf77c, IconBabyCarriage = 0xf77d, IconBackward = 0xf04a, IconBackwardFast = 0xf049, IconBackwardStep = 0xf048, IconBacon = 0xf7e5, IconBacteria = 0xe059, IconBacterium = 0xe05a, IconBagShopping = 0xf290, IconBahai = 0xf666, IconBahtSign = 0xe0ac, IconBan = 0xf05e, IconBanSmoking = 0xf54d, IconBandage = 0xf462, IconBandcamp = 0xf2d5, IconBangladeshiTakaSign = 0xe2e6, IconBarcode = 0xf02a, IconBars = 0xf0c9, IconBarsProgress = 0xf828, IconBarsStaggered = 0xf550, IconBaseball = 0xf433, IconBaseballBatBall = 0xf432, IconBasketShopping = 0xf291, IconBasketball = 0xf434, IconBath = 0xf2cd, IconBatteryEmpty = 0xf244, IconBatteryFull = 0xf240, IconBatteryHalf = 0xf242, IconBatteryQuarter = 0xf243, IconBatteryThreeQuarters = 0xf241, IconBattleNet = 0xf835, IconBed = 0xf236, IconBedPulse = 0xf487, IconBeerMugEmpty = 0xf0fc, IconBehance = 0xf1b4, IconBell = 0xf0f3, IconBellConcierge = 0xf562, IconBellSlash = 0xf1f6, IconBezierCurve = 0xf55b, IconBicycle = 0xf206, IconBilibili = 0xe3d9, IconBimobject = 0xf378, IconBinoculars = 0xf1e5, IconBiohazard = 0xf780, IconBitbucket = 0xf171, IconBitcoin = 0xf379, IconBitcoinSign = 0xe0b4, IconBity = 0xf37a, IconBlackTie = 0xf27e, IconBlackberry = 0xf37b, IconBlender = 0xf517, IconBlenderPhone = 0xf6b6, IconBlog = 0xf781, IconBlogger = 0xf37c, IconBloggerB = 0xf37d, IconBluesky = 0xe671, IconBluetooth = 0xf293, IconBluetoothB = 0xf294, IconBold = 0xf032, IconBolt = 0xf0e7, IconBoltLightning = 0xe0b7, IconBomb = 0xf1e2, IconBone = 0xf5d7, IconBong = 0xf55c, IconBook = 0xf02d, IconBookAtlas = 0xf558, IconBookBible = 0xf647, IconBookBookmark = 0xe0bb, IconBookJournalWhills = 0xf66a, IconBookMedical = 0xf7e6, IconBookOpen = 0xf518, IconBookOpenReader = 0xf5da, IconBookQuran = 0xf687, IconBookSkull = 0xf6b7, IconBookTanakh = 0xf827, IconBookmark = 0xf02e, IconBootstrap = 0xf836, IconBorderAll = 0xf84c, IconBorderNone = 0xf850, IconBorderTopLeft = 0xf853, IconBoreHole = 0xe4c3, IconBots = 0xe340, IconBottleDroplet = 0xe4c4, IconBottleWater = 0xe4c5, IconBowlFood = 0xe4c6, IconBowlRice = 0xe2eb, IconBowlingBall = 0xf436, IconBox = 0xf466, IconBoxArchive = 0xf187, IconBoxOpen = 0xf49e, IconBoxTissue = 0xe05b, IconBoxesPacking = 0xe4c7, IconBoxesStacked = 0xf468, IconBraille = 0xf2a1, IconBrain = 0xf5dc, IconBrave = 0xe63c, IconBraveReverse = 0xe63d, IconBrazilianRealSign = 0xe46c, IconBreadSlice = 0xf7ec, IconBridge = 0xe4c8, IconBridgeCircleCheck = 0xe4c9, IconBridgeCircleExclamation = 0xe4ca, IconBridgeCircleXmark = 0xe4cb, IconBridgeLock = 0xe4cc, IconBridgeWater = 0xe4ce, IconBriefcase = 0xf0b1, IconBriefcaseMedical = 0xf469, IconBroom = 0xf51a, IconBroomBall = 0xf458, IconBrush = 0xf55d, IconBtc = 0xf15a, IconBucket = 0xe4cf, IconBuffer = 0xf837, IconBug = 0xf188, IconBugSlash = 0xe490, IconBugs = 0xe4d0, IconBuilding = 0xf1ad, IconBuildingCircleArrowRight = 0xe4d1, IconBuildingCircleCheck = 0xe4d2, IconBuildingCircleExclamation = 0xe4d3, IconBuildingCircleXmark = 0xe4d4, IconBuildingColumns = 0xf19c, IconBuildingFlag = 0xe4d5, IconBuildingLock = 0xe4d6, IconBuildingNgo = 0xe4d7, IconBuildingShield = 0xe4d8, IconBuildingUn = 0xe4d9, IconBuildingUser = 0xe4da, IconBuildingWheat = 0xe4db, IconBullhorn = 0xf0a1, IconBullseye = 0xf140, IconBurger = 0xf805, IconBuromobelexperte = 0xf37f, IconBurst = 0xe4dc, IconBus = 0xf207, IconBusSimple = 0xf55e, IconBusinessTime = 0xf64a, IconBuyNLarge = 0xf8a6, IconBuysellads = 0xf20d, IconC = 0x43, IconCableCar = 0xf7da, IconCakeCandles = 0xf1fd, IconCalculator = 0xf1ec, IconCalendar = 0xf133, IconCalendarCheck = 0xf274, IconCalendarDay = 0xf783, IconCalendarDays = 0xf073, IconCalendarMinus = 0xf272, IconCalendarPlus = 0xf271, IconCalendarWeek = 0xf784, IconCalendarXmark = 0xf273, IconCamera = 0xf030, IconCameraRetro = 0xf083, IconCameraRotate = 0xe0d8, IconCampground = 0xf6bb, IconCanadianMapleLeaf = 0xf785, IconCandyCane = 0xf786, IconCannabis = 0xf55f, IconCapsules = 0xf46b, IconCar = 0xf1b9, IconCarBattery = 0xf5df, IconCarBurst = 0xf5e1, IconCarOn = 0xe4dd, IconCarRear = 0xf5de, IconCarSide = 0xf5e4, IconCarTunnel = 0xe4de, IconCaravan = 0xf8ff, IconCaretDown = 0xf0d7, IconCaretLeft = 0xf0d9, IconCaretRight = 0xf0da, IconCaretUp = 0xf0d8, IconCarrot = 0xf787, IconCartArrowDown = 0xf218, IconCartFlatbed = 0xf474, IconCartFlatbedSuitcase = 0xf59d, IconCartPlus = 0xf217, IconCartShopping = 0xf07a, IconCashRegister = 0xf788, IconCat = 0xf6be, IconCcAmazonPay = 0xf42d, IconCcAmex = 0xf1f3, IconCcApplePay = 0xf416, IconCcDinersClub = 0xf24c, IconCcDiscover = 0xf1f2, IconCcJcb = 0xf24b, IconCcMastercard = 0xf1f1, IconCcPaypal = 0xf1f4, IconCcStripe = 0xf1f5, IconCcVisa = 0xf1f0, IconCediSign = 0xe0df, IconCentSign = 0xe3f5, IconCentercode = 0xf380, IconCentos = 0xf789, IconCertificate = 0xf0a3, IconChair = 0xf6c0, IconChalkboard = 0xf51b, IconChalkboardUser = 0xf51c, IconChampagneGlasses = 0xf79f, IconChargingStation = 0xf5e7, IconChartArea = 0xf1fe, IconChartBar = 0xf080, IconChartColumn = 0xe0e3, IconChartGantt = 0xe0e4, IconChartLine = 0xf201, IconChartPie = 0xf200, IconChartSimple = 0xe473, IconCheck = 0xf00c, IconCheckDouble = 0xf560, IconCheckToSlot = 0xf772, IconCheese = 0xf7ef, IconChess = 0xf439, IconChessBishop = 0xf43a, IconChessBoard = 0xf43c, IconChessKing = 0xf43f, IconChessKnight = 0xf441, IconChessPawn = 0xf443, IconChessQueen = 0xf445, IconChessRook = 0xf447, IconChevronDown = 0xf078, IconChevronLeft = 0xf053, IconChevronRight = 0xf054, IconChevronUp = 0xf077, IconChild = 0xf1ae, IconChildCombatant = 0xe4e0, IconChildDress = 0xe59c, IconChildReaching = 0xe59d, IconChildren = 0xe4e1, IconChrome = 0xf268, IconChromecast = 0xf838, IconChurch = 0xf51d, IconCircle = 0xf111, IconCircleArrowDown = 0xf0ab, IconCircleArrowLeft = 0xf0a8, IconCircleArrowRight = 0xf0a9, IconCircleArrowUp = 0xf0aa, IconCircleCheck = 0xf058, IconCircleChevronDown = 0xf13a, IconCircleChevronLeft = 0xf137, IconCircleChevronRight = 0xf138, IconCircleChevronUp = 0xf139, IconCircleDollarToSlot = 0xf4b9, IconCircleDot = 0xf192, IconCircleDown = 0xf358, IconCircleExclamation = 0xf06a, IconCircleH = 0xf47e, IconCircleHalfStroke = 0xf042, IconCircleInfo = 0xf05a, IconCircleLeft = 0xf359, IconCircleMinus = 0xf056, IconCircleNodes = 0xe4e2, IconCircleNotch = 0xf1ce, IconCirclePause = 0xf28b, IconCirclePlay = 0xf144, IconCirclePlus = 0xf055, IconCircleQuestion = 0xf059, IconCircleRadiation = 0xf7ba, IconCircleRight = 0xf35a, IconCircleStop = 0xf28d, IconCircleUp = 0xf35b, IconCircleUser = 0xf2bd, IconCircleXmark = 0xf057, IconCity = 0xf64f, IconClapperboard = 0xe131, IconClipboard = 0xf328, IconClipboardCheck = 0xf46c, IconClipboardList = 0xf46d, IconClipboardQuestion = 0xe4e3, IconClipboardUser = 0xf7f3, IconClock = 0xf017, IconClockRotateLeft = 0xf1da, IconClone = 0xf24d, IconClosedCaptioning = 0xf20a, IconCloud = 0xf0c2, IconCloudArrowDown = 0xf0ed, IconCloudArrowUp = 0xf0ee, IconCloudBolt = 0xf76c, IconCloudMeatball = 0xf73b, IconCloudMoon = 0xf6c3, IconCloudMoonRain = 0xf73c, IconCloudRain = 0xf73d, IconCloudShowersHeavy = 0xf740, IconCloudShowersWater = 0xe4e4, IconCloudSun = 0xf6c4, IconCloudSunRain = 0xf743, IconCloudflare = 0xe07d, IconCloudscale = 0xf383, IconCloudsmith = 0xf384, IconCloudversify = 0xf385, IconClover = 0xe139, IconCmplid = 0xe360, IconCode = 0xf121, IconCodeBranch = 0xf126, IconCodeCommit = 0xf386, IconCodeCompare = 0xe13a, IconCodeFork = 0xe13b, IconCodeMerge = 0xf387, IconCodePullRequest = 0xe13c, IconCodepen = 0xf1cb, IconCodiepie = 0xf284, IconCoins = 0xf51e, IconColonSign = 0xe140, IconComment = 0xf075, IconCommentDollar = 0xf651, IconCommentDots = 0xf4ad, IconCommentMedical = 0xf7f5, IconCommentSlash = 0xf4b3, IconCommentSms = 0xf7cd, IconComments = 0xf086, IconCommentsDollar = 0xf653, IconCompactDisc = 0xf51f, IconCompass = 0xf14e, IconCompassDrafting = 0xf568, IconCompress = 0xf066, IconComputer = 0xe4e5, IconComputerMouse = 0xf8cc, IconConfluence = 0xf78d, IconConnectdevelop = 0xf20e, IconContao = 0xf26d, IconCookie = 0xf563, IconCookieBite = 0xf564, IconCopy = 0xf0c5, IconCopyright = 0xf1f9, IconCottonBureau = 0xf89e, IconCouch = 0xf4b8, IconCow = 0xf6c8, IconCpanel = 0xf388, IconCreativeCommons = 0xf25e, IconCreativeCommonsBy = 0xf4e7, IconCreativeCommonsNc = 0xf4e8, IconCreativeCommonsNcEu = 0xf4e9, IconCreativeCommonsNcJp = 0xf4ea, IconCreativeCommonsNd = 0xf4eb, IconCreativeCommonsPd = 0xf4ec, IconCreativeCommonsPdAlt = 0xf4ed, IconCreativeCommonsRemix = 0xf4ee, IconCreativeCommonsSa = 0xf4ef, IconCreativeCommonsSampling = 0xf4f0, IconCreativeCommonsSamplingPlus = 0xf4f1, IconCreativeCommonsShare = 0xf4f2, IconCreativeCommonsZero = 0xf4f3, IconCreditCard = 0xf09d, IconCriticalRole = 0xf6c9, IconCrop = 0xf125, IconCropSimple = 0xf565, IconCross = 0xf654, IconCrosshairs = 0xf05b, IconCrow = 0xf520, IconCrown = 0xf521, IconCrutch = 0xf7f7, IconCruzeiroSign = 0xe152, IconCss3 = 0xf13c, IconCss3Alt = 0xf38b, IconCube = 0xf1b2, IconCubes = 0xf1b3, IconCubesStacked = 0xe4e6, IconCuttlefish = 0xf38c, IconD = 0x44, IconDAndD = 0xf38d, IconDAndDBeyond = 0xf6ca, IconDailymotion = 0xe052, IconDartLang = 0xe693, IconDashcube = 0xf210, IconDatabase = 0xf1c0, IconDebian = 0xe60b, IconDeezer = 0xe077, IconDeleteLeft = 0xf55a, IconDelicious = 0xf1a5, IconDemocrat = 0xf747, IconDeploydog = 0xf38e, IconDeskpro = 0xf38f, IconDesktop = 0xf390, IconDev = 0xf6cc, IconDeviantart = 0xf1bd, IconDharmachakra = 0xf655, IconDhl = 0xf790, IconDiagramNext = 0xe476, IconDiagramPredecessor = 0xe477, IconDiagramProject = 0xf542, IconDiagramSuccessor = 0xe47a, IconDiamond = 0xf219, IconDiamondTurnRight = 0xf5eb, IconDiaspora = 0xf791, IconDice = 0xf522, IconDiceD20 = 0xf6cf, IconDiceD6 = 0xf6d1, IconDiceFive = 0xf523, IconDiceFour = 0xf524, IconDiceOne = 0xf525, IconDiceSix = 0xf526, IconDiceThree = 0xf527, IconDiceTwo = 0xf528, IconDigg = 0xf1a6, IconDigitalOcean = 0xf391, IconDiscord = 0xf392, IconDiscourse = 0xf393, IconDisease = 0xf7fa, IconDisplay = 0xe163, IconDivide = 0xf529, IconDna = 0xf471, IconDochub = 0xf394, IconDocker = 0xf395, IconDog = 0xf6d3, IconDollarSign = 0x24, IconDolly = 0xf472, IconDongSign = 0xe169, IconDoorClosed = 0xf52a, IconDoorOpen = 0xf52b, IconDove = 0xf4ba, IconDownLeftAndUpRightToCenter = 0xf422, IconDownLong = 0xf309, IconDownload = 0xf019, IconDraft2Digital = 0xf396, IconDragon = 0xf6d5, IconDrawPolygon = 0xf5ee, IconDribbble = 0xf17d, IconDropbox = 0xf16b, IconDroplet = 0xf043, IconDropletSlash = 0xf5c7, IconDrum = 0xf569, IconDrumSteelpan = 0xf56a, IconDrumstickBite = 0xf6d7, IconDrupal = 0xf1a9, IconDumbbell = 0xf44b, IconDumpster = 0xf793, IconDumpsterFire = 0xf794, IconDungeon = 0xf6d9, IconDyalog = 0xf399, IconE = 0x45, IconEarDeaf = 0xf2a4, IconEarListen = 0xf2a2, IconEarlybirds = 0xf39a, IconEarthAfrica = 0xf57c, IconEarthAmericas = 0xf57d, IconEarthAsia = 0xf57e, IconEarthEurope = 0xf7a2, IconEarthOceania = 0xe47b, IconEbay = 0xf4f4, IconEdge = 0xf282, IconEdgeLegacy = 0xe078, IconEgg = 0xf7fb, IconEject = 0xf052, IconElementor = 0xf430, IconElevator = 0xe16d, IconEllipsis = 0xf141, IconEllipsisVertical = 0xf142, IconEllo = 0xf5f1, IconEmber = 0xf423, IconEmpire = 0xf1d1, IconEnvelope = 0xf0e0, IconEnvelopeCircleCheck = 0xe4e8, IconEnvelopeOpen = 0xf2b6, IconEnvelopeOpenText = 0xf658, IconEnvelopesBulk = 0xf674, IconEnvira = 0xf299, IconEquals = 0x3d, IconEraser = 0xf12d, IconErlang = 0xf39d, IconEthereum = 0xf42e, IconEthernet = 0xf796, IconEtsy = 0xf2d7, IconEuroSign = 0xf153, IconEvernote = 0xf839, IconExclamation = 0x21, IconExpand = 0xf065, IconExpeditedssl = 0xf23e, IconExplosion = 0xe4e9, IconEye = 0xf06e, IconEyeDropper = 0xf1fb, IconEyeLowVision = 0xf2a8, IconEyeSlash = 0xf070, IconF = 0x46, IconFaceAngry = 0xf556, IconFaceDizzy = 0xf567, IconFaceFlushed = 0xf579, IconFaceFrown = 0xf119, IconFaceFrownOpen = 0xf57a, IconFaceGrimace = 0xf57f, IconFaceGrin = 0xf580, IconFaceGrinBeam = 0xf582, IconFaceGrinBeamSweat = 0xf583, IconFaceGrinHearts = 0xf584, IconFaceGrinSquint = 0xf585, IconFaceGrinSquintTears = 0xf586, IconFaceGrinStars = 0xf587, IconFaceGrinTears = 0xf588, IconFaceGrinTongue = 0xf589, IconFaceGrinTongueSquint = 0xf58a, IconFaceGrinTongueWink = 0xf58b, IconFaceGrinWide = 0xf581, IconFaceGrinWink = 0xf58c, IconFaceKiss = 0xf596, IconFaceKissBeam = 0xf597, IconFaceKissWinkHeart = 0xf598, IconFaceLaugh = 0xf599, IconFaceLaughBeam = 0xf59a, IconFaceLaughSquint = 0xf59b, IconFaceLaughWink = 0xf59c, IconFaceMeh = 0xf11a, IconFaceMehBlank = 0xf5a4, IconFaceRollingEyes = 0xf5a5, IconFaceSadCry = 0xf5b3, IconFaceSadTear = 0xf5b4, IconFaceSmile = 0xf118, IconFaceSmileBeam = 0xf5b8, IconFaceSmileWink = 0xf4da, IconFaceSurprise = 0xf5c2, IconFaceTired = 0xf5c8, IconFacebook = 0xf09a, IconFacebookF = 0xf39e, IconFacebookMessenger = 0xf39f, IconFan = 0xf863, IconFantasyFlightGames = 0xf6dc, IconFaucet = 0xe005, IconFaucetDrip = 0xe006, IconFax = 0xf1ac, IconFeather = 0xf52d, IconFeatherPointed = 0xf56b, IconFedex = 0xf797, IconFedora = 0xf798, IconFerry = 0xe4ea, IconFigma = 0xf799, IconFile = 0xf15b, IconFileArrowDown = 0xf56d, IconFileArrowUp = 0xf574, IconFileAudio = 0xf1c7, IconFileCircleCheck = 0xe5a0, IconFileCircleExclamation = 0xe4eb, IconFileCircleMinus = 0xe4ed, IconFileCirclePlus = 0xe494, IconFileCircleQuestion = 0xe4ef, IconFileCircleXmark = 0xe5a1, IconFileCode = 0xf1c9, IconFileContract = 0xf56c, IconFileCsv = 0xf6dd, IconFileExcel = 0xf1c3, IconFileExport = 0xf56e, IconFileImage = 0xf1c5, IconFileImport = 0xf56f, IconFileInvoice = 0xf570, IconFileInvoiceDollar = 0xf571, IconFileLines = 0xf15c, IconFileMedical = 0xf477, IconFilePdf = 0xf1c1, IconFilePen = 0xf31c, IconFilePowerpoint = 0xf1c4, IconFilePrescription = 0xf572, IconFileShield = 0xe4f0, IconFileSignature = 0xf573, IconFileVideo = 0xf1c8, IconFileWaveform = 0xf478, IconFileWord = 0xf1c2, IconFileZipper = 0xf1c6, IconFill = 0xf575, IconFillDrip = 0xf576, IconFilm = 0xf008, IconFilter = 0xf0b0, IconFilterCircleDollar = 0xf662, IconFilterCircleXmark = 0xe17b, IconFingerprint = 0xf577, IconFire = 0xf06d, IconFireBurner = 0xe4f1, IconFireExtinguisher = 0xf134, IconFireFlameCurved = 0xf7e4, IconFireFlameSimple = 0xf46a, IconFirefox = 0xf269, IconFirefoxBrowser = 0xe007, IconFirstOrder = 0xf2b0, IconFirstOrderAlt = 0xf50a, IconFirstdraft = 0xf3a1, IconFish = 0xf578, IconFishFins = 0xe4f2, IconFlag = 0xf024, IconFlagCheckered = 0xf11e, IconFlagUsa = 0xf74d, IconFlask = 0xf0c3, IconFlaskVial = 0xe4f3, IconFlickr = 0xf16e, IconFlipboard = 0xf44d, IconFloppyDisk = 0xf0c7, IconFlorinSign = 0xe184, IconFlutter = 0xe694, IconFly = 0xf417, IconFolder = 0xf07b, IconFolderClosed = 0xe185, IconFolderMinus = 0xf65d, IconFolderOpen = 0xf07c, IconFolderPlus = 0xf65e, IconFolderTree = 0xf802, IconFont = 0xf031, IconFontAwesome = 0xf2b4, IconFonticons = 0xf280, IconFonticonsFi = 0xf3a2, IconFootball = 0xf44e, IconFortAwesome = 0xf286, IconFortAwesomeAlt = 0xf3a3, IconForumbee = 0xf211, IconForward = 0xf04e, IconForwardFast = 0xf050, IconForwardStep = 0xf051, IconFoursquare = 0xf180, IconFrancSign = 0xe18f, IconFreeCodeCamp = 0xf2c5, IconFreebsd = 0xf3a4, IconFrog = 0xf52e, IconFulcrum = 0xf50b, IconFutbol = 0xf1e3, IconG = 0x47, IconGalacticRepublic = 0xf50c, IconGalacticSenate = 0xf50d, IconGamepad = 0xf11b, IconGasPump = 0xf52f, IconGauge = 0xf624, IconGaugeHigh = 0xf625, IconGaugeSimple = 0xf629, IconGaugeSimpleHigh = 0xf62a, IconGavel = 0xf0e3, IconGear = 0xf013, IconGears = 0xf085, IconGem = 0xf3a5, IconGenderless = 0xf22d, IconGetPocket = 0xf265, IconGg = 0xf260, IconGgCircle = 0xf261, IconGhost = 0xf6e2, IconGift = 0xf06b, IconGifts = 0xf79c, IconGit = 0xf1d3, IconGitAlt = 0xf841, IconGithub = 0xf09b, IconGithubAlt = 0xf113, IconGitkraken = 0xf3a6, IconGitlab = 0xf296, IconGitter = 0xf426, IconGlassWater = 0xe4f4, IconGlassWaterDroplet = 0xe4f5, IconGlasses = 0xf530, IconGlide = 0xf2a5, IconGlideG = 0xf2a6, IconGlobe = 0xf0ac, IconGofore = 0xf3a7, IconGolang = 0xe40f, IconGolfBallTee = 0xf450, IconGoodreads = 0xf3a8, IconGoodreadsG = 0xf3a9, IconGoogle = 0xf1a0, IconGoogleDrive = 0xf3aa, IconGooglePay = 0xe079, IconGooglePlay = 0xf3ab, IconGooglePlus = 0xf2b3, IconGooglePlusG = 0xf0d5, IconGoogleScholar = 0xe63b, IconGoogleWallet = 0xf1ee, IconGopuram = 0xf664, IconGraduationCap = 0xf19d, IconGratipay = 0xf184, IconGrav = 0xf2d6, IconGreaterThan = 0x3e, IconGreaterThanEqual = 0xf532, IconGrip = 0xf58d, IconGripLines = 0xf7a4, IconGripLinesVertical = 0xf7a5, IconGripVertical = 0xf58e, IconGripfire = 0xf3ac, IconGroupArrowsRotate = 0xe4f6, IconGrunt = 0xf3ad, IconGuaraniSign = 0xe19a, IconGuilded = 0xe07e, IconGuitar = 0xf7a6, IconGulp = 0xf3ae, IconGun = 0xe19b, IconH = 0x48, IconHackerNews = 0xf1d4, IconHackerrank = 0xf5f7, IconHammer = 0xf6e3, IconHamsa = 0xf665, IconHand = 0xf256, IconHandBackFist = 0xf255, IconHandDots = 0xf461, IconHandFist = 0xf6de, IconHandHolding = 0xf4bd, IconHandHoldingDollar = 0xf4c0, IconHandHoldingDroplet = 0xf4c1, IconHandHoldingHand = 0xe4f7, IconHandHoldingHeart = 0xf4be, IconHandHoldingMedical = 0xe05c, IconHandLizard = 0xf258, IconHandMiddleFinger = 0xf806, IconHandPeace = 0xf25b, IconHandPointDown = 0xf0a7, IconHandPointLeft = 0xf0a5, IconHandPointRight = 0xf0a4, IconHandPointUp = 0xf0a6, IconHandPointer = 0xf25a, IconHandScissors = 0xf257, IconHandSparkles = 0xe05d, IconHandSpock = 0xf259, IconHandcuffs = 0xe4f8, IconHands = 0xf2a7, IconHandsAslInterpreting = 0xf2a3, IconHandsBound = 0xe4f9, IconHandsBubbles = 0xe05e, IconHandsClapping = 0xe1a8, IconHandsHolding = 0xf4c2, IconHandsHoldingChild = 0xe4fa, IconHandsHoldingCircle = 0xe4fb, IconHandsPraying = 0xf684, IconHandshake = 0xf2b5, IconHandshakeAngle = 0xf4c4, IconHandshakeSimple = 0xf4c6, IconHandshakeSimpleSlash = 0xe05f, IconHandshakeSlash = 0xe060, IconHanukiah = 0xf6e6, IconHardDrive = 0xf0a0, IconHashnode = 0xe499, IconHashtag = 0x23, IconHatCowboy = 0xf8c0, IconHatCowboySide = 0xf8c1, IconHatWizard = 0xf6e8, IconHeadSideCough = 0xe061, IconHeadSideCoughSlash = 0xe062, IconHeadSideMask = 0xe063, IconHeadSideVirus = 0xe064, IconHeading = 0xf1dc, IconHeadphones = 0xf025, IconHeadphonesSimple = 0xf58f, IconHeadset = 0xf590, IconHeart = 0xf004, IconHeartCircleBolt = 0xe4fc, IconHeartCircleCheck = 0xe4fd, IconHeartCircleExclamation = 0xe4fe, IconHeartCircleMinus = 0xe4ff, IconHeartCirclePlus = 0xe500, IconHeartCircleXmark = 0xe501, IconHeartCrack = 0xf7a9, IconHeartPulse = 0xf21e, IconHelicopter = 0xf533, IconHelicopterSymbol = 0xe502, IconHelmetSafety = 0xf807, IconHelmetUn = 0xe503, IconHighlighter = 0xf591, IconHillAvalanche = 0xe507, IconHillRockslide = 0xe508, IconHippo = 0xf6ed, IconHips = 0xf452, IconHireAHelper = 0xf3b0, IconHive = 0xe07f, IconHockeyPuck = 0xf453, IconHollyBerry = 0xf7aa, IconHooli = 0xf427, IconHornbill = 0xf592, IconHorse = 0xf6f0, IconHorseHead = 0xf7ab, IconHospital = 0xf0f8, IconHospitalUser = 0xf80d, IconHotTubPerson = 0xf593, IconHotdog = 0xf80f, IconHotel = 0xf594, IconHotjar = 0xf3b1, IconHourglass = 0xf254, IconHourglassEnd = 0xf253, IconHourglassHalf = 0xf252, IconHourglassStart = 0xf251, IconHouse = 0xf015, IconHouseChimney = 0xe3af, IconHouseChimneyCrack = 0xf6f1, IconHouseChimneyMedical = 0xf7f2, IconHouseChimneyUser = 0xe065, IconHouseChimneyWindow = 0xe00d, IconHouseCircleCheck = 0xe509, IconHouseCircleExclamation = 0xe50a, IconHouseCircleXmark = 0xe50b, IconHouseCrack = 0xe3b1, IconHouseFire = 0xe50c, IconHouseFlag = 0xe50d, IconHouseFloodWater = 0xe50e, IconHouseFloodWaterCircleArrowRight = 0xe50f, IconHouseLaptop = 0xe066, IconHouseLock = 0xe510, IconHouseMedical = 0xe3b2, IconHouseMedicalCircleCheck = 0xe511, IconHouseMedicalCircleExclamation = 0xe512, IconHouseMedicalCircleXmark = 0xe513, IconHouseMedicalFlag = 0xe514, IconHouseSignal = 0xe012, IconHouseTsunami = 0xe515, IconHouseUser = 0xe1b0, IconHouzz = 0xf27c, IconHryvniaSign = 0xf6f2, IconHtml5 = 0xf13b, IconHubspot = 0xf3b2, IconHurricane = 0xf751, IconI = 0x49, IconICursor = 0xf246, IconIceCream = 0xf810, IconIcicles = 0xf7ad, IconIcons = 0xf86d, IconIdBadge = 0xf2c1, IconIdCard = 0xf2c2, IconIdCardClip = 0xf47f, IconIdeal = 0xe013, IconIgloo = 0xf7ae, IconImage = 0xf03e, IconImagePortrait = 0xf3e0, IconImages = 0xf302, IconImdb = 0xf2d8, IconInbox = 0xf01c, IconIndent = 0xf03c, IconIndianRupeeSign = 0xe1bc, IconIndustry = 0xf275, IconInfinity = 0xf534, IconInfo = 0xf129, IconInstagram = 0xf16d, IconInstalod = 0xe081, IconIntercom = 0xf7af, IconInternetExplorer = 0xf26b, IconInvision = 0xf7b0, IconIoxhost = 0xf208, IconItalic = 0xf033, IconItchIo = 0xf83a, IconItunes = 0xf3b4, IconItunesNote = 0xf3b5, IconJ = 0x4a, IconJar = 0xe516, IconJarWheat = 0xe517, IconJava = 0xf4e4, IconJedi = 0xf669, IconJediOrder = 0xf50e, IconJenkins = 0xf3b6, IconJetFighter = 0xf0fb, IconJetFighterUp = 0xe518, IconJira = 0xf7b1, IconJoget = 0xf3b7, IconJoint = 0xf595, IconJoomla = 0xf1aa, IconJs = 0xf3b8, IconJsfiddle = 0xf1cc, IconJugDetergent = 0xe519, IconJxl = 0xe67b, IconK = 0x4b, IconKaaba = 0xf66b, IconKaggle = 0xf5fa, IconKey = 0xf084, IconKeybase = 0xf4f5, IconKeyboard = 0xf11c, IconKeycdn = 0xf3ba, IconKhanda = 0xf66d, IconKickstarter = 0xf3bb, IconKickstarterK = 0xf3bc, IconKipSign = 0xe1c4, IconKitMedical = 0xf479, IconKitchenSet = 0xe51a, IconKiwiBird = 0xf535, IconKorvue = 0xf42f, IconL = 0x4c, IconLandMineOn = 0xe51b, IconLandmark = 0xf66f, IconLandmarkDome = 0xf752, IconLandmarkFlag = 0xe51c, IconLanguage = 0xf1ab, IconLaptop = 0xf109, IconLaptopCode = 0xf5fc, IconLaptopFile = 0xe51d, IconLaptopMedical = 0xf812, IconLaravel = 0xf3bd, IconLariSign = 0xe1c8, IconLastfm = 0xf202, IconLayerGroup = 0xf5fd, IconLeaf = 0xf06c, IconLeanpub = 0xf212, IconLeftLong = 0xf30a, IconLeftRight = 0xf337, IconLemon = 0xf094, IconLess = 0xf41d, IconLessThan = 0x3c, IconLessThanEqual = 0xf537, IconLetterboxd = 0xe62d, IconLifeRing = 0xf1cd, IconLightbulb = 0xf0eb, IconLine = 0xf3c0, IconLinesLeaning = 0xe51e, IconLink = 0xf0c1, IconLinkSlash = 0xf127, IconLinkedin = 0xf08c, IconLinkedinIn = 0xf0e1, IconLinode = 0xf2b8, IconLinux = 0xf17c, IconLiraSign = 0xf195, IconList = 0xf03a, IconListCheck = 0xf0ae, IconListOl = 0xf0cb, IconListUl = 0xf0ca, IconLitecoinSign = 0xe1d3, IconLocationArrow = 0xf124, IconLocationCrosshairs = 0xf601, IconLocationDot = 0xf3c5, IconLocationPin = 0xf041, IconLocationPinLock = 0xe51f, IconLock = 0xf023, IconLockOpen = 0xf3c1, IconLocust = 0xe520, IconLungs = 0xf604, IconLungsVirus = 0xe067, IconLyft = 0xf3c3, IconM = 0x4d, IconMagento = 0xf3c4, IconMagnet = 0xf076, IconMagnifyingGlass = 0xf002, IconMagnifyingGlassArrowRight = 0xe521, IconMagnifyingGlassChart = 0xe522, IconMagnifyingGlassDollar = 0xf688, IconMagnifyingGlassLocation = 0xf689, IconMagnifyingGlassMinus = 0xf010, IconMagnifyingGlassPlus = 0xf00e, IconMailchimp = 0xf59e, IconManatSign = 0xe1d5, IconMandalorian = 0xf50f, IconMap = 0xf279, IconMapLocation = 0xf59f, IconMapLocationDot = 0xf5a0, IconMapPin = 0xf276, IconMarkdown = 0xf60f, IconMarker = 0xf5a1, IconMars = 0xf222, IconMarsAndVenus = 0xf224, IconMarsAndVenusBurst = 0xe523, IconMarsDouble = 0xf227, IconMarsStroke = 0xf229, IconMarsStrokeRight = 0xf22b, IconMarsStrokeUp = 0xf22a, IconMartiniGlass = 0xf57b, IconMartiniGlassCitrus = 0xf561, IconMartiniGlassEmpty = 0xf000, IconMask = 0xf6fa, IconMaskFace = 0xe1d7, IconMaskVentilator = 0xe524, IconMasksTheater = 0xf630, IconMastodon = 0xf4f6, IconMattressPillow = 0xe525, IconMaxcdn = 0xf136, IconMaximize = 0xf31e, IconMdb = 0xf8ca, IconMedal = 0xf5a2, IconMedapps = 0xf3c6, IconMedium = 0xf23a, IconMedrt = 0xf3c8, IconMeetup = 0xf2e0, IconMegaport = 0xf5a3, IconMemory = 0xf538, IconMendeley = 0xf7b3, IconMenorah = 0xf676, IconMercury = 0xf223, IconMessage = 0xf27a, IconMeta = 0xe49b, IconMeteor = 0xf753, IconMicroblog = 0xe01a, IconMicrochip = 0xf2db, IconMicrophone = 0xf130, IconMicrophoneLines = 0xf3c9, IconMicrophoneLinesSlash = 0xf539, IconMicrophoneSlash = 0xf131, IconMicroscope = 0xf610, IconMicrosoft = 0xf3ca, IconMillSign = 0xe1ed, IconMinimize = 0xf78c, IconMintbit = 0xe62f, IconMinus = 0xf068, IconMitten = 0xf7b5, IconMix = 0xf3cb, IconMixcloud = 0xf289, IconMixer = 0xe056, IconMizuni = 0xf3cc, IconMobile = 0xf3ce, IconMobileButton = 0xf10b, IconMobileRetro = 0xe527, IconMobileScreen = 0xf3cf, IconMobileScreenButton = 0xf3cd, IconModx = 0xf285, IconMonero = 0xf3d0, IconMoneyBill = 0xf0d6, IconMoneyBill1 = 0xf3d1, IconMoneyBill1Wave = 0xf53b, IconMoneyBillTransfer = 0xe528, IconMoneyBillTrendUp = 0xe529, IconMoneyBillWave = 0xf53a, IconMoneyBillWheat = 0xe52a, IconMoneyBills = 0xe1f3, IconMoneyCheck = 0xf53c, IconMoneyCheckDollar = 0xf53d, IconMonument = 0xf5a6, IconMoon = 0xf186, IconMortarPestle = 0xf5a7, IconMosque = 0xf678, IconMosquito = 0xe52b, IconMosquitoNet = 0xe52c, IconMotorcycle = 0xf21c, IconMound = 0xe52d, IconMountain = 0xf6fc, IconMountainCity = 0xe52e, IconMountainSun = 0xe52f, IconMugHot = 0xf7b6, IconMugSaucer = 0xf0f4, IconMusic = 0xf001, IconN = 0x4e, IconNairaSign = 0xe1f6, IconNapster = 0xf3d2, IconNeos = 0xf612, IconNetworkWired = 0xf6ff, IconNeuter = 0xf22c, IconNewspaper = 0xf1ea, IconNfcDirectional = 0xe530, IconNfcSymbol = 0xe531, IconNimblr = 0xf5a8, IconNode = 0xf419, IconNodeJs = 0xf3d3, IconNotEqual = 0xf53e, IconNotdef = 0xe1fe, IconNoteSticky = 0xf249, IconNotesMedical = 0xf481, IconNpm = 0xf3d4, IconNs8 = 0xf3d5, IconNutritionix = 0xf3d6, IconO = 0x4f, IconObjectGroup = 0xf247, IconObjectUngroup = 0xf248, IconOctopusDeploy = 0xe082, IconOdnoklassniki = 0xf263, IconOdysee = 0xe5c6, IconOilCan = 0xf613, IconOilWell = 0xe532, IconOldRepublic = 0xf510, IconOm = 0xf679, IconOpencart = 0xf23d, IconOpenid = 0xf19b, IconOpensuse = 0xe62b, IconOpera = 0xf26a, IconOptinMonster = 0xf23c, IconOrcid = 0xf8d2, IconOsi = 0xf41a, IconOtter = 0xf700, IconOutdent = 0xf03b, IconP = 0x50, IconPadlet = 0xe4a0, IconPage4 = 0xf3d7, IconPagelines = 0xf18c, IconPager = 0xf815, IconPaintRoller = 0xf5aa, IconPaintbrush = 0xf1fc, IconPalette = 0xf53f, IconPalfed = 0xf3d8, IconPallet = 0xf482, IconPanorama = 0xe209, IconPaperPlane = 0xf1d8, IconPaperclip = 0xf0c6, IconParachuteBox = 0xf4cd, IconParagraph = 0xf1dd, IconPassport = 0xf5ab, IconPaste = 0xf0ea, IconPatreon = 0xf3d9, IconPause = 0xf04c, IconPaw = 0xf1b0, IconPaypal = 0xf1ed, IconPeace = 0xf67c, IconPen = 0xf304, IconPenClip = 0xf305, IconPenFancy = 0xf5ac, IconPenNib = 0xf5ad, IconPenRuler = 0xf5ae, IconPenToSquare = 0xf044, IconPencil = 0xf303, IconPeopleArrows = 0xe068, IconPeopleCarryBox = 0xf4ce, IconPeopleGroup = 0xe533, IconPeopleLine = 0xe534, IconPeoplePulling = 0xe535, IconPeopleRobbery = 0xe536, IconPeopleRoof = 0xe537, IconPepperHot = 0xf816, IconPerbyte = 0xe083, IconPercent = 0x25, IconPeriscope = 0xf3da, IconPerson = 0xf183, IconPersonArrowDownToLine = 0xe538, IconPersonArrowUpFromLine = 0xe539, IconPersonBiking = 0xf84a, IconPersonBooth = 0xf756, IconPersonBreastfeeding = 0xe53a, IconPersonBurst = 0xe53b, IconPersonCane = 0xe53c, IconPersonChalkboard = 0xe53d, IconPersonCircleCheck = 0xe53e, IconPersonCircleExclamation = 0xe53f, IconPersonCircleMinus = 0xe540, IconPersonCirclePlus = 0xe541, IconPersonCircleQuestion = 0xe542, IconPersonCircleXmark = 0xe543, IconPersonDigging = 0xf85e, IconPersonDotsFromLine = 0xf470, IconPersonDress = 0xf182, IconPersonDressBurst = 0xe544, IconPersonDrowning = 0xe545, IconPersonFalling = 0xe546, IconPersonFallingBurst = 0xe547, IconPersonHalfDress = 0xe548, IconPersonHarassing = 0xe549, IconPersonHiking = 0xf6ec, IconPersonMilitaryPointing = 0xe54a, IconPersonMilitaryRifle = 0xe54b, IconPersonMilitaryToPerson = 0xe54c, IconPersonPraying = 0xf683, IconPersonPregnant = 0xe31e, IconPersonRays = 0xe54d, IconPersonRifle = 0xe54e, IconPersonRunning = 0xf70c, IconPersonShelter = 0xe54f, IconPersonSkating = 0xf7c5, IconPersonSkiing = 0xf7c9, IconPersonSkiingNordic = 0xf7ca, IconPersonSnowboarding = 0xf7ce, IconPersonSwimming = 0xf5c4, IconPersonThroughWindow = 0xe5a9, IconPersonWalking = 0xf554, IconPersonWalkingArrowLoopLeft = 0xe551, IconPersonWalkingArrowRight = 0xe552, IconPersonWalkingDashedLineArrowRight = 0xe553, IconPersonWalkingLuggage = 0xe554, IconPersonWalkingWithCane = 0xf29d, IconPesetaSign = 0xe221, IconPesoSign = 0xe222, IconPhabricator = 0xf3db, IconPhoenixFramework = 0xf3dc, IconPhoenixSquadron = 0xf511, IconPhone = 0xf095, IconPhoneFlip = 0xf879, IconPhoneSlash = 0xf3dd, IconPhoneVolume = 0xf2a0, IconPhotoFilm = 0xf87c, IconPhp = 0xf457, IconPiedPiper = 0xf2ae, IconPiedPiperAlt = 0xf1a8, IconPiedPiperHat = 0xf4e5, IconPiedPiperPp = 0xf1a7, IconPiggyBank = 0xf4d3, IconPills = 0xf484, IconPinterest = 0xf0d2, IconPinterestP = 0xf231, IconPix = 0xe43a, IconPixiv = 0xe640, IconPizzaSlice = 0xf818, IconPlaceOfWorship = 0xf67f, IconPlane = 0xf072, IconPlaneArrival = 0xf5af, IconPlaneCircleCheck = 0xe555, IconPlaneCircleExclamation = 0xe556, IconPlaneCircleXmark = 0xe557, IconPlaneDeparture = 0xf5b0, IconPlaneLock = 0xe558, IconPlaneSlash = 0xe069, IconPlaneUp = 0xe22d, IconPlantWilt = 0xe5aa, IconPlateWheat = 0xe55a, IconPlay = 0xf04b, IconPlaystation = 0xf3df, IconPlug = 0xf1e6, IconPlugCircleBolt = 0xe55b, IconPlugCircleCheck = 0xe55c, IconPlugCircleExclamation = 0xe55d, IconPlugCircleMinus = 0xe55e, IconPlugCirclePlus = 0xe55f, IconPlugCircleXmark = 0xe560, IconPlus = 0x2b, IconPlusMinus = 0xe43c, IconPodcast = 0xf2ce, IconPoo = 0xf2fe, IconPooStorm = 0xf75a, IconPoop = 0xf619, IconPowerOff = 0xf011, IconPrescription = 0xf5b1, IconPrescriptionBottle = 0xf485, IconPrescriptionBottleMedical = 0xf486, IconPrint = 0xf02f, IconProductHunt = 0xf288, IconPumpMedical = 0xe06a, IconPumpSoap = 0xe06b, IconPushed = 0xf3e1, IconPuzzlePiece = 0xf12e, IconPython = 0xf3e2, IconQ = 0x51, IconQq = 0xf1d6, IconQrcode = 0xf029, IconQuestion = 0x3f, IconQuinscape = 0xf459, IconQuora = 0xf2c4, IconQuoteLeft = 0xf10d, IconQuoteRight = 0xf10e, IconR = 0x52, IconRProject = 0xf4f7, IconRadiation = 0xf7b9, IconRadio = 0xf8d7, IconRainbow = 0xf75b, IconRankingStar = 0xe561, IconRaspberryPi = 0xf7bb, IconRavelry = 0xf2d9, IconReact = 0xf41b, IconReacteurope = 0xf75d, IconReadme = 0xf4d5, IconRebel = 0xf1d0, IconReceipt = 0xf543, IconRecordVinyl = 0xf8d9, IconRectangleAd = 0xf641, IconRectangleList = 0xf022, IconRectangleXmark = 0xf410, IconRecycle = 0xf1b8, IconRedRiver = 0xf3e3, IconReddit = 0xf1a1, IconRedditAlien = 0xf281, IconRedhat = 0xf7bc, IconRegistered = 0xf25d, IconRenren = 0xf18b, IconRepeat = 0xf363, IconReply = 0xf3e5, IconReplyAll = 0xf122, IconReplyd = 0xf3e6, IconRepublican = 0xf75e, IconResearchgate = 0xf4f8, IconResolving = 0xf3e7, IconRestroom = 0xf7bd, IconRetweet = 0xf079, IconRev = 0xf5b2, IconRibbon = 0xf4d6, IconRightFromBracket = 0xf2f5, IconRightLeft = 0xf362, IconRightLong = 0xf30b, IconRightToBracket = 0xf2f6, IconRing = 0xf70b, IconRoad = 0xf018, IconRoadBarrier = 0xe562, IconRoadBridge = 0xe563, IconRoadCircleCheck = 0xe564, IconRoadCircleExclamation = 0xe565, IconRoadCircleXmark = 0xe566, IconRoadLock = 0xe567, IconRoadSpikes = 0xe568, IconRobot = 0xf544, IconRocket = 0xf135, IconRocketchat = 0xf3e8, IconRockrms = 0xf3e9, IconRotate = 0xf2f1, IconRotateLeft = 0xf2ea, IconRotateRight = 0xf2f9, IconRoute = 0xf4d7, IconRss = 0xf09e, IconRubleSign = 0xf158, IconRug = 0xe569, IconRuler = 0xf545, IconRulerCombined = 0xf546, IconRulerHorizontal = 0xf547, IconRulerVertical = 0xf548, IconRupeeSign = 0xf156, IconRupiahSign = 0xe23d, IconRust = 0xe07a, IconS = 0x53, IconSackDollar = 0xf81d, IconSackXmark = 0xe56a, IconSafari = 0xf267, IconSailboat = 0xe445, IconSalesforce = 0xf83b, IconSass = 0xf41e, IconSatellite = 0xf7bf, IconSatelliteDish = 0xf7c0, IconScaleBalanced = 0xf24e, IconScaleUnbalanced = 0xf515, IconScaleUnbalancedFlip = 0xf516, IconSchlix = 0xf3ea, IconSchool = 0xf549, IconSchoolCircleCheck = 0xe56b, IconSchoolCircleExclamation = 0xe56c, IconSchoolCircleXmark = 0xe56d, IconSchoolFlag = 0xe56e, IconSchoolLock = 0xe56f, IconScissors = 0xf0c4, IconScreenpal = 0xe570, IconScrewdriver = 0xf54a, IconScrewdriverWrench = 0xf7d9, IconScribd = 0xf28a, IconScroll = 0xf70e, IconScrollTorah = 0xf6a0, IconSdCard = 0xf7c2, IconSearchengin = 0xf3eb, IconSection = 0xe447, IconSeedling = 0xf4d8, IconSellcast = 0xf2da, IconSellsy = 0xf213, IconServer = 0xf233, IconServicestack = 0xf3ec, IconShapes = 0xf61f, IconShare = 0xf064, IconShareFromSquare = 0xf14d, IconShareNodes = 0xf1e0, IconSheetPlastic = 0xe571, IconShekelSign = 0xf20b, IconShield = 0xf132, IconShieldCat = 0xe572, IconShieldDog = 0xe573, IconShieldHalved = 0xf3ed, IconShieldHeart = 0xe574, IconShieldVirus = 0xe06c, IconShip = 0xf21a, IconShirt = 0xf553, IconShirtsinbulk = 0xf214, IconShoePrints = 0xf54b, IconShoelace = 0xe60c, IconShop = 0xf54f, IconShopLock = 0xe4a5, IconShopSlash = 0xe070, IconShopify = 0xe057, IconShopware = 0xf5b5, IconShower = 0xf2cc, IconShrimp = 0xe448, IconShuffle = 0xf074, IconShuttleSpace = 0xf197, IconSignHanging = 0xf4d9, IconSignal = 0xf012, IconSignalMessenger = 0xe663, IconSignature = 0xf5b7, IconSignsPost = 0xf277, IconSimCard = 0xf7c4, IconSimplybuilt = 0xf215, IconSink = 0xe06d, IconSistrix = 0xf3ee, IconSitemap = 0xf0e8, IconSith = 0xf512, IconSitrox = 0xe44a, IconSketch = 0xf7c6, IconSkull = 0xf54c, IconSkullCrossbones = 0xf714, IconSkyatlas = 0xf216, IconSkype = 0xf17e, IconSlack = 0xf198, IconSlash = 0xf715, IconSleigh = 0xf7cc, IconSliders = 0xf1de, IconSlideshare = 0xf1e7, IconSmog = 0xf75f, IconSmoking = 0xf48d, IconSnapchat = 0xf2ab, IconSnowflake = 0xf2dc, IconSnowman = 0xf7d0, IconSnowplow = 0xf7d2, IconSoap = 0xe06e, IconSocks = 0xf696, IconSolarPanel = 0xf5ba, IconSort = 0xf0dc, IconSortDown = 0xf0dd, IconSortUp = 0xf0de, IconSoundcloud = 0xf1be, IconSourcetree = 0xf7d3, IconSpa = 0xf5bb, IconSpaceAwesome = 0xe5ac, IconSpaghettiMonsterFlying = 0xf67b, IconSpeakap = 0xf3f3, IconSpeakerDeck = 0xf83c, IconSpellCheck = 0xf891, IconSpider = 0xf717, IconSpinner = 0xf110, IconSplotch = 0xf5bc, IconSpoon = 0xf2e5, IconSpotify = 0xf1bc, IconSprayCan = 0xf5bd, IconSprayCanSparkles = 0xf5d0, IconSquare = 0xf0c8, IconSquareArrowUpRight = 0xf14c, IconSquareBehance = 0xf1b5, IconSquareCaretDown = 0xf150, IconSquareCaretLeft = 0xf191, IconSquareCaretRight = 0xf152, IconSquareCaretUp = 0xf151, IconSquareCheck = 0xf14a, IconSquareDribbble = 0xf397, IconSquareEnvelope = 0xf199, IconSquareFacebook = 0xf082, IconSquareFontAwesome = 0xe5ad, IconSquareFontAwesomeStroke = 0xf35c, IconSquareFull = 0xf45c, IconSquareGit = 0xf1d2, IconSquareGithub = 0xf092, IconSquareGitlab = 0xe5ae, IconSquareGooglePlus = 0xf0d4, IconSquareH = 0xf0fd, IconSquareHackerNews = 0xf3af, IconSquareInstagram = 0xe055, IconSquareJs = 0xf3b9, IconSquareLastfm = 0xf203, IconSquareLetterboxd = 0xe62e, IconSquareMinus = 0xf146, IconSquareNfi = 0xe576, IconSquareOdnoklassniki = 0xf264, IconSquareParking = 0xf540, IconSquarePen = 0xf14b, IconSquarePersonConfined = 0xe577, IconSquarePhone = 0xf098, IconSquarePhoneFlip = 0xf87b, IconSquarePiedPiper = 0xe01e, IconSquarePinterest = 0xf0d3, IconSquarePlus = 0xf0fe, IconSquarePollHorizontal = 0xf682, IconSquarePollVertical = 0xf681, IconSquareReddit = 0xf1a2, IconSquareRootVariable = 0xf698, IconSquareRss = 0xf143, IconSquareShareNodes = 0xf1e1, IconSquareSnapchat = 0xf2ad, IconSquareSteam = 0xf1b7, IconSquareThreads = 0xe619, IconSquareTumblr = 0xf174, IconSquareTwitter = 0xf081, IconSquareUpRight = 0xf360, IconSquareUpwork = 0xe67c, IconSquareViadeo = 0xf2aa, IconSquareVimeo = 0xf194, IconSquareVirus = 0xe578, IconSquareWebAwesome = 0xe683, IconSquareWebAwesomeStroke = 0xe684, IconSquareWhatsapp = 0xf40c, IconSquareXTwitter = 0xe61a, IconSquareXing = 0xf169, IconSquareXmark = 0xf2d3, IconSquareYoutube = 0xf431, IconSquarespace = 0xf5be, IconStackExchange = 0xf18d, IconStackOverflow = 0xf16c, IconStackpath = 0xf842, IconStaffSnake = 0xe579, IconStairs = 0xe289, IconStamp = 0xf5bf, IconStapler = 0xe5af, IconStar = 0xf005, IconStarAndCrescent = 0xf699, IconStarHalf = 0xf089, IconStarHalfStroke = 0xf5c0, IconStarOfDavid = 0xf69a, IconStarOfLife = 0xf621, IconStaylinked = 0xf3f5, IconSteam = 0xf1b6, IconSteamSymbol = 0xf3f6, IconSterlingSign = 0xf154, IconStethoscope = 0xf0f1, IconStickerMule = 0xf3f7, IconStop = 0xf04d, IconStopwatch = 0xf2f2, IconStopwatch20 = 0xe06f, IconStore = 0xf54e, IconStoreSlash = 0xe071, IconStrava = 0xf428, IconStreetView = 0xf21d, IconStrikethrough = 0xf0cc, IconStripe = 0xf429, IconStripeS = 0xf42a, IconStroopwafel = 0xf551, IconStubber = 0xe5c7, IconStudiovinari = 0xf3f8, IconStumbleupon = 0xf1a4, IconStumbleuponCircle = 0xf1a3, IconSubscript = 0xf12c, IconSuitcase = 0xf0f2, IconSuitcaseMedical = 0xf0fa, IconSuitcaseRolling = 0xf5c1, IconSun = 0xf185, IconSunPlantWilt = 0xe57a, IconSuperpowers = 0xf2dd, IconSuperscript = 0xf12b, IconSupple = 0xf3f9, IconSuse = 0xf7d6, IconSwatchbook = 0xf5c3, IconSwift = 0xf8e1, IconSymfony = 0xf83d, IconSynagogue = 0xf69b, IconSyringe = 0xf48e, IconT = 0x54, IconTable = 0xf0ce, IconTableCells = 0xf00a, IconTableCellsColumnLock = 0xe678, IconTableCellsLarge = 0xf009, IconTableCellsRowLock = 0xe67a, IconTableCellsRowUnlock = 0xe691, IconTableColumns = 0xf0db, IconTableList = 0xf00b, IconTableTennisPaddleBall = 0xf45d, IconTablet = 0xf3fb, IconTabletButton = 0xf10a, IconTabletScreenButton = 0xf3fa, IconTablets = 0xf490, IconTachographDigital = 0xf566, IconTag = 0xf02b, IconTags = 0xf02c, IconTape = 0xf4db, IconTarp = 0xe57b, IconTarpDroplet = 0xe57c, IconTaxi = 0xf1ba, IconTeamspeak = 0xf4f9, IconTeeth = 0xf62e, IconTeethOpen = 0xf62f, IconTelegram = 0xf2c6, IconTemperatureArrowDown = 0xe03f, IconTemperatureArrowUp = 0xe040, IconTemperatureEmpty = 0xf2cb, IconTemperatureFull = 0xf2c7, IconTemperatureHalf = 0xf2c9, IconTemperatureHigh = 0xf769, IconTemperatureLow = 0xf76b, IconTemperatureQuarter = 0xf2ca, IconTemperatureThreeQuarters = 0xf2c8, IconTencentWeibo = 0xf1d5, IconTengeSign = 0xf7d7, IconTent = 0xe57d, IconTentArrowDownToLine = 0xe57e, IconTentArrowLeftRight = 0xe57f, IconTentArrowTurnLeft = 0xe580, IconTentArrowsDown = 0xe581, IconTents = 0xe582, IconTerminal = 0xf120, IconTextHeight = 0xf034, IconTextSlash = 0xf87d, IconTextWidth = 0xf035, IconTheRedYeti = 0xf69d, IconThemeco = 0xf5c6, IconThemeisle = 0xf2b2, IconThermometer = 0xf491, IconThinkPeaks = 0xf731, IconThreads = 0xe618, IconThumbsDown = 0xf165, IconThumbsUp = 0xf164, IconThumbtack = 0xf08d, IconThumbtackSlash = 0xe68f, IconTicket = 0xf145, IconTicketSimple = 0xf3ff, IconTiktok = 0xe07b, IconTimeline = 0xe29c, IconToggleOff = 0xf204, IconToggleOn = 0xf205, IconToilet = 0xf7d8, IconToiletPaper = 0xf71e, IconToiletPaperSlash = 0xe072, IconToiletPortable = 0xe583, IconToiletsPortable = 0xe584, IconToolbox = 0xf552, IconTooth = 0xf5c9, IconToriiGate = 0xf6a1, IconTornado = 0xf76f, IconTowerBroadcast = 0xf519, IconTowerCell = 0xe585, IconTowerObservation = 0xe586, IconTractor = 0xf722, IconTradeFederation = 0xf513, IconTrademark = 0xf25c, IconTrafficLight = 0xf637, IconTrailer = 0xe041, IconTrain = 0xf238, IconTrainSubway = 0xf239, IconTrainTram = 0xe5b4, IconTransgender = 0xf225, IconTrash = 0xf1f8, IconTrashArrowUp = 0xf829, IconTrashCan = 0xf2ed, IconTrashCanArrowUp = 0xf82a, IconTree = 0xf1bb, IconTreeCity = 0xe587, IconTrello = 0xf181, IconTriangleExclamation = 0xf071, IconTrophy = 0xf091, IconTrowel = 0xe589, IconTrowelBricks = 0xe58a, IconTruck = 0xf0d1, IconTruckArrowRight = 0xe58b, IconTruckDroplet = 0xe58c, IconTruckFast = 0xf48b, IconTruckField = 0xe58d, IconTruckFieldUn = 0xe58e, IconTruckFront = 0xe2b7, IconTruckMedical = 0xf0f9, IconTruckMonster = 0xf63b, IconTruckMoving = 0xf4df, IconTruckPickup = 0xf63c, IconTruckPlane = 0xe58f, IconTruckRampBox = 0xf4de, IconTty = 0xf1e4, IconTumblr = 0xf173, IconTurkishLiraSign = 0xe2bb, IconTurnDown = 0xf3be, IconTurnUp = 0xf3bf, IconTv = 0xf26c, IconTwitch = 0xf1e8, IconTwitter = 0xf099, IconTypo3 = 0xf42b, IconU = 0x55, IconUber = 0xf402, IconUbuntu = 0xf7df, IconUikit = 0xf403, IconUmbraco = 0xf8e8, IconUmbrella = 0xf0e9, IconUmbrellaBeach = 0xf5ca, IconUncharted = 0xe084, IconUnderline = 0xf0cd, IconUniregistry = 0xf404, IconUnity = 0xe049, IconUniversalAccess = 0xf29a, IconUnlock = 0xf09c, IconUnlockKeyhole = 0xf13e, IconUnsplash = 0xe07c, IconUntappd = 0xf405, IconUpDown = 0xf338, IconUpDownLeftRight = 0xf0b2, IconUpLong = 0xf30c, IconUpRightAndDownLeftFromCenter = 0xf424, IconUpRightFromSquare = 0xf35d, IconUpload = 0xf093, IconUps = 0xf7e0, IconUpwork = 0xe641, IconUsb = 0xf287, IconUser = 0xf007, IconUserAstronaut = 0xf4fb, IconUserCheck = 0xf4fc, IconUserClock = 0xf4fd, IconUserDoctor = 0xf0f0, IconUserGear = 0xf4fe, IconUserGraduate = 0xf501, IconUserGroup = 0xf500, IconUserInjured = 0xf728, IconUserLarge = 0xf406, IconUserLargeSlash = 0xf4fa, IconUserLock = 0xf502, IconUserMinus = 0xf503, IconUserNinja = 0xf504, IconUserNurse = 0xf82f, IconUserPen = 0xf4ff, IconUserPlus = 0xf234, IconUserSecret = 0xf21b, IconUserShield = 0xf505, IconUserSlash = 0xf506, IconUserTag = 0xf507, IconUserTie = 0xf508, IconUserXmark = 0xf235, IconUsers = 0xf0c0, IconUsersBetweenLines = 0xe591, IconUsersGear = 0xf509, IconUsersLine = 0xe592, IconUsersRays = 0xe593, IconUsersRectangle = 0xe594, IconUsersSlash = 0xe073, IconUsersViewfinder = 0xe595, IconUsps = 0xf7e1, IconUssunnah = 0xf407, IconUtensils = 0xf2e7, IconV = 0x56, IconVaadin = 0xf408, IconVanShuttle = 0xf5b6, IconVault = 0xe2c5, IconVectorSquare = 0xf5cb, IconVenus = 0xf221, IconVenusDouble = 0xf226, IconVenusMars = 0xf228, IconVest = 0xe085, IconVestPatches = 0xe086, IconViacoin = 0xf237, IconViadeo = 0xf2a9, IconVial = 0xf492, IconVialCircleCheck = 0xe596, IconVialVirus = 0xe597, IconVials = 0xf493, IconViber = 0xf409, IconVideo = 0xf03d, IconVideoSlash = 0xf4e2, IconVihara = 0xf6a7, IconVimeo = 0xf40a, IconVimeoV = 0xf27d, IconVine = 0xf1ca, IconVirus = 0xe074, IconVirusCovid = 0xe4a8, IconVirusCovidSlash = 0xe4a9, IconVirusSlash = 0xe075, IconViruses = 0xe076, IconVk = 0xf189, IconVnv = 0xf40b, IconVoicemail = 0xf897, IconVolcano = 0xf770, IconVolleyball = 0xf45f, IconVolumeHigh = 0xf028, IconVolumeLow = 0xf027, IconVolumeOff = 0xf026, IconVolumeXmark = 0xf6a9, IconVrCardboard = 0xf729, IconVuejs = 0xf41f, IconW = 0x57, IconWalkieTalkie = 0xf8ef, IconWallet = 0xf555, IconWandMagic = 0xf0d0, IconWandMagicSparkles = 0xe2ca, IconWandSparkles = 0xf72b, IconWarehouse = 0xf494, IconWatchmanMonitoring = 0xe087, IconWater = 0xf773, IconWaterLadder = 0xf5c5, IconWaveSquare = 0xf83e, IconWaze = 0xf83f, IconWebAwesome = 0xe682, IconWebflow = 0xe65c, IconWeebly = 0xf5cc, IconWeibo = 0xf18a, IconWeightHanging = 0xf5cd, IconWeightScale = 0xf496, IconWeixin = 0xf1d7, IconWhatsapp = 0xf232, IconWheatAwn = 0xe2cd, IconWheatAwnCircleExclamation = 0xe598, IconWheelchair = 0xf193, IconWheelchairMove = 0xe2ce, IconWhiskeyGlass = 0xf7a0, IconWhmcs = 0xf40d, IconWifi = 0xf1eb, IconWikipediaW = 0xf266, IconWind = 0xf72e, IconWindowMaximize = 0xf2d0, IconWindowMinimize = 0xf2d1, IconWindowRestore = 0xf2d2, IconWindows = 0xf17a, IconWineBottle = 0xf72f, IconWineGlass = 0xf4e3, IconWineGlassEmpty = 0xf5ce, IconWirsindhandwerk = 0xe2d0, IconWix = 0xf5cf, IconWizardsOfTheCoast = 0xf730, IconWodu = 0xe088, IconWolfPackBattalion = 0xf514, IconWonSign = 0xf159, IconWordpress = 0xf19a, IconWordpressSimple = 0xf411, IconWorm = 0xe599, IconWpbeginner = 0xf297, IconWpexplorer = 0xf2de, IconWpforms = 0xf298, IconWpressr = 0xf3e4, IconWrench = 0xf0ad, IconX = 0x58, IconXRay = 0xf497, IconXTwitter = 0xe61b, IconXbox = 0xf412, IconXing = 0xf168, IconXmark = 0xf00d, IconXmarksLines = 0xe59a, IconY = 0x59, IconYCombinator = 0xf23b, IconYahoo = 0xf19e, IconYammer = 0xf840, IconYandex = 0xf413, IconYandexInternational = 0xf414, IconYarn = 0xf7e3, IconYelp = 0xf1e9, IconYenSign = 0xf157, IconYinYang = 0xf6ad, IconYoast = 0xf2b1, IconYoutube = 0xf167, IconZ = 0x5a, IconZhihu = 0xf63f, }; #endif // ICONS_H
54,338
C++
.h
1,891
23.746166
81
0.711788
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,367
tabdialog.h
hluk_CopyQ/src/gui/tabdialog.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef TABDIALOG_H #define TABDIALOG_H #include <QDialog> #include <QStringList> namespace Ui { class TabDialog; } /** * Dialog for naming and renaming tabs. */ class TabDialog final : public QDialog { Q_OBJECT public: /** Tab dialog type (new tab or rename existing tab). */ enum TabDialogType { TabNew, TabRename, TabGroupRename }; explicit TabDialog(TabDialogType type, QWidget *parent = nullptr); ~TabDialog(); /** Set tab index to rename (emitted parameter of accepted()). */ void setTabIndex(int tabIndex); /** Set existing tabs for validation. */ void setTabs(const QStringList &tabs); /** Set current tab name. */ void setTabName(const QString &tabName); /** Set current tab group name. */ void setTabGroupName(const QString &tabGroupName); signals: void newTabNameAccepted(const QString &newName); void barTabNameAccepted(const QString &newName, int tabIndex); void treeTabNameAccepted(const QString &newName, const QString &oldName); private: void onAccepted(); /** * Validate tab name. * Tab name should be non-empty and should not be in existing tab list * (see setTabs()). */ void validate(); Ui::TabDialog *ui; int m_tabIndex = -1; QString m_tabGroupName; QStringList m_tabs; }; #endif // TABDIALOG_H
1,422
C++
.h
49
24.734694
77
0.691458
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,368
itemorderlist.h
hluk_CopyQ/src/gui/itemorderlist.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef ITEMORDERLIST_H #define ITEMORDERLIST_H #include <QListWidgetItem> #include <QPointer> #include <QWidget> #include <memory> #include <unordered_map> namespace Ui { class ItemOrderList; } class QAbstractButton; class QMenu; class QScrollArea; class ItemOrderList final : public QWidget { Q_OBJECT public: enum CheckState { Checked, Unchecked, NotCheckable }; class Item { friend class ItemOrderList; public: Item() = default; virtual ~Item() = default; virtual QVariant data() const = 0; Item(const Item &) = delete; Item &operator=(const Item &) = delete; private: virtual QWidget *createWidget(QWidget *parent) = 0; }; using ItemPtr = std::shared_ptr<Item>; explicit ItemOrderList(QWidget *parent = nullptr); ~ItemOrderList(); void setEditable(bool editable); void setItemsMovable(bool movable); void clearItems(); void appendItem(const QString &label, const QIcon &icon, const ItemPtr &item, CheckState state = NotCheckable); void insertItem(const QString &label, const QIcon &icon, const ItemPtr &item, int targetRow, CheckState state = NotCheckable); void removeRow(int row); /// Returns widget created by Item::createWidget() given @a row /// (could be nullptr is not yet created). QWidget *widget(int row) const; /// Returns Item::data() for item in given @a row. QVariant data(int row) const; int itemCount() const; bool isItemChecked(int row) const; int currentRow() const; void setCurrentItem(int row); void setCurrentItemIcon(const QIcon &icon); void setCurrentItemLabel(const QString &label); void setItemIcon(int row, const QIcon &icon); QString itemLabel(int row) const; QList<int> selectedRows() const; void setSelectedRows(const QList<int> &selectedRows); int rowCount() const; void setItemWidgetVisible(int row, bool visible); void setDragAndDropValidator(const QRegularExpression &re); /// Make icons wider so icon tag can be bigger. void setWiderIconsEnabled(bool wider); signals: void addButtonClicked(); void itemSelectionChanged(); void dropped(const QString &text, int row); void itemCheckStateChanged(int row, bool checked); protected: void keyPressEvent(QKeyEvent *event) override; void dragEnterEvent(QDragEnterEvent *event) override; void dropEvent(QDropEvent *event) override; void showEvent(QShowEvent *event) override; private: void nextPreviousItem(int d); void onPushButtonUpClicked(); void onPushButtonDownClicked(); void onPushButtonTopClicked(); void onPushButtonBottomClicked(); void onPushButtonRemoveClicked(); void onPushButtonAddClicked(); void onListWidgetItemsCurrentItemChanged(QListWidgetItem *current, QListWidgetItem *previous); void onListWidgetItemsItemSelectionChanged(); void onListWidgetItemsItemChanged(QListWidgetItem *item); void moveTab(int row, int targetRow); struct ItemWidgetPair { explicit ItemWidgetPair(const ItemPtr &item, bool checked) : item(item) , lastCheckedState(checked) {} ItemPtr item; QPointer<QWidget> widget; bool lastCheckedState = true; }; QListWidgetItem *listItem(int row) const; void setCurrentItemWidget(QWidget *widget); QWidget *createWidget(QListWidgetItem *item); void removeItem(QListWidgetItem *item); Ui::ItemOrderList *ui; std::unordered_map<int, ItemWidgetPair> m_items; int m_lastItemId = 0; QRegularExpression m_dragAndDropRe; }; #endif // ITEMORDERLIST_H
3,746
C++
.h
104
30.730769
130
0.723056
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,369
fancylineedit.h
hluk_CopyQ/src/gui/fancylineedit.h
/**************************************************************************** ** ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of Qt Creator. ** ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and Digia. For licensing terms and ** conditions see http://www.qt.io/licensing. For further information ** use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 or version 3 as published by the Free ** Software Foundation and appearing in the file LICENSE.LGPLv21 and ** LICENSE.LGPLv3 included in the packaging of this file. Please review the ** following information to ensure the GNU Lesser General Public License ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional ** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ****************************************************************************/ #ifndef FANCYLINEEDIT_H #define FANCYLINEEDIT_H #include <QAbstractButton> #include <QLineEdit> class QEvent; namespace Utils { class FancyLineEditPrivate; class IconButton final : public QAbstractButton { Q_OBJECT public: explicit IconButton(QWidget *parent = nullptr); void paintEvent(QPaintEvent *event) override; void setIcon(const QIcon &icon) { m_icon = icon; update(); } void setHasMenu(bool hasMenu) { m_hasMenu = hasMenu; update(); } bool hasMenu() const { return m_hasMenu; } protected: void keyPressEvent(QKeyEvent *ke) override; void keyReleaseEvent(QKeyEvent *ke) override; private: QIcon m_icon; bool m_hasMenu; }; class FancyLineEdit : public QLineEdit { Q_OBJECT public: enum Side {Left = 0, Right = 1}; Q_ENUM(Side) explicit FancyLineEdit(QWidget *parent = nullptr); ~FancyLineEdit(); void setButtonIcon(Side side, const QIcon &icon); QMenu *buttonMenu(Side side) const; void setButtonMenu(Side side, QMenu *buttonMenu); void setButtonVisible(Side side, bool visible); bool isButtonVisible(Side side) const; QAbstractButton *button(Side side) const; void setButtonToolTip(Side side, const QString &); void setButtonFocusPolicy(Side side, Qt::FocusPolicy policy); // Set whether tabbing in will trigger the menu. void setMenuTabFocusTrigger(Side side, bool v); bool hasMenuTabFocusTrigger(Side side) const; signals: void buttonClicked(Utils::FancyLineEdit::Side side); void leftButtonClicked(); void rightButtonClicked(); protected: void resizeEvent(QResizeEvent *e) override; private: void iconClicked(); void updateMargins(); void updateButtonPositions(); friend class FancyLineEditPrivate; FancyLineEditPrivate *d; }; } // namespace Utils #endif // FANCYLINEEDIT_H
3,363
C++
.h
86
36.209302
77
0.722495
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,370
filedialog.h
hluk_CopyQ/src/gui/filedialog.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef FILEDIALOG_H #define FILEDIALOG_H #include <QObject> #include <QString> class QWidget; /** * Opens native file dialog (unlike QFileDialog). */ class FileDialog final : public QObject { Q_OBJECT public: FileDialog(QWidget *parent, const QString &caption, const QString &fileName); void exec(); signals: void fileSelected(const QString &fileName); private: QWidget *m_parent; QString m_caption; QString m_defaultPath; }; #endif // FILEDIALOG_H
533
C++
.h
23
20.521739
81
0.747012
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,371
shortcutbutton.h
hluk_CopyQ/src/gui/shortcutbutton.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef SHORTCUTBUTTON_H #define SHORTCUTBUTTON_H #include <QKeySequence> #include <QList> #include <QToolBar> class QAction; class QHBoxLayout; /** * Widget with buttons for defining shortcuts and single button for adding shortcuts. */ class ShortcutButton final : public QToolBar { Q_OBJECT public: explicit ShortcutButton(QWidget *parent = nullptr); /** Creates new shortcut button for @a shortcut if it's valid and same button doesn't exist. */ void addShortcut(const QKeySequence &shortcut); /** * Overloaded method. * * Creates new shortcut from string formatted as QKeySequence::PortableText (if valid). */ void addShortcut(const QString &shortcutPortableText); /** Remove all shortcut buttons. */ void clearShortcuts(); /** Remove all shortcut buttons and add button with default shortcut if valid. */ void resetShortcuts(); /** Set default shortcut (after reset()). */ void setDefaultShortcut(const QKeySequence &defaultShortcut); /** Return valid shortcuts defined by buttons. */ QList<QKeySequence> shortcuts() const; /** Add icon and tooltip to buttons that contain shortcut from @a ambiguousShortcuts list. */ void checkAmbiguousShortcuts(const QList<QKeySequence> &ambiguousShortcuts, const QIcon &warningIcon, const QString &warningToolTip); signals: /** Emitted if new @a shortcut (with button) was added. */ void shortcutAdded(const QKeySequence &shortcut); /** Emitted if @a shortcut (with button) was removed. */ void shortcutRemoved(const QKeySequence &shortcut); protected: void showEvent(QShowEvent *event) override; void focusInEvent(QFocusEvent *event) override; bool focusNextPrevChild(bool next) override; private: void onShortcutButtonClicked(); void onButtonAddShortcutClicked(); void addShortcut(QAction *shortcutButton); void setButtonShortcut(QAction *shortcutButton, const QKeySequence &shortcut); QKeySequence shortcutForButton(const QAction &w) const; bool focusNextPrevious(bool next); QKeySequence m_defaultShortcut; QAction *m_actionAddShortcut; }; #endif // SHORTCUTBUTTON_H
2,255
C++
.h
55
36.418182
99
0.742896
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,372
iconselectdialog.h
hluk_CopyQ/src/gui/iconselectdialog.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef ICONSELECTDIALOG_H #define ICONSELECTDIALOG_H #include <QDialog> class QModelIndex; class IconListWidget; class IconSelectDialog final : public QDialog { Q_OBJECT public: explicit IconSelectDialog(const QString &defaultIcon, QWidget *parent = nullptr); const QString &selectedIcon() const { return m_selectedIcon; } void done(int result) override; signals: void iconSelected(const QString &icon); private: void onIconListItemActivated(const QModelIndex &index); void onBrowse(); void onAcceptCurrent(); void addIcons(); IconListWidget *m_iconList; QString m_selectedIcon; }; #endif // ICONSELECTDIALOG_H
716
C++
.h
24
26.375
85
0.771049
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,373
execmenu.h
hluk_CopyQ/src/gui/execmenu.h
/**************************************************************************** ** ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of Qt Creator. ** ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and Digia. For licensing terms and ** conditions see http://www.qt.io/licensing. For further information ** use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 or version 3 as published by the Free ** Software Foundation and appearing in the file LICENSE.LGPLv21 and ** LICENSE.LGPLv3 included in the packaging of this file. Please review the ** following information to ensure the GNU Lesser General Public License ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional ** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ****************************************************************************/ #ifndef EXECMENU_H #define EXECMENU_H class QAction; class QMenu; class QWidget; namespace Utils { QAction *execMenuAtWidget(QMenu *menu, QWidget *widget); } // namespace Utils #endif // EXECMENU_H
1,720
C++
.h
38
44.105263
77
0.705847
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,374
iconfactory.h
hluk_CopyQ/src/gui/iconfactory.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef ICONFACTORY_H #define ICONFACTORY_H class QColor; class QIcon; class QPixmap; class QPainter; class QObject; class QString; class QVariant; class QWidget; QIcon getIcon(const QString &themeName, unsigned short id); QIcon getIcon(const QVariant &iconOrIconId); QIcon getIconFromResources(const QString &iconName); QIcon iconFromFile(const QString &fileName, const QString &tag, const QColor &color); QIcon iconFromFile(const QString &fileName, const QString &tag); QIcon iconFromFile(const QString &fileName); unsigned short toIconId(const QString &fileNameOrId); QPixmap createPixmap(unsigned short id, const QColor &color, int size); /// Return app icon (color is calculated from session name). QIcon appIcon(); void setActivePaintDevice(QObject *device); QColor getDefaultIconColor(const QWidget &widget, bool selected = false); void setSessionIconColor(QColor color); void setSessionIconTag(const QString &tag); void setSessionIconTagColor(QColor color); void setSessionIconEnabled(bool enabled); QColor sessionIconColor(); QString sessionIconTag(); QColor sessionIconTagColor(); void setUseSystemIcons(bool useSystemIcons); #endif // ICONFACTORY_H
1,225
C++
.h
32
36.65625
85
0.83035
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,375
clipboardbrowser.h
hluk_CopyQ/src/gui/clipboardbrowser.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef CLIPBOARDBROWSER_H #define CLIPBOARDBROWSER_H #include "common/clipboardmode.h" #include "gui/clipboardbrowsershared.h" #include "item/clipboardmodel.h" #include "item/itemdelegate.h" #include "item/itemfilter.h" #include "item/itemwidget.h" #include <QListView> #include <QPointer> #include <QTimer> #include <QVariantMap> #include <QVector> class ItemEditorWidget; class ItemFactory; class PersistentDisplayItem; class QPersistentModelIndex; class QProgressBar; class QPushButton; /** List view of clipboard items. */ class ClipboardBrowser final : public QListView { Q_OBJECT public: ClipboardBrowser( const QString &tabName, const ClipboardBrowserSharedPtr &sharedData, QWidget *parent = nullptr); /** Close all external editors and save items if needed. */ ~ClipboardBrowser(); /** * Move item with given @a hash to the top of the list. * * @return true only if item exists */ bool moveToTop(uint itemHash); /** Sort selected items. */ void sortItems(const QModelIndexList &indexes); void sortItems(const QList<QPersistentModelIndex> &sorted); /** Reverse order of selected items. */ void reverseItems(const QModelIndexList &indexes); /** Index of item in given row. */ QModelIndex index(int i) const { return m.index(i,0); } /** Returns concatenation of selected items. */ const QString selectedText() const; /** * Set tab name. * * This is ID used for saving items. * * If ID is empty saving is disabled. */ bool setTabName(const QString &tabName); const QString &tabName() const { return m_tabName; } void setMaxItemCount(int count); void setStoreItems(bool store); /** * Return true only if the internal editor widget is open. */ bool isInternalEditorOpen() const; /** * Return true only if an external editor is open. */ bool isExternalEditorOpen() const; /** * Close internal and external editor * unless user don't want to discard changed (show message box). * * @return true only if editors were closed */ bool maybeCloseEditors(); /** * Override to disable default QAbstractItemView search. */ void keyboardSearch(const QString &text) override; QVariantMap copyIndex(const QModelIndex &index) const; QVariantMap copyIndexes(const QModelIndexList &indexes) const; void removeIndexes(const QModelIndexList &indexes, QString *error = nullptr); bool canRemoveItems(const QModelIndexList &indexes, QString *error = nullptr); /** Render preview image with items. */ QPixmap renderItemPreview(const QModelIndexList &indexes, int maxWidth, int maxHeight); /** Removes items from end of list without notifying plugins. */ bool allocateSpaceForNewItems(int newItemCount); /** Add new item to the browser. */ bool add( const QString &txt, //!< Text of new item. int row = 0 //!< Target row for the new item (negative to append item). ); /** * Add new item to the browser. * @a item is automatically deleted after it's no longer needed. */ bool add( const QVariantMap &data, //!< Data for new item. int row = 0 //!< Target row for the new item (negative to append item). ); bool addReversed(const QVector<QVariantMap> &dataList, int row); bool addAndSelect(const QVariantMap &data, int row); /** * Add item and remove duplicates. */ void addUnique(const QVariantMap &data, ClipboardMode mode); void setItemsData(const QMap<QPersistentModelIndex, QVariantMap> &itemsData); /** Number of items in list. */ int length() const { return m.rowCount(); } /** Receive key event. */ void keyEvent(QKeyEvent *event) { keyPressEvent(event); } /** Move item to clipboard. */ void moveToClipboard(const QModelIndex &ind); /** Move items to clipboard. */ void moveToClipboard(const QModelIndexList &indexes); /** Show only items matching the regular expression. */ void filterItems(const ItemFilterPtr &filter); /** Open editor. */ bool openEditor(const QModelIndex &index, const QString &format, const QByteArray &content, bool changeClipboard = false); /** Open editor for an item. */ bool openEditor(const QModelIndex &index, const QString &format); /** Set current item. */ void setCurrent(int row, bool keepSelection = false, bool setCurrentOnly = false); /** * Save items to configuration if needed. */ void saveUnsavedItems(); /** * Create and edit new item. */ void editNew( const QString &format, const QByteArray &content, bool changeClipboard = false); /** Edit item in given @a row. */ void editRow(int row, const QString &format); void move(int key); void move(const QModelIndexList &indexes, int targetRow); QWidget *currentItemPreview(QWidget *parent); void findNext(); void findPrevious(); /** * Load items from configuration. * This function does nothing if model is disabled (e.g. loading failed previously). * @see setID, saveItems */ bool loadItems(); /** * Return true only if row is filtered and should be hidden. */ bool isFiltered(int row) const; bool isLoaded() const; /** * Save items to configuration. * @see setID, loadItems */ bool saveItems(); /** Move current item to clipboard. */ void moveToClipboard(); /** Edit selected unhidden items. */ void editSelected(); /** Edit notes for current item. */ void editNotes(); /** Open editor with text of all selected items or for single selected item. */ bool openEditor(); /** Remove selected unhidden items. */ void remove(); /** Show content of current item. */ void showItemContent(); void emitItemCount(); bool eventFilter(QObject *watched, QEvent *event) override; using QListView::isIndexHidden; using QListView::isRowHidden; using QListView::verticalOffset; signals: void runOnRemoveItemsHandler(const QList<QPersistentModelIndex> &indexes, bool *canRemove); /** Show list request. */ void requestShow(const ClipboardBrowser *self); /** Request clipboard change. */ void changeClipboard(const QVariantMap &data); /** Emitted on error. */ void error(const QString &errorString); void editingFinished(); void itemCountChanged(const QString &tabName, int count); void showContextMenu(const QPoint &position); void itemsChanged(const ClipboardBrowser *self); void itemSelectionChanged(const ClipboardBrowser *self); void internalEditorStateChanged(const ClipboardBrowser *self); void searchRequest(); void searchHideRequest(); void searchShowRequest(const QString &pattern); void closeExternalEditors(); void itemWidgetCreated(const PersistentDisplayItem &selection); protected: void keyPressEvent(QKeyEvent *event) override; void contextMenuEvent(QContextMenuEvent *) override; void resizeEvent(QResizeEvent *event) override; void showEvent(QShowEvent *event) override; void currentChanged(const QModelIndex &current, const QModelIndex &previous) override; void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected) override; void focusInEvent(QFocusEvent *event) override; void focusOutEvent(QFocusEvent *event) override; void dragEnterEvent(QDragEnterEvent *event) override; void dragLeaveEvent(QDragLeaveEvent *event) override; void dragMoveEvent(QDragMoveEvent *event) override; void dropEvent(QDropEvent *event) override; void paintEvent(QPaintEvent *e) override; void mousePressEvent(QMouseEvent *event) override; void mouseReleaseEvent(QMouseEvent *event) override; void mouseMoveEvent(QMouseEvent *event) override; #if QT_VERSION >= QT_VERSION_CHECK(6,0,0) void enterEvent(QEnterEvent *event) override; #else void enterEvent(QEvent *event) override; #endif void scrollContentsBy(int dx, int dy) override; void doItemsLayout() override; private slots: void itemModified(const QByteArray &bytes, const QString &mime, const QModelIndex &index); void onEditorNeedsChangeClipboard(const QByteArray &bytes, const QString &mime); void closeExternalEditor(QObject *editor, const QModelIndex &index); private: void onRowsInserted(const QModelIndex &parent, int first, int last); void onItemCountChanged(); void onEditorSave(); void onEditorCancel(); void onEditorInvalidate(); void setClipboardFromEditor(); /** * Save items to configuration after an interval. */ void delayedSaveItems(int ms); /** * Update item and editor sizes. */ void updateSizes(); void updateCurrent(); /** * Hide row if filtered out, otherwise show. * @return true only if hidden */ bool hideFiltered(int row); /** * Connects signals and starts external editor. */ bool startEditor(QObject *editor); void setEditorWidget(ItemEditorWidget *editor, bool changeClipboard = false); void editItem(const QModelIndex &index, const QString &format, bool changeClipboard = false); void updateEditorGeometry(); void updateCurrentItem(); /** * Get index near given @a point. * If space between items is at the @a point, return next item. */ QModelIndex indexNear(int offset) const; int getDropRow(QPoint position); void connectModelAndDelegate(); void disconnectModel(); void updateItemMaximumSize(); void processDragAndDropEvent(QDropEvent *event); /// Removes indexes without notifying or asking plugins. void dropIndexes(const QModelIndexList &indexes); void dropIndexes(const QList<QPersistentModelIndex> &indexes); void focusEditedIndex(); int findNextVisibleRow(int row); int findPreviousVisibleRow(int row); int findVisibleRowFrom(int row); void preloadCurrentPage(); void preload(int pixels, int direction, const QModelIndex &start); void updateCurrentIndex(); void moveToTop(const QModelIndex &index); void maybeEmitEditingFinished(); QModelIndex firstUnpinnedIndex() const; void dragDropScroll(); ItemSaverPtr m_itemSaver; QString m_tabName; int m_maxItemCount = 200; bool m_storeItems = true; ClipboardModel m; ItemDelegate d; QTimer m_timerSave; QTimer m_timerEmitItemCount; QTimer m_timerUpdateSizes; QTimer m_timerUpdateCurrent; QTimer m_timerDragDropScroll; QTimer m_timerPreload; bool m_ignoreMouseMoveWithButtonPressed = false; bool m_resizing = false; bool m_resizeEvent = false; QPointer<ItemEditorWidget> m_editor; int m_externalEditorsOpen = 0; ClipboardBrowserSharedPtr m_sharedData; int m_dragTargetRow; QPoint m_dragStartPosition; int m_filterRow = -1; bool m_selectNewItems = false; }; #endif // CLIPBOARDBROWSER_H
12,289
C++
.h
293
32.962457
130
0.648683
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,376
shortcutswidget.h
hluk_CopyQ/src/gui/shortcutswidget.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef SHORTCUTSWIDGET_H #define SHORTCUTSWIDGET_H #include "common/command.h" #include <QIcon> #include <QTimer> #include <QVector> #include <QWidget> namespace Ui { class ShortcutsWidget; } class ShortcutButton; class QSettings; class QTableWidgetItem; struct MenuAction { QString iconName; ushort iconId{}; QString text; QString settingsKey; Command command; QTableWidgetItem *tableItem{}; ShortcutButton *shortcutButton{}; }; /** * Widget with list of modifiable shortcuts and filter field. */ class ShortcutsWidget final : public QWidget { Q_OBJECT public: explicit ShortcutsWidget(QWidget *parent = nullptr); ~ShortcutsWidget(); /** Load shortcuts from settings file. */ void loadShortcuts(const QSettings &settings); /** Save shortcuts to settings file. */ void saveShortcuts(QSettings *settings); void addCommands(const QVector<Command> &commands); signals: void commandsSaved(); protected: void showEvent(QShowEvent *event) override; private: void onShortcutAdded(const QKeySequence &shortcut); void onShortcutRemoved(const QKeySequence &shortcut); void checkAmbiguousShortcuts(); void onLineEditFilterTextChanged(const QString &text); void addShortcutRow(MenuAction &action); Ui::ShortcutsWidget *ui; QTimer m_timerCheckAmbiguous; QVector<MenuAction> m_actions; QList<QKeySequence> m_shortcuts; }; #endif // SHORTCUTSWIDGET_H
1,509
C++
.h
53
25.075472
61
0.763763
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,377
commandcompleter.h
hluk_CopyQ/src/gui/commandcompleter.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef COMMANDCOMPLETER_H #define COMMANDCOMPLETER_H #include <QObject> class QCompleter; class QPlainTextEdit; class CommandCompleter final : public QObject { Q_OBJECT Q_PROPERTY(QWidget* popup READ popup) public: explicit CommandCompleter(QPlainTextEdit *editor); bool eventFilter(QObject *watched, QEvent *event) override; QWidget *popup() const; private: void onTextChanged(); void updateCompletion(bool forceShow); void insertCompletion(const QString &completion); void showCompletion(); QString textUnderCursor() const; QPlainTextEdit *m_editor; QCompleter *m_completer; }; #endif // COMMANDCOMPLETER_H
714
C++
.h
23
27.478261
63
0.772059
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,378
tabswidgetinterface.h
hluk_CopyQ/src/gui/tabswidgetinterface.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef TABSWIDGETINTERFACE_H #define TABSWIDGETINTERFACE_H #include <QtContainerFwd> class QString; class TabsWidgetInterface { public: TabsWidgetInterface() = default; virtual ~TabsWidgetInterface() = default; /** Return path to current group in tree (empty string if this is not a tree). */ virtual QString getCurrentTabPath() const = 0; /** Return true only if tree mode is enabled and tab is tab group. */ virtual bool isTabGroup(const QString &tab) const = 0; /** Return path of tab in tree or label in tab bar. */ virtual QString tabName(int tabIndex) const = 0; virtual void setTabName(int tabIndex, const QString &tabName) = 0; virtual void setTabItemCount(const QString &tabName, const QString &itemCount) = 0; virtual void setTabIcon(const QString &tabName, const QString &icon) = 0; virtual void insertTab(int tabIndex, const QString &tabName) = 0; /** Remove tab with given @a index. */ virtual void removeTab(int index) = 0; virtual void updateCollapsedTabs(QList<QString> *collapsedTabs) const = 0; virtual void setCollapsedTabs(const QList<QString> &collapsedTabs) = 0; virtual void updateTabIcons(const QHash<QString, QString> &tabIcons) = 0; virtual void nextTab() = 0; virtual void previousTab() = 0; virtual void setCurrentTab(int index) = 0; virtual void adjustSize() = 0; TabsWidgetInterface(const TabsWidgetInterface &) = delete; TabsWidgetInterface &operator=(const TabsWidgetInterface &) = delete; }; #endif // TABSWIDGETINTERFACE_H
1,616
C++
.h
32
45.96875
87
0.736404
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,379
notification.h
hluk_CopyQ/src/gui/notification.h
// SPDX-License-Identifier: GPL-3.0-or-later #pragma once #include <QObject> #include "gui/notificationbutton.h" class KNotification; class QWidget; class Notification : public QObject { Q_OBJECT public: explicit Notification(QObject *parent) : QObject(parent) {} virtual void setTitle(const QString &title) = 0; virtual void setMessage(const QString &msg, Qt::TextFormat format = Qt::PlainText) = 0; virtual void setPixmap(const QPixmap &pixmap) = 0; virtual void setIcon(const QString &icon) = 0; virtual void setIcon(ushort icon) = 0; virtual void setInterval(int msec) = 0; virtual void setOpacity(qreal opacity) = 0; virtual void setButtons(const NotificationButtons &buttons) = 0; virtual void adjust() = 0; virtual QWidget *widget() = 0; virtual void show() = 0; virtual void close() = 0; signals: /** Emitted if notification needs to be closed. */ void closeNotification(Notification *self); void buttonClicked(const NotificationButton &button); };
1,033
C++
.h
28
33.178571
91
0.728185
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,380
commandaction.h
hluk_CopyQ/src/gui/commandaction.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef COMMANDACTION_H #define COMMANDACTION_H #include "common/command.h" #include <QAction> #include <QPointer> class CommandAction final : public QAction { Q_OBJECT public: CommandAction(const Command &command, const QString &name, QMenu *parentMenu = nullptr); const Command &command() const; signals: void triggerCommand(CommandAction *self, const QString &triggeredShortcut); protected: bool event(QEvent *event) override; private: void onTriggered(); void onChanged(); Command m_command; QString m_triggeredShortcut; }; #endif // COMMANDACTION_H
669
C++
.h
25
22.96
79
0.73817
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,381
tabbar.h
hluk_CopyQ/src/gui/tabbar.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef TABBAR_H #define TABBAR_H #include "gui/tabswidgetinterface.h" #include <QTabBar> class QMimeData; class QModelIndex; class QMouseEvent; class QPoint; class TabBar final : public QTabBar, public TabsWidgetInterface { Q_OBJECT public: explicit TabBar(QWidget *parent = nullptr); QString getCurrentTabPath() const override; bool isTabGroup(const QString &) const override { return false; } QString tabName(int tabIndex) const override; void setTabName(int tabIndex, const QString &tabName) override; void setTabItemCount(const QString &tabName, const QString &itemCount) override; void setTabIcon(int index, const QString &icon); void setTabIcon(const QString &tabName, const QString &icon) override; void insertTab(int index, const QString &tabName) override; void removeTab(int index) override; void updateCollapsedTabs(QList<QString> *) const override {} void setCollapsedTabs(const QList<QString> &) override {} void updateTabIcons(const QHash<QString, QString> &tabIcons) override; void nextTab() override; void previousTab() override; void setCurrentTab(int index) override; virtual void adjustSize() override; signals: void tabBarMenuRequested(const QPoint &pos, int tab); void tabRenamed(const QString &newName, int index); void dropItems(const QString &tabName, const QMimeData *data); protected: void contextMenuEvent(QContextMenuEvent *event) override; void mousePressEvent(QMouseEvent *event) override; void dragEnterEvent(QDragEnterEvent *event) override; void dragMoveEvent(QDragMoveEvent *event) override; void dropEvent(QDropEvent *event) override; void tabInserted(int index) override; private: void onCurrentChanged(); void updateTabStyle(int index); }; #endif // TABBAR_H
1,880
C++
.h
46
36.869565
84
0.770971
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,382
clipboardbrowserplaceholder.h
hluk_CopyQ/src/gui/clipboardbrowserplaceholder.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef CLIPBOARDBROWSERPLACEHOLDER_H #define CLIPBOARDBROWSERPLACEHOLDER_H #include "gui/clipboardbrowsershared.h" #include <QString> #include <QTimer> #include <QWidget> class ClipboardBrowser; class MainWindow; class QPushButton; class ClipboardBrowserPlaceholder final : public QWidget { Q_OBJECT public: ClipboardBrowserPlaceholder( const QString &tabName, const ClipboardBrowserSharedPtr &shared, QWidget *parent); /// Returns browser (nullptr if not yet created). ClipboardBrowser *browser() const { return m_browser; } /** * Returns browser, creates it first if it doesn't exits (nullptr if it fails to load items). * * If creating fails it creates reaload button instead and * further calls to this function do nothing. */ ClipboardBrowser *createBrowser(); bool setTabName(const QString &tabName); QString tabName() const { return m_tabName; } void setMaxItemCount(int count); void setStoreItems(bool store); void removeItems(); bool isDataLoaded() const; /// Create browser if it doesn't exist and even if it previously failed. ClipboardBrowser *createBrowserAgain(); /// Unload and reload (when needed) browser and settings. void reloadBrowser(); /// Unload browser and data. bool expire(); void unloadBrowser(); void createLoadButton(); signals: void browserCreated(ClipboardBrowser *browser); void browserLoaded(ClipboardBrowser *browser); void browserDestroyed(); protected: void showEvent(QShowEvent *event) override; void hideEvent(QHideEvent *event) override; private: void setActiveWidget(QWidget *widget); bool canExpire() const; void restartExpiring(); bool isEditorOpen() const; ClipboardBrowser *m_browser = nullptr; QPushButton *m_loadButton = nullptr; QString m_tabName; int m_maxItemCount = 200; bool m_storeItems = true; ClipboardBrowserSharedPtr m_sharedData; QTimer m_timerExpire; }; #endif // CLIPBOARDBROWSERPLACEHOLDER_H
2,106
C++
.h
60
30.633333
97
0.743437
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,383
iconfont.h
hluk_CopyQ/src/gui/iconfont.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef ICONFONT_H #define ICONFONT_H class QFont; class QString; const QString &iconFontFamily(); bool loadIconFont(); int iconFontSizePixels(); QFont iconFont(); QFont iconFontFitSize(int w, int h); #endif // ICONFONT_H
275
C++
.h
11
23.272727
44
0.792969
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,384
filterlineedit.h
hluk_CopyQ/src/gui/filterlineedit.h
/**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of Qt Creator. ** ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and Digia. For licensing terms and ** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional ** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ****************************************************************************/ #ifndef FILTERLINEEDIT_H #define FILTERLINEEDIT_H #include "fancylineedit.h" #include "item/itemfilter.h" class QTimer; namespace Utils { class FilterLineEdit final : public FancyLineEdit { Q_OBJECT public: explicit FilterLineEdit(QWidget *parent = nullptr); ItemFilterPtr filter() const; void loadSettings(); signals: void filterChanged(); protected: void keyPressEvent(QKeyEvent *ke) override; void hideEvent(QHideEvent *event) override; void focusInEvent(QFocusEvent *event) override; void focusOutEvent(QFocusEvent *event) override; private: void onTextChanged(); void onMenuAction(); QTimer *m_timerSearch = nullptr; QAction *m_actionRe = nullptr; QAction *m_actionCaseInsensitive = nullptr; }; } // namespace Utils #endif // FILTERLINEEDIT_H
2,271
C++
.h
57
37.614035
77
0.716818
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,385
iconwidget.h
hluk_CopyQ/src/gui/iconwidget.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef ICONWIDGET_H #define ICONWIDGET_H #include <QWidget> class QString; class IconWidget final : public QWidget { public: explicit IconWidget(int icon, QWidget *parent = nullptr); explicit IconWidget(const QString &icon, QWidget *parent = nullptr); QSize sizeHint() const override; protected: void paintEvent(QPaintEvent *event) override; private: QString m_icon; }; #endif // ICONWIDGET_H
468
C++
.h
17
24.823529
72
0.766968
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,386
commandhelpbutton.h
hluk_CopyQ/src/gui/commandhelpbutton.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef COMMANDHELPBUTTON_H #define COMMANDHELPBUTTON_H #include <QWidget> class QToolButton; class QDialog; class CommandHelpButton final : public QWidget { Q_OBJECT public: explicit CommandHelpButton(QWidget *parent = nullptr); public: void showHelp(); signals: void hidden(); private: QToolButton *m_button; QDialog *m_help; }; #endif // COMMANDHELPBUTTON_H
438
C++
.h
20
19.3
58
0.770732
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,387
commandcompleterdocumentation.h
hluk_CopyQ/src/gui/commandcompleterdocumentation.h
// Generated by "utils/script_docs_to_cpp.py" from "docs/scripting-api.rst". template <typename AddDocumentationCallback> void addDocumentation(AddDocumentationCallback addDocumentation) { addDocumentation("version", "version() -> string", "Returns version string."); addDocumentation("help", "help() -> string", "Returns help string."); addDocumentation("help", "help(searchString, ...) -> string", "Returns help for matched commands."); addDocumentation("show", "show()", "Shows main window."); addDocumentation("show", "show(tabName)", "Shows tab."); addDocumentation("showAt", "showAt(x, y, [width, height])", "Shows main window with given geometry."); addDocumentation("showAt", "showAt()", "Shows main window under mouse cursor."); addDocumentation("showAt", "showAt(x, y, width, height, tabName)", "Shows tab with given geometry."); addDocumentation("hide", "hide()", "Hides main window."); addDocumentation("toggle", "toggle() -> bool", "Shows or hides main window."); addDocumentation("menu", "menu()", "Opens context menu."); addDocumentation("menu", "menu(tabName, [maxItemCount, [x, y]])", "Shows context menu for given tab."); addDocumentation("exit", "exit()", "Exits server."); addDocumentation("disable", "disable()", "Disables or enables clipboard content storing."); addDocumentation("monitoring", "monitoring() -> bool", "Returns true only if clipboard storing is enabled."); addDocumentation("visible", "visible() -> bool", "Returns true only if main window is visible."); addDocumentation("focused", "focused() -> bool", "Returns true only if main window has focus."); addDocumentation("focusPrevious", "focusPrevious()", "Activates window that was focused before the main window."); addDocumentation("preview", "preview([true|false])", "Shows/hides item preview and returns true only if preview was visible."); addDocumentation("filter", "filter() -> string", "Returns the current text for filtering items in main window."); addDocumentation("filter", "filter(filterText)", "Sets text for filtering items in main window."); addDocumentation("ignore", "ignore()", "Ignores current clipboard content (used for automatic commands)."); addDocumentation("clipboard", "clipboard([mimeType]) -> `ByteArray`", "Returns clipboard data for MIME type (default is text)."); addDocumentation("selection", "selection([mimeType]) -> `ByteArray`", "Same as `clipboard()` for `Linux mouse selection`_."); addDocumentation("hasClipboardFormat", "hasClipboardFormat(mimeType) -> bool", "Returns true only if clipboard contains MIME type."); addDocumentation("hasSelectionFormat", "hasSelectionFormat(mimeType) -> bool", "Same as `hasClipboardFormat()` for `Linux mouse selection`_."); addDocumentation("isClipboard", "isClipboard() -> bool", "Returns true only in automatic command triggered by clipboard change."); addDocumentation("copy", "copy(text)", "Sets clipboard plain text."); addDocumentation("copy", "copy(mimeType, data, [mimeType, data]...)", "Sets clipboard data."); addDocumentation("copy", "copy(Item)", "Function override with an item argument."); addDocumentation("copy", "copy()", "Sends `Ctrl+C` to current window."); addDocumentation("copySelection", "copySelection(...)", "Same as `copy()` for `Linux mouse selection`_."); addDocumentation("paste", "paste()", "Pastes current clipboard."); addDocumentation("tab", "tab() -> array of strings", "Returns tab names."); addDocumentation("tab", "tab(tabName)", "Sets current tab for the script."); addDocumentation("removeTab", "removeTab(tabName)", "Removes tab."); addDocumentation("renameTab", "renameTab(tabName, newTabName)", "Renames tab."); addDocumentation("tabIcon", "tabIcon(tabName) -> string", "Returns path to icon for tab."); addDocumentation("tabIcon", "tabIcon(tabName, iconPath)", "Sets icon for tab."); addDocumentation("unload", "unload([tabNames...]) -> array of strings", "Unload tabs (i.e. items from memory)."); addDocumentation("forceUnload", "forceUnload([tabNames...])", "Force-unload tabs (i.e. items from memory)."); addDocumentation("count", "count() -> int", "Returns amount of items in current tab."); addDocumentation("select", "select(row)", "Copies item in the row to clipboard."); addDocumentation("next", "next()", "Copies next item from current tab to clipboard."); addDocumentation("previous", "previous()", "Copies previous item from current tab to clipboard."); addDocumentation("add", "add(text|Item...)", "Same as `insert(0, ...)`."); addDocumentation("insert", "insert(row, text|Item...)", "Inserts new items to current tab."); addDocumentation("remove", "remove(row, ...)", "Removes items in current tab."); addDocumentation("move", "move(row)", "Moves selected items to given row in same tab."); addDocumentation("edit", "edit([row|text] ...)", "Edits items in the current tab."); addDocumentation("editItem", "editItem(row, [mimeType, [data]])", "Edits specific format for the item."); addDocumentation("read", "read([mimeType])", "Same as `clipboard()`."); addDocumentation("read", "read(mimeType, row, ...) -> `ByteArray`", "Returns concatenated data from items, or clipboard if row is negative."); addDocumentation("write", "write(row, mimeType, data, [mimeType, data]...)", "Inserts new item to current tab."); addDocumentation("write", "write(row, Item...)", "Function override with one or more item arguments."); addDocumentation("write", "write(row, Item[])", "Function override with item list argument."); addDocumentation("change", "change(row, mimeType, data, [mimeType, data]...)", "Changes data in item in current tab."); addDocumentation("change", "change(row, Item...)", "Function override with one or more item arguments."); addDocumentation("change", "change(row, Item[])", "Function override with item list argument."); addDocumentation("separator", "separator() -> string", "Returns item separator (used when concatenating item data)."); addDocumentation("separator", "separator(separator)", "Sets item separator for concatenating item data."); addDocumentation("action", "action()", "Opens action dialog."); addDocumentation("action", "action([rows, ...], command, [outputItemSeparator])", "Runs command for items in current tab."); addDocumentation("popup", "popup(title, message, [time=8000])", "Shows popup message for given time in milliseconds."); addDocumentation("notification", "notification(...)", "Shows popup message with icon and buttons."); addDocumentation("exportTab", "exportTab(fileName)", "Exports current tab into file."); addDocumentation("importTab", "importTab(fileName)", "Imports items from file to a new tab."); addDocumentation("exportData", "exportData(fileName)", "Exports all tabs and configuration into file."); addDocumentation("importData", "importData(fileName)", "Imports all tabs and configuration from file."); addDocumentation("config", "config() -> string", "Returns help with list of available application options."); addDocumentation("config", "config(optionName) -> string", "Returns value of given application option."); addDocumentation("config", "config(optionName, value) -> string", "Sets application option and returns new value."); addDocumentation("config", "config(optionName, value, ...) -> string", "Sets multiple application options and return list with values in format `optionName=newValue`."); addDocumentation("toggleConfig", "toggleConfig(optionName) -> bool", "Toggles an option (true to false and vice versa) and returns the new value."); addDocumentation("info", "info([pathName]) -> string", "Returns paths and flags used by the application."); addDocumentation("eval", "eval(script)", "Evaluates script and returns result."); addDocumentation("source", "source(fileName)", "Evaluates script file and returns result of last expression in the script."); addDocumentation("currentPath", "currentPath() -> string", "Get current path."); addDocumentation("currentPath", "currentPath(path)", "Set current path."); addDocumentation("str", "str(value) -> string", "Converts a value to string."); addDocumentation("input", "input() -> `ByteArray`", "Returns standard input passed to the script."); addDocumentation("toUnicode", "toUnicode(ByteArray) -> string", "Returns string for bytes with encoding detected by checking Byte Order Mark (BOM)."); addDocumentation("toUnicode", "toUnicode(ByteArray, encodingName) -> string", "Returns string for bytes with given encoding."); addDocumentation("fromUnicode", "fromUnicode(String, encodingName) -> `ByteArray`", "Returns encoded text."); addDocumentation("data", "data(mimeType) -> `ByteArray`", "Returns data for automatic commands or selected items."); addDocumentation("setData", "setData(mimeType, data) -> bool", "Modifies data for `data()` and new clipboard item."); addDocumentation("removeData", "removeData(mimeType)", "Removes data for `data()` and new clipboard item."); addDocumentation("dataFormats", "dataFormats() -> array of strings", "Returns formats available for `data()`."); addDocumentation("print", "print(value)", "Prints value to standard output."); addDocumentation("serverLog", "serverLog(value)", "Prints value to application log."); addDocumentation("logs", "logs() -> string", "Returns application logs."); addDocumentation("abort", "abort()", "Aborts script evaluation."); addDocumentation("fail", "fail()", "Aborts script evaluation with nonzero exit code."); addDocumentation("setCurrentTab", "setCurrentTab(tabName)", "Focus tab without showing main window."); addDocumentation("selectItems", "selectItems(row, ...)", "Selects items in current tab."); addDocumentation("selectedTab", "selectedTab() -> string", "Returns tab that was selected when script was executed."); addDocumentation("selectedItems", "selectedItems() -> array of ints", "Returns selected rows in current tab."); addDocumentation("selectedItemData", "selectedItemData(index) -> array of `Item`", "Returns data for given selected item."); addDocumentation("setSelectedItemData", "setSelectedItemData(index, Item) -> bool", "Set data for given selected item."); addDocumentation("selectedItemsData", "selectedItemsData() -> array of `Item`", "Returns data for all selected items."); addDocumentation("setSelectedItemsData", "setSelectedItemsData(Item[])", "Set data to all selected items."); addDocumentation("currentItem", "currentItem() -> int", "Returns current row in current tab."); addDocumentation("escapeHtml", "escapeHtml(text) -> string", "Returns text with special HTML characters escaped."); addDocumentation("unpack", "unpack(data) -> `Item`", "Returns deserialized object from serialized items."); addDocumentation("pack", "pack(Item) -> `ByteArray`", "Returns serialized item."); addDocumentation("getItem", "getItem(row) -> `Item`", "Returns an item in current tab."); addDocumentation("setItem", "setItem(row, text|Item)", "Inserts item to current tab."); addDocumentation("toBase64", "toBase64(data) -> string", "Returns base64-encoded data."); addDocumentation("fromBase64", "fromBase64(base64String) -> `ByteArray`", "Returns base64-decoded data."); addDocumentation("md5sum", "md5sum(data) -> `ByteArray`", "Returns MD5 checksum of data."); addDocumentation("sha1sum", "sha1sum(data) -> `ByteArray`", "Returns SHA1 checksum of data."); addDocumentation("sha256sum", "sha256sum(data) -> `ByteArray`", "Returns SHA256 checksum of data."); addDocumentation("sha512sum", "sha512sum(data) -> `ByteArray`", "Returns SHA512 checksum of data."); addDocumentation("open", "open(url, ...) -> bool", "Tries to open URLs in appropriate applications."); addDocumentation("execute", "execute(argument, ..., null, stdinData, ...) -> `FinishedCommand`", "Executes a command."); addDocumentation("currentWindowTitle", "String currentWindowTitle() -> string", "Returns window title of currently focused window."); addDocumentation("currentClipboardOwner", "String currentClipboardOwner() -> string", "Returns name of the current clipboard owner."); addDocumentation("dialog", "dialog(...)", "Shows messages or asks user for input."); addDocumentation("menuItems", "menuItems(text...) -> string", "Opens menu with given items and returns selected item or an empty string."); addDocumentation("menuItems", "menuItems(items[]) -> int", "Opens menu with given items and returns index of selected item or -1."); addDocumentation("settings", "settings() -> array of strings", "Returns array with names of all custom user options."); addDocumentation("settings", "Value settings(optionName)", "Returns value for a custom user option."); addDocumentation("settings", "settings(optionName, value)", "Sets value for a new custom user option or overrides existing one."); addDocumentation("dateString", "dateString(format) -> string", "Returns text representation of current date and time."); addDocumentation("commands", "commands() -> array of `Command`", "Return list of all commands."); addDocumentation("setCommands", "setCommands(Command[])", "Clear previous commands and set new ones."); addDocumentation("importCommands", "Command[] importCommands(String) -> array of `Command`", "Return list of commands from exported commands text."); addDocumentation("exportCommands", "String exportCommands(Command[]) -> string", "Return exported command text."); addDocumentation("addCommands", "addCommands(Command[])", "Opens Command dialog, adds commands and waits for user to confirm the dialog."); addDocumentation("networkGet", "NetworkReply networkGet(url) -> `NetworkReply`", "Sends HTTP GET request."); addDocumentation("networkPost", "NetworkReply networkPost(url, postData) -> `NetworkReply`", "Sends HTTP POST request."); addDocumentation("networkGetAsync", "NetworkReply networkGetAsync(url) -> `NetworkReply`", "Same as `networkGet()` but the request is asynchronous."); addDocumentation("networkPostAsync", "NetworkReply networkPostAsync(url, postData) -> `NetworkReply`", "Same as `networkPost()` but the request is asynchronous."); addDocumentation("env", "env(name) -> `ByteArray`", "Returns value of environment variable with given name."); addDocumentation("setEnv", "setEnv(name, value) -> bool", "Sets environment variable with given name to given value."); addDocumentation("sleep", "sleep(time)", "Wait for given time in milliseconds."); addDocumentation("afterMilliseconds", "afterMilliseconds(time, function)", "Executes function after given time in milliseconds."); addDocumentation("screenNames", "screenNames() -> array of strings", "Returns list of available screen names."); addDocumentation("screenshot", "screenshot(format='png', [screenName]) -> `ByteArray`", "Returns image data with screenshot."); addDocumentation("screenshotSelect", "screenshotSelect(format='png', [screenName]) -> `ByteArray`", "Same as `screenshot()` but allows to select an area on screen."); addDocumentation("queryKeyboardModifiers", "queryKeyboardModifiers() -> array of strings", "Returns list of currently pressed keyboard modifiers which can be 'Ctrl', 'Shift', 'Alt', 'Meta'."); addDocumentation("pointerPosition", "pointerPosition() -> array of ints (with two elements)", "Returns current mouse pointer position (x, y coordinates on screen)."); addDocumentation("setPointerPosition", "setPointerPosition(x, y)", "Moves mouse pointer to given coordinates on screen."); addDocumentation("iconColor", "iconColor() -> string", "Get current tray and window icon color name."); addDocumentation("iconColor", "iconColor(colorName)", "Set current tray and window icon color name (examples: 'orange', '#ffa500', '#09f')."); addDocumentation("iconTag", "iconTag() -> string", "Get current tray and window icon tag text."); addDocumentation("iconTag", "iconTag(tag)", "Set current tray and window tag text."); addDocumentation("iconTagColor", "iconTagColor() -> string", "Get current tray and window tag color name."); addDocumentation("iconTagColor", "iconTagColor(colorName)", "Set current tray and window tag color name."); addDocumentation("loadTheme", "loadTheme(path)", "Loads theme from an INI file."); addDocumentation("onClipboardChanged", "onClipboardChanged()", "Called when clipboard or `Linux mouse selection`_ changes and is not set by CopyQ, is not marked as hidden nor secret (see the other callbacks)."); addDocumentation("onOwnClipboardChanged", "onOwnClipboardChanged()", "Called when clipboard or `Linux mouse selection`_ is set by CopyQ and is not marked as hidden nor secret (see the other callbacks)."); addDocumentation("onHiddenClipboardChanged", "onHiddenClipboardChanged()", "Called when clipboard or `Linux mouse selection`_ changes and is marked as hidden but not secret (see the other callbacks)."); addDocumentation("onSecretClipboardChanged", "onSecretClipboardChanged()", "Called if the clipboard or `Linux mouse selection`_ changes and contains a password or other secret (for example, copied from clipboard manager)."); addDocumentation("onClipboardUnchanged", "onClipboardUnchanged()", "Called when clipboard or `Linux mouse selection`_ changes but data remained the same."); addDocumentation("onStart", "onStart()", "Called when application starts."); addDocumentation("onExit", "onExit()", "Called just before application exists."); addDocumentation("runAutomaticCommands", "runAutomaticCommands() -> bool", "Executes automatic commands on current data."); addDocumentation("clearClipboardData", "clearClipboardData()", "Clear clipboard visibility in GUI."); addDocumentation("updateTitle", "updateTitle()", "Update main window title and tool tip from current data."); addDocumentation("updateClipboardData", "updateClipboardData()", "Sets current clipboard data for tray menu, window title and notification."); addDocumentation("setTitle", "setTitle([title])", "Set main window title and tool tip."); addDocumentation("synchronizeToSelection", "synchronizeToSelection(text)", "Synchronize current data from clipboard to `Linux mouse selection`_."); addDocumentation("synchronizeFromSelection", "synchronizeFromSelection(text)", "Synchronize current data from `Linux mouse selection`_ to clipboard."); addDocumentation("clipboardFormatsToSave", "clipboardFormatsToSave() -> array of strings", "Returns list of clipboard format to save automatically."); addDocumentation("saveData", "saveData()", "Save current data (depends on `mimeOutputTab`)."); addDocumentation("hasData", "hasData() -> bool", "Returns true only if some non-empty data can be returned by data()."); addDocumentation("showDataNotification", "showDataNotification()", "Show notification for current data."); addDocumentation("hideDataNotification", "hideDataNotification()", "Hide notification for current data."); addDocumentation("setClipboardData", "setClipboardData()", "Sets clipboard data for menu commands."); addDocumentation("styles", "styles() -> array of strings", "List available styles for `style` option."); addDocumentation("onItemsAdded", "onItemsAdded()", "Called when items are added to a tab."); addDocumentation("onItemsRemoved", "onItemsRemoved()", "Called when items are being removed from a tab."); addDocumentation("onItemsChanged", "onItemsChanged()", "Called when data in items change."); addDocumentation("onTabSelected", "onTabSelected()", "Called when another tab is opened."); addDocumentation("onItemsLoaded", "onItemsLoaded()", "Called when all items are loaded into a tab."); addDocumentation("ByteArray", "ByteArray", "Wrapper for QByteArray Qt class."); addDocumentation("File", "File", "Wrapper for QFile Qt class."); addDocumentation("Dir", "Dir", "Wrapper for QDir Qt class."); addDocumentation("TemporaryFile", "TemporaryFile", "Wrapper for QTemporaryFile Qt class."); addDocumentation("Settings", "Settings", "Reads and writes INI configuration files. Wrapper for QSettings Qt class."); addDocumentation("Item", "Item", "Object with MIME types of an item."); addDocumentation("ItemSelection", "ItemSelection", "List of items from given tab."); addDocumentation("FinishedCommand", "FinishedCommand", "Properties of finished command."); addDocumentation("NetworkReply", "NetworkReply", "Received network reply object."); addDocumentation("Command", "Command", "Wrapper for a command (from Command dialog)."); addDocumentation("arguments", "arguments", "Array for accessing arguments passed to current function or the script (`arguments[0]` is the script itself)."); addDocumentation("global", "global", "Object allowing to modify global scope which contains all functions like `copy()` or `add()`."); addDocumentation("console", "console", "Allows some logging and debugging."); addDocumentation("mimeText", "mimeText", "Data contains plain text content. Value: 'text/plain'."); addDocumentation("mimeHtml", "mimeHtml", "Data contains HTML content. Value: 'text/html'."); addDocumentation("mimeUriList", "mimeUriList", "Data contains list of links to files, web pages etc. Value: 'text/uri-list'."); addDocumentation("mimeWindowTitle", "mimeWindowTitle", "Current window title for copied clipboard. Value: 'application/x-copyq-owner-window-title'."); addDocumentation("mimeItems", "mimeItems", "Serialized items. Value: 'application/x-copyq-item'."); addDocumentation("mimeItemNotes", "mimeItemNotes", "Data contains notes for item. Value: 'application/x-copyq-item-notes'."); addDocumentation("mimeIcon", "mimeIcon", "Data contains icon for item. Value: 'application/x-copyq-item-icon'."); addDocumentation("mimeOwner", "mimeOwner", "If available, the clipboard was set from CopyQ (from script or copied items). Value: 'application/x-copyq-owner'."); addDocumentation("mimeClipboardMode", "mimeClipboardMode", "Contains `selection` if data is from `Linux mouse selection`_. Value: 'application/x-copyq-clipboard-mode'."); addDocumentation("mimeCurrentTab", "mimeCurrentTab", "Current tab name when invoking command from main window. Value: 'application/x-copyq-current-tab'."); addDocumentation("mimeSelectedItems", "mimeSelectedItems", "Selected items when invoking command from main window. Value: 'application/x-copyq-selected-items'."); addDocumentation("mimeCurrentItem", "mimeCurrentItem", "Current item when invoking command from main window. Value: 'application/x-copyq-current-item'."); addDocumentation("mimeHidden", "mimeHidden", "If set to `1`, the clipboard or item content will be hidden in GUI. Value: 'application/x-copyq-hidden'."); addDocumentation("mimeSecret", "mimeSecret", "If set to `1`, the clipboard contains a password or other secret (for example, copied from clipboard manager)."); addDocumentation("mimeShortcut", "mimeShortcut", "Application or global shortcut which activated the command. Value: 'application/x-copyq-shortcut'."); addDocumentation("mimeColor", "mimeColor", "Item color (same as the one used by themes). Value: 'application/x-copyq-color'."); addDocumentation("mimeOutputTab", "mimeOutputTab", "Name of the tab where to store new item. Value: 'application/x-copyq-output-tab'."); addDocumentation("mimeDisplayItemInMenu", "mimeDisplayItemInMenu", "Indicates if display commands run for a menu. Value: 'application/x-copyq-display-item-in-menu'."); addDocumentation("plugins.itemsync.selectedTabPath", "plugins.itemsync.selectedTabPath()", "Returns synchronization path for current tab (mimeCurrentTab)."); addDocumentation("plugins.itemsync.tabPaths", "plugins.itemsync.tabPaths", "Object that maps tab name to synchronization path."); addDocumentation("plugins.itemsync.mimeBaseName", "plugins.itemsync.mimeBaseName", "MIME type for accessing base name (without full path)."); addDocumentation("plugins.itemtags.userTags", "plugins.itemtags.userTags", "List of user-defined tags."); addDocumentation("plugins.itemtags.tags", "plugins.itemtags.tags(row, ...)", "List of tags for items in given rows."); addDocumentation("plugins.itemtags.tag", "plugins.itemtags.tag(tagName, [rows, ...])", "Add given tag to items in given rows or selected items."); addDocumentation("plugins.itemtags.untag", "plugins.itemtags.untag(tagName, [rows, ...])", "Remove given tag from items in given rows or selected items."); addDocumentation("plugins.itemtags.clearTags", "plugins.itemtags.clearTags([rows, ...])", "Remove all tags from items in given rows or selected items."); addDocumentation("plugins.itemtags.hasTag", "plugins.itemtags.hasTag(tagName, [rows, ...])", "Return true if given tag is present in any of items in given rows or selected items."); addDocumentation("plugins.itemtags.mimeTags", "plugins.itemtags.mimeTags", "MIME type for accessing list of tags."); addDocumentation("plugins.itempinned.isPinned", "plugins.itempinned.isPinned(rows, ...)", "Returns true only if any item in given rows is pinned."); addDocumentation("plugins.itempinned.pin", "plugins.itempinned.pin(rows, ...)", "Pin items in given rows or selected items or new item created from clipboard (if called from automatic command)."); addDocumentation("plugins.itempinned.unpin", "plugins.itempinned.unpin(rows, ...)", "Unpin items in given rows or selected items."); addDocumentation("plugins.itempinned.mimePinned", "plugins.itempinned.mimePinned", "Presence of the format in an item indicates that it is pinned."); }
25,900
C++
.h
226
109.685841
228
0.729833
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,388
tabtree.h
hluk_CopyQ/src/gui/tabtree.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef TABTREE_H #define TABTREE_H #include "gui/tabswidgetinterface.h" #include <QList> #include <QString> #include <QTimer> #include <QTreeWidget> class QMimeData; class QTreeWidgetItem; class TabTree final : public QTreeWidget, public TabsWidgetInterface { Q_OBJECT public: explicit TabTree(QWidget *parent = nullptr); QString getCurrentTabPath() const override; bool isTabGroup(const QString &tab) const override; QString tabName(int tabIndex) const override; void setTabName(int tabIndex, const QString &tabName) override; void setTabItemCount(const QString &tabName, const QString &itemCount) override; void setTabIcon(QTreeWidgetItem *item, const QString &icon); void setTabIcon(const QString &tabName, const QString &icon) override; void insertTab(int index, const QString &path) override; void removeTab(int index) override; void updateCollapsedTabs(QList<QString> *collapsedTabs) const override; void setCollapsedTabs(const QList<QString> &collapsedTabs) override; void updateTabIcons(const QHash<QString, QString> &tabIcons) override; void nextTab() override; void previousTab() override; void setCurrentTab(int index) override; void adjustSize() override; /** Return item with given @a index or nullptr if it doesn't exist. */ QTreeWidgetItem *findTreeItem(int index) const; /** Return item with given @a path or nullptr if it doesn't exist. */ QTreeWidgetItem *findTreeItem(const QString &path) const; /** Get tab index for @a item (-1 if it's a group). */ int getTabIndex(const QTreeWidgetItem *item) const; /** Return path to item in tree. */ QString getTabPath(const QTreeWidgetItem *item) const; /** Return true only if tab is tab group. */ bool isTabGroup(const QTreeWidgetItem *item) const; /** Return true only if tab is tab group and is empty. */ bool isEmptyTabGroup(const QTreeWidgetItem *item) const; QSize sizeHint() const override; signals: void currentTabChanged(int index); void tabTreeMenuRequested(const QPoint &pos, const QString &groupPath); void tabsMoved(const QString &oldPrefix, const QString &newPrefix, const QList<int> &indexes); void dropItems(const QString &tabName, const QMimeData *data); protected: void contextMenuEvent(QContextMenuEvent *event) override; void dragEnterEvent(QDragEnterEvent *event) override; void dragMoveEvent(QDragMoveEvent *event) override; void dropEvent(QDropEvent *event) override; bool eventFilter(QObject *obj, QEvent *event) override; void rowsInserted(const QModelIndex &parent, int start, int end) override; void showEvent(QShowEvent *event) override; private: void onCurrentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous); void updateSize(); void doUpdateSize(); void requestTabMenu(QPoint itemPosition, QPoint menuPosition); void deleteItem(QTreeWidgetItem *item); QTimer m_timerUpdate; QList<QTreeWidgetItem*> m_tabs; }; #endif // TABTREE_H
3,106
C++
.h
67
42
98
0.759136
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,389
importexportdialog.h
hluk_CopyQ/src/gui/importexportdialog.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef IMPORTEXPORTDIALOG_H #define IMPORTEXPORTDIALOG_H #include <QDialog> namespace Ui { class ImportExportDialog; } class ImportExportDialog final : public QDialog { public: explicit ImportExportDialog(QWidget *parent = nullptr); ~ImportExportDialog(); void setTabs(const QStringList &tabs); void setCurrentTab(const QString &tabName); void setHasConfiguration(bool hasConfiguration); void setHasCommands(bool hasCommands); void setConfigurationEnabled(bool enabled); void setCommandsEnabled(bool enabled); QStringList selectedTabs() const; bool isConfigurationEnabled() const; bool isCommandsEnabled() const; private: void onCheckBoxAllClicked(bool checked); void update(); bool canAccept() const; Ui::ImportExportDialog *ui; }; #endif // IMPORTEXPORTDIALOG_H
883
C++
.h
28
27.928571
59
0.780285
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,390
theme.h
hluk_CopyQ/src/gui/theme.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef THEME_H #define THEME_H #include "common/option.h" #include <QFont> #include <QFontMetrics> #include <QHash> #include <QPalette> #include <QStringList> namespace Ui { class ConfigTabAppearance; } class QAbstractScrollArea; class QListView; class QSettings; class QString; class QVariant; struct ClipboardBrowserShared; using Values = QHash<QString, QVariant>; class Theme final { public: Theme() = default; explicit Theme(const QSettings &settings); explicit Theme(Ui::ConfigTabAppearance *ui); /** Load theme from settings file. */ void loadTheme(const QSettings &settings); /** Save theme to settings file. */ void saveTheme(QSettings *settings) const; /** Return value for theme option with given @a name. */ QVariant value(const QString &name) const; /** Return parsed color. */ QColor color(const QString &name) const; /** Return parsed font. */ QFont font(const QString &name) const; /** Returt evaluated color expression. */ QColor evalColorExpression(const QString &expr) const; /** Set fonts and color for ClipboardBrowser object. */ void decorateBrowser(QListView *c) const; /** Decorate main window. */ void decorateMainWindow(QWidget *mainWindow) const; /** Decorate scroll area (toggle scroll bar). */ void decorateScrollArea(QAbstractScrollArea *scrollArea) const; /** Decorate item preview. */ void decorateItemPreview(QAbstractScrollArea *itemPreview) const; /** Return stylesheet for menus. */ QString getMenuStyleSheet() const; QString getNotificationStyleSheet() const; Qt::ScrollBarPolicy scrollbarPolicy() const; bool useSystemIcons() const; QFont themeFontFromString(const QString &fontString) const; bool isAntialiasingEnabled() const; void resetTheme(); void updateTheme(); QSize rowNumberSize(int n) const; bool showRowNumber() const { return m_showRowNumber; } const QFont &rowNumberFont() const { return m_rowNumberFont; } const QPalette &rowNumberPalette() const { return m_rowNumberPalette; } const QFont &editorFont() const { return m_editorFont; } const QPalette &editorPalette() const { return m_editorPalette; } const QFont &searchFont() const { return m_searchFont; } const QPalette &searchPalette() const { return m_searchPalette; } QSize margins() const { return m_margins; } void setRowIndexFromOne(bool enabled) { m_rowIndexFromOne = enabled; } private: void decorateBrowser(QAbstractScrollArea *c) const; bool isMainWindowThemeEnabled() const; /** Return style sheet with given @a name. */ QString themeStyleSheet(const QString &name) const; /** Return parsed color name. */ QString themeColorString(const QString &name) const; QString getStyleSheet(const QString &name, Values values = Values(), int maxRecursion = 8) const; QString parseStyleSheet(const QString &css, Values values, int maxRecursion) const; QString parsePlaceholder(const QString &name, Values *values, int maxRecursion) const; QHash<QString, Option> m_theme; Ui::ConfigTabAppearance *ui = nullptr; QFont m_rowNumberFont; QFontMetrics m_rowNumberFontMetrics = QFontMetrics(m_rowNumberFont); QPalette m_rowNumberPalette; bool m_showRowNumber = false; int m_rowNumberMargin = 2; QFont m_editorFont; QPalette m_editorPalette; QFont m_searchFont; QPalette m_searchPalette; bool m_antialiasing = true; QSize m_margins; bool m_rowIndexFromOne = true; }; QString serializeColor(const QColor &color); QColor deserializeColor(const QString &colorName); QColor evalColor(const QString &expression, const Theme &theme, const Values &values = Values(), int maxRecursion = 8); QString findThemeFile(const QString &fileName); QString defaultUserThemePath(); QStringList themePaths(); #endif // THEME_H
3,957
C++
.h
95
37.410526
119
0.744887
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,391
logdialog.h
hluk_CopyQ/src/gui/logdialog.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef LOGDIALOG_H #define LOGDIALOG_H #include "common/log.h" #include <QDialog> namespace Ui { class LogDialog; } class Decorator; class LogDialog final : public QDialog { public: explicit LogDialog(QWidget *parent = nullptr); ~LogDialog(); private: using FilterCheckBoxSlot = void (LogDialog::*)(bool); void updateLog(); void showError(bool show); void showWarning(bool show); void showNote(bool show); void showDebug(bool show); void showTrace(bool show); void addFilterCheckBox(LogLevel level, FilterCheckBoxSlot slot); Ui::LogDialog *ui; Decorator *m_logDecorator; Decorator *m_stringDecorator; Decorator *m_threadNameDecorator; bool m_showError; bool m_showWarning; bool m_showNote; bool m_showDebug; bool m_showTrace; }; #endif // LOGDIALOG_H
886
C++
.h
34
22.441176
68
0.734207
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,392
notificationbasic.h
hluk_CopyQ/src/gui/notificationbasic.h
// SPDX-License-Identifier: GPL-3.0-or-later #pragma once class Notification; class QObject; Notification *createNotificationBasic(QObject *parent);
152
C++
.h
5
28.8
55
0.833333
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,393
iconselectbutton.h
hluk_CopyQ/src/gui/iconselectbutton.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef ICONSELECTBUTTON_H #define ICONSELECTBUTTON_H #include <QPushButton> class IconSelectButton final : public QPushButton { Q_OBJECT Q_PROPERTY(QString currentIcon READ currentIcon WRITE setCurrentIcon NOTIFY currentIconChanged) public: explicit IconSelectButton(QWidget *parent = nullptr); const QString &currentIcon() const { return m_currentIcon; } QSize sizeHint() const override; void setCurrentIcon(const QString &iconString); signals: void currentIconChanged(const QString &icon); private: void onClicked(); QString m_currentIcon; }; #endif // ICONSELECTBUTTON_H
666
C++
.h
20
30
99
0.786164
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,394
tabwidget.h
hluk_CopyQ/src/gui/tabwidget.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef TABWIDGET_H #define TABWIDGET_H #include <QHash> #include <QTabBar> #include <QWidget> #include <memory> class QMainWindow; class QMimeData; class QPoint; class QSettings; class QStackedWidget; class QToolBar; class TabsWidgetInterface; class TabWidget final : public QWidget { Q_OBJECT public: explicit TabWidget(QWidget *parent = nullptr); /** Return path to current group in tree (empty string if tree mode is disabled). */ QString getCurrentTabPath() const; /** Return true only if tree mode is enabled and tab is tab group. */ bool isTabGroup(const QString &tab) const; /** Return true only if tab froup is selected in tree mode. */ bool isTabGroupSelected() const; /** Return current tab. */ int currentIndex() const; QWidget *widget(int tabIndex) const; QWidget *currentWidget() const { return widget( currentIndex() ); } /** Return number of tabs. */ int count() const; /** Return path of tab in tree or label in tab bar. */ QString tabName(int tabIndex) const; void setTabName(int tabIndex, const QString &tabName); void setTabItemCountVisible(bool visible); void setTabIcon(const QString &tabName, const QString &icon); void insertTab(int tabIndex, QWidget *widget, const QString &tabName); void addTab(QWidget *widget, const QString &tabName) { insertTab( count(), widget, tabName); } void removeTab(int tabIndex); /** Return tab names. */ QStringList tabs() const; void addToolBars(QMainWindow *mainWindow); void saveTabInfo(); void loadTabInfo(); void updateTabs(QSettings &settings); QToolBar *toolBar() const { return m_toolBarCurrent; } void setCurrentIndex(int tabIndex); void nextTab(); void previousTab(); void setTabBarHidden(bool hidden); void setTreeModeEnabled(bool enabled); void setTabItemCount(const QString &tabName, int itemCount); void setTabsOrder(const QStringList &tabs); signals: /// Tabs moved in tab bar. void tabMoved(int from, int to); /// Tabs moved in tab tree (@a oldPrefix path changed to @a newPrefix). void tabsMoved(const QString &oldPrefix, const QString &newPrefix); void tabBarMenuRequested(const QPoint &pos, int tab); void tabTreeMenuRequested(const QPoint &pos, const QString &groupPath); void tabRenamed(const QString &newName, int index); void currentChanged(int tabIndex, int oldTabIndex); void tabCloseRequested(int); void dropItems(const QString &tabName, const QMimeData *data); protected: bool eventFilter(QObject *object, QEvent *event) override; private: void onTabMoved(int from, int to); void onTabsMoved(const QString &oldPrefix, const QString &newPrefix, const QList<int> &indexes); void onToolBarOrientationChanged(Qt::Orientation orientation); void onTreeItemClicked(); void createTabBar(); void createTabTree(); void updateToolBar(); void updateTabItemCount(const QString &name); QString itemCountLabel(const QString &name); void setTreeModeEnabled(bool enabled, const QStringList &tabs); QToolBar *m_toolBar; QToolBar *m_toolBarTree; QToolBar *m_toolBarCurrent; TabsWidgetInterface *m_tabs = nullptr; QTabBar *m_tabBar = nullptr; QStackedWidget *m_stackedWidget; bool m_hideTabBar; QStringList m_collapsedTabs; QHash<QString, int> m_tabItemCounters; bool m_showTabItemCount; bool m_ignoreCurrentTabChanges = false; }; #endif // TABWIDGET_H
3,570
C++
.h
90
35.222222
100
0.7362
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,395
windowgeometryguard.h
hluk_CopyQ/src/gui/windowgeometryguard.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef WINDOWGEOMETRYGUARD_H #define WINDOWGEOMETRYGUARD_H #include <QObject> #include <QTimer> class QWidget; void raiseWindow(QWidget *window); class WindowGeometryGuard final : public QObject { public: static void create(QWidget *window); bool eventFilter(QObject *object, QEvent *event) override; private: explicit WindowGeometryGuard(QWidget *window); bool isWindowGeometryLocked() const; bool lockWindowGeometry(); void saveWindowGeometry(); void restoreWindowGeometry(); void unlockWindowGeometry(); void onScreenChanged(); QWidget *m_window; QTimer m_timerSaveGeometry; QTimer m_timerRestoreGeometry; QTimer m_timerUnlockGeometry; }; #endif // WINDOWGEOMETRYGUARD_H
785
C++
.h
26
26.692308
62
0.780161
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,397
shortcutdialog.h
hluk_CopyQ/src/gui/shortcutdialog.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef SHORTCUTDIALOG_H #define SHORTCUTDIALOG_H #include <QDialog> namespace Ui { class ShortcutDialog; } class ShortcutDialog final : public QDialog { Q_OBJECT public: explicit ShortcutDialog(QWidget *parent = nullptr); ~ShortcutDialog(); /** Return accepted shortcut or empty one. */ QKeySequence shortcut() const; protected: bool eventFilter(QObject *object, QEvent *event) override; private: void onResetButtonClicked(); Ui::ShortcutDialog *ui; }; #endif // SHORTCUTDIALOG_H
567
C++
.h
22
22.909091
62
0.759328
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
18,398
fix_icon_id.h
hluk_CopyQ/src/gui/fix_icon_id.h
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef FIX_ICON_ID_H #define FIX_ICON_ID_H #include "gui/icons.h" /// Backwards compatibility with old icon font. /// Returns icon ID in the new icon font for an ID from the old one. inline unsigned short fixIconId(unsigned short id) { switch (id) { // envelope-o, notification, support, e-mail, letter, mail, email case 0xf003: return IconEnvelope; // notification, support, envelope, e-mail, letter, mail, message, email // rating, favorite, star-o, score, award, night, achievement case 0xf006: return IconStar; // rating, star, favorite, award, score, night, achievement // hide, garbage, trash-o, remove, trash, delete case 0xf014: return IconTrash; // trash, hide, garbage, remove, delete // file-o, new, document, page, pdf case 0xf016: return IconFile; // new, document, page, file, pdf // download, arrow-circle-o-down case 0xf01a: return IconDownload; // download, import // arrow-circle-o-up case 0xf01b: return IconCircleArrowUp; // arrow-alt-circle-up, arrow-circle-o-up // play-circle-o case 0xf01d: return IconCirclePlay; // write, pencil, edit, update case 0xf040: return IconPencil; // write, edit, pencil-alt, update, pencil // send, share-square-o, arrow, social case 0xf045: return IconUpRightFromSquare; // ok, confirm, check-square-o, done, accept, todo, agree case 0xf046: return IconSquareCheck; // ok, confirm, checkmark, accept, done, check-square, todo, agree // move, arrows, reorder, resize case 0xf047: return IconArrowsUpDownLeftRight; // fullscreen, move, arrows, enlarge, arrows-alt, resize, arrow, expand, bigger, reorder // close, times-circle-o, exit, x case 0xf05c: return IconCircleXmark; // close, times-circle, exit, x // ok, confirm, accept, done, todo, agree, check-circle-o case 0xf05d: return IconCircleCheck; // check-circle, ok, confirm, accept, done, todo, agree // resize, arrows-v case 0xf07d: return IconArrowsUpDown; // arrows-alt-v, resize, arrows-v // arrows-h, resize case 0xf07e: return IconArrowsLeftRight; // arrows-h, arrows-alt-h, resize // thumbs-o-up, like, favorite, hand, approve, agree case 0xf087: return IconThumbsUp; // thumbs-o-up, thumbs-up, like, favorite, hand, approve, agree // disapprove, dislike, disagree, thumbs-o-down, hand case 0xf088: return IconThumbsDown; // thumbs-down, thumbs-o-down, disagree, disapprove, hand, dislike // love, heart-o, favorite, like case 0xf08a: return IconHeart; // heart, favorite, like, love // sign-out, log out, leave, logout, arrow, exit case 0xf08b: return IconRightFromBracket; // sign-out, log out, leave, logout, arrow, exit, sign-out-alt // new, open, external-link case 0xf08e: return IconFileLines; // file-alt, file-text, new, pdf, document, page // join, signup, enter, sign-in, signin, sign up, arrow, sign in, login, log in case 0xf090: return IconRightToBracket; // sign-in-alt, join, signup, enter, sign-in, signin, sign up, arrow, sign in, login, log in // box, square-o, square, block case 0xf096: return IconSquare; // box, square, block // bookmark-o, save case 0xf097: return IconBookmark; // bookmark, save // notification, reminder, bell-o, alert case 0xf0a2: return IconBell; // notification, reminder, bell, alert // purchase, buy, money, cash, checkout, payment case 0xf0d6: return IconMoneyBill1; // money, money-bill-alt // tachometer case 0xf0e4: return IconGaugeHigh; // tachometer, tachometer-alt // feedback, notification, sms, comment-o, note, conversation, speech, chat, texting, message, bubble case 0xf0e5: return IconComment; // comment, feedback, notification, sms, note, conversation, speech, chat, texting, message, bubble // feedback, notification, sms, note, conversation, speech, chat, texting, comments-o, message, bubble case 0xf0e6: return IconComments; // feedback, notification, sms, comments, note, conversation, speech, chat, texting, message, bubble // transfer, arrows, arrow, exchange case 0xf0ec: return IconRightLeft; // transfer, arrows, exchange-alt, arrow, exchange // import, cloud-download case 0xf0ed: return IconCloudArrowDown; // cloud-download-alt, cloud-download // import, cloud-upload case 0xf0ee: return IconCloudArrowUp; // cloud-upload-alt, cloud-upload // restaurant, food, spoon, cutlery, dinner, eat, knife case 0xf0f5: return IconUtensils; // restaurant, food, spoon, cutlery, utensils, dinner, eat, knife // file-text-o, document, page, new, pdf case 0xf0f6: return IconFileLines; // file-alt, file-text, new, pdf, document, page // apartment, business, office, company, work, building-o case 0xf0f7: return IconBuilding; // building, apartment, business, office, company, work // circle-o case 0xf10c: return IconCircle; // reply case 0xf112: return IconReply; // reply // folder-o case 0xf114: return IconFolder; // folder-open-o case 0xf115: return IconFolderOpen; // report, notification, flag-o case 0xf11d: return IconFlag; // report, notification, flag, notify // star-half-o, score, award, achievement, rating case 0xf123: return IconStarHalf; // rating, star-half-empty, star-half-full, award, score, star-half, achievement // security, winner, award, shield, achievement case 0xf132: return IconShield; // shield, shield-alt // movie, ticket, support, pass case 0xf145: return IconTicketSimple; // ticket-alt, ticket // hide, collapse, remove, minus-square-o, minify, trash, delete case 0xf147: return IconSquareMinus; // hide, collapse, remove, minus-square, minify, trash, delete // level-up, arrow case 0xf148: return IconTurnUp; // level-up, level-up-alt // level-down, arrow case 0xf149: return IconTurnDown; // level-down, level-down-alt // new, external-link-square, open case 0xf14c: return IconSquareUpRight; // external-link-square-alt, external-link-square, open, new // video, film, youtube-square case 0xf166: return 0xf431; // start, playing, youtube-play case 0xf16a: return IconYoutube; // long-arrow-down case 0xf175: return IconDownLong; // long-arrow-down, long-arrow-alt-down // long-arrow-up case 0xf176: return IconUpLong; // long-arrow-alt-up, long-arrow-up // long-arrow-left, back, previous case 0xf177: return IconLeftLong; // long-arrow-alt-left, previous, back, long-arrow-left // long-arrow-right case 0xf178: return IconRightLong; // long-arrow-alt-right, long-arrow-right // forward, arrow-circle-o-right, next case 0xf18e: return IconCircleRight; // forward, next, arrow-circle-o-right, arrow-alt-circle-right // arrow-circle-o-left, back, previous case 0xf190: return IconCircleLeft; // arrow-circle-o-left, previous, back, arrow-alt-circle-left // new, add, create, expand, plus-square-o case 0xf196: return IconSquarePlus; // new, add, plus-square, create, expand // spoon case 0xf1b1: return IconSpoon; // spoon, utensil-spoon // circle-thin case 0xf1db: return IconCircle; // notification, circle, dot, circle-thin // bell-slash-o case 0xf1f7: return IconBellSlash; // diamond, gemstone, gem case 0xf219: return IconGem; // diamond, gem // sticky-note-o case 0xf24a: return IconNoteSticky; // hourglass-o case 0xf250: return IconHourglass; // map-o case 0xf278: return IconMap; // commenting-o, feedback, sms, texting, note, conversation, speech, chat, notification, message, bubble case 0xf27b: return IconComment; // commenting, feedback, notification, sms, note, conversation, speech, chat, texting, comment-alt, bubble, message // purchase, buy, money, debit, credit card, checkout, payment, credit-card-alt case 0xf283: return IconCreditCard; // purchase, buy, money, credit-card, debit, checkout, payment, credit-card-alt // pause-circle-o case 0xf28c: return IconCirclePause; // stop-circle-o case 0xf28e: return IconCircleStop; // wheelchair-alt, handicap, person case 0xf29b: return IconWheelchair; // handicap, person, wheelchair // question-circle-o case 0xf29c: return IconCircleQuestion; // envelope-open-o case 0xf2b7: return IconEnvelopeOpen; // address-book-o case 0xf2ba: return IconAddressBook; // address-card-o case 0xf2bc: return IconAddressCard; // user-circle-o case 0xf2be: return IconCircleUser; // user-o case 0xf2c0: return IconUser; // id-card-o case 0xf2c3: return IconIdCard; // window-close case 0xf2d3: return IconRectangleXmark; // window-close // window-close-o case 0xf2d4: return IconRectangleXmark; default: return id; } } #endif // FIX_ICON_ID_H
8,969
C++
.h
166
48.759036
152
0.709356
hluk/CopyQ
8,577
439
420
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false