2015-10-15 16:34:54 +02:00
|
|
|
/****************************************************************************
|
|
|
|
|
**
|
2016-01-15 14:58:39 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2015-10-15 16:34:54 +02:00
|
|
|
**
|
|
|
|
|
** 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
|
2016-01-15 14:58:39 +01:00
|
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
2015-10-15 16:34:54 +02:00
|
|
|
**
|
2016-01-15 14:58:39 +01:00
|
|
|
** GNU General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU
|
|
|
|
|
** General Public License version 3 as published by the Free Software
|
|
|
|
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
|
** included in the packaging of this file. Please review the following
|
|
|
|
|
** information to ensure the GNU General Public License requirements will
|
|
|
|
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
2015-10-15 16:34:54 +02:00
|
|
|
**
|
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2015-10-15 16:34:54 +02:00
|
|
|
|
2015-11-23 16:41:54 +01:00
|
|
|
#include "icon.h"
|
2016-08-11 13:49:16 +02:00
|
|
|
#include "utils_global.h"
|
2015-10-15 16:34:54 +02:00
|
|
|
|
|
|
|
|
namespace Utils {
|
2015-11-23 16:41:54 +01:00
|
|
|
namespace Icons {
|
2015-10-15 16:34:54 +02:00
|
|
|
|
2017-10-09 06:59:54 +02:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon HOME;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon HOME_TOOLBAR;
|
2016-08-11 13:49:16 +02:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon EDIT_CLEAR;
|
2016-12-23 13:09:22 +01:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon EDIT_CLEAR_TOOLBAR;
|
2016-08-11 13:49:16 +02:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon LOCKED_TOOLBAR;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon LOCKED;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon UNLOCKED_TOOLBAR;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon NEXT;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon NEXT_TOOLBAR;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon PREV;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon PREV_TOOLBAR;
|
2017-10-10 00:12:57 +02:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon PROJECT;
|
2016-08-11 13:49:16 +02:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon ZOOM;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon ZOOM_TOOLBAR;
|
2016-10-24 17:12:12 +02:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon ZOOMIN_TOOLBAR;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon ZOOMOUT_TOOLBAR;
|
2016-10-26 00:05:40 +02:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon FITTOVIEW_TOOLBAR;
|
2016-08-11 13:49:16 +02:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon OK;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon NOTLOADED;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon BROKEN;
|
2016-10-10 16:16:27 +02:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon BOOKMARK;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon BOOKMARK_TOOLBAR;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon BOOKMARK_TEXTEDITOR;
|
2016-10-18 17:33:06 +02:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon SNAPSHOT_TOOLBAR;
|
2018-03-05 11:38:11 +01:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon NEWSEARCH_TOOLBAR;
|
2016-08-03 17:55:54 +02:00
|
|
|
|
2016-08-11 13:49:16 +02:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon NEWFILE;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon OPENFILE;
|
2018-02-12 11:39:13 +01:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon OPENFILE_TOOLBAR;
|
2016-08-11 13:49:16 +02:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon SAVEFILE;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon SAVEFILE_TOOLBAR;
|
2018-01-12 15:32:10 +01:00
|
|
|
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon EXPORTFILE_TOOLBAR;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon MULTIEXPORTFILE_TOOLBAR;
|
|
|
|
|
|
2016-08-11 13:49:16 +02:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon UNDO;
|
2016-12-12 12:55:19 +01:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon UNDO_TOOLBAR;
|
2016-08-11 13:49:16 +02:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon REDO;
|
2016-12-12 12:55:19 +01:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon REDO_TOOLBAR;
|
2016-08-11 13:49:16 +02:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon COPY;
|
2016-12-12 12:55:19 +01:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon COPY_TOOLBAR;
|
2016-08-11 13:49:16 +02:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon PASTE;
|
2016-12-12 12:55:19 +01:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon PASTE_TOOLBAR;
|
2016-08-11 13:49:16 +02:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon CUT;
|
2016-12-12 12:55:19 +01:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon CUT_TOOLBAR;
|
2016-08-11 13:49:16 +02:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon RESET;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon RESET_TOOLBAR;
|
2016-08-03 17:55:54 +02:00
|
|
|
|
2016-08-11 13:49:16 +02:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon ARROW_UP;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon ARROW_DOWN;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon MINUS;
|
2016-09-20 15:59:48 +02:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon PLUS_TOOLBAR;
|
2016-08-11 13:49:16 +02:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon PLUS;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon MAGNIFIER;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon CLEAN;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon CLEAN_TOOLBAR;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon RELOAD;
|
2016-09-17 18:31:56 +03:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon TOGGLE_LEFT_SIDEBAR;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon TOGGLE_LEFT_SIDEBAR_TOOLBAR;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon TOGGLE_RIGHT_SIDEBAR;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon TOGGLE_RIGHT_SIDEBAR_TOOLBAR;
|
2016-08-11 13:49:16 +02:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon CLOSE_TOOLBAR;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon CLOSE_FOREGROUND;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon CLOSE_BACKGROUND;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon SPLIT_HORIZONTAL;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon SPLIT_HORIZONTAL_TOOLBAR;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon SPLIT_VERTICAL;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon SPLIT_VERTICAL_TOOLBAR;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon CLOSE_SPLIT_TOP;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon CLOSE_SPLIT_BOTTOM;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon CLOSE_SPLIT_LEFT;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon CLOSE_SPLIT_RIGHT;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon FILTER;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon LINK;
|
2018-01-07 21:39:39 +01:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon LINK_TOOLBAR;
|
2017-01-02 12:37:49 +01:00
|
|
|
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon INFO;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon INFO_TOOLBAR;
|
2016-08-11 13:49:16 +02:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon WARNING;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon WARNING_TOOLBAR;
|
2017-01-02 12:37:49 +01:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon CRITICAL;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon CRITICAL_TOOLBAR;
|
|
|
|
|
|
2016-08-11 13:49:16 +02:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon ERROR_TASKBAR;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon EXPAND_ALL_TOOLBAR;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon TOOLBAR_EXTENSION;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon RUN_SMALL;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon RUN_SMALL_TOOLBAR;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon STOP_SMALL;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon STOP_SMALL_TOOLBAR;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon INTERRUPT_SMALL;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon INTERRUPT_SMALL_TOOLBAR;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon BOUNDING_RECT;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon EYE_OPEN_TOOLBAR;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon EYE_CLOSED_TOOLBAR;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon REPLACE;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon EXPAND;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon EXPAND_TOOLBAR;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon COLLAPSE;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon COLLAPSE_TOOLBAR;
|
2017-01-26 18:11:59 +01:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon PAN_TOOLBAR;
|
2016-08-22 11:44:54 +02:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon EMPTY14;
|
2017-07-24 16:45:11 +02:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon EMPTY16;
|
2016-10-06 17:29:59 +02:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon OVERLAY_ADD;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon OVERLAY_WARNING;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon OVERLAY_ERROR;
|
2015-10-15 16:34:54 +02:00
|
|
|
|
2017-11-16 08:25:31 +01:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon CODEMODEL_ERROR;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon CODEMODEL_WARNING;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon CODEMODEL_DISABLED_ERROR;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon CODEMODEL_DISABLED_WARNING;
|
2018-01-17 15:08:30 +01:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon CODEMODEL_FIXIT;
|
2017-11-16 08:25:31 +01:00
|
|
|
|
Add macOS touch bar support
Introduce a generic Utils::TouchBar that implements a touch bar for
macOS based on QAction. Touch bars can be nested, and one is set to be
the application's top level touch bar.
Also add an ActionContainer for the touch bar. That allows us to manage
the layout of the touch bar the same way we do with menus.
Since the touch bar is an input device with very limited space, a
command in the touch bar needs to be specifically styled for the touch
bar by setting either touchBarText or touchBarIcon (or both).
Touch bars can be nested by nesting the ActionContainers. A nested touch
bar ActionContainer needs to specify an icon and/or text to show in the
touch bar button that opens that sub-bar.
Commands are only shown in the touch bar if they are valid within the
current context.
Implementation-wise we cannot use the standard NSPopoverTouchBarItem for
nesting touch bar levels. We cannot hide items in the touch bar, because
hidden items still take up space in the touch bar. So we need to rebuild
the touch bar regularly. Since the items we show are very dynamic, every
time the items in the toplevel bar change because of a context change,
any opened sub-level touch bar closes. That is why we maintain a stack of
touch bar levels ourselves, replacing the main touch bar with the current
level, and managing opening and closing the levels manually.
This patch adds buttons for Help, Bookmarks, Header/Source, Follow
(Symbol), Decl/Def, and a sub-bar for the debugger actions.
Fixes: QTCREATORBUG-21263
Change-Id: Ib63e610f21a993f1d324fe23c83a7f2224f434ac
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-10-05 13:52:57 +02:00
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon MACOS_TOUCHBAR_BOOKMARK;
|
|
|
|
|
QTCREATOR_UTILS_EXPORT extern const Icon MACOS_TOUCHBAR_CLEAR;
|
2015-11-23 16:41:54 +01:00
|
|
|
} // namespace Icons
|
2018-07-25 10:00:38 +02:00
|
|
|
|
|
|
|
|
namespace CodeModelIcon {
|
|
|
|
|
|
|
|
|
|
enum Type {
|
|
|
|
|
Class = 0,
|
|
|
|
|
Struct,
|
|
|
|
|
Enum,
|
|
|
|
|
Enumerator,
|
|
|
|
|
FuncPublic,
|
|
|
|
|
FuncProtected,
|
|
|
|
|
FuncPrivate,
|
|
|
|
|
FuncPublicStatic,
|
|
|
|
|
FuncProtectedStatic,
|
|
|
|
|
FuncPrivateStatic,
|
|
|
|
|
Namespace,
|
|
|
|
|
VarPublic,
|
|
|
|
|
VarProtected,
|
|
|
|
|
VarPrivate,
|
|
|
|
|
VarPublicStatic,
|
|
|
|
|
VarProtectedStatic,
|
|
|
|
|
VarPrivateStatic,
|
|
|
|
|
Signal,
|
|
|
|
|
SlotPublic,
|
|
|
|
|
SlotProtected,
|
|
|
|
|
SlotPrivate,
|
|
|
|
|
Keyword,
|
|
|
|
|
Macro,
|
|
|
|
|
Property,
|
|
|
|
|
Unknown
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
QTCREATOR_UTILS_EXPORT QIcon iconForType(Type type);
|
|
|
|
|
|
|
|
|
|
} // namespace CodeModel
|
2015-10-15 16:34:54 +02:00
|
|
|
} // namespace Utils
|