mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-26 15:54:15 +01:00
Removing several IDE specific code from GCS. Still a work in progress...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@209 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
9953188fe2
commit
557f33fe49
@ -33,7 +33,6 @@
|
|||||||
#include "icore.h"
|
#include "icore.h"
|
||||||
#include "ifilewizardextension.h"
|
#include "ifilewizardextension.h"
|
||||||
#include "mimedatabase.h"
|
#include "mimedatabase.h"
|
||||||
#include "editormanager/editormanager.h"
|
|
||||||
|
|
||||||
#include <extensionsystem/pluginmanager.h>
|
#include <extensionsystem/pluginmanager.h>
|
||||||
#include <utils/filewizarddialog.h>
|
#include <utils/filewizarddialog.h>
|
||||||
@ -530,18 +529,10 @@ void BaseFileWizard::setupWizard(QWizard *w)
|
|||||||
w->setOption(QWizard::NoBackButtonOnStartPage, true);
|
w->setOption(QWizard::NoBackButtonOnStartPage, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BaseFileWizard::postGenerateFiles(const GeneratedFiles &l, QString *errorMessage)
|
bool BaseFileWizard::postGenerateFiles(const GeneratedFiles &l, QString */*errorMessage*/)
|
||||||
{
|
{
|
||||||
// File mode: open the editors in file mode and ensure editor pane
|
// File mode: open the editors in file mode and ensure editor pane
|
||||||
const Core::GeneratedFiles::const_iterator cend = l.constEnd();
|
const Core::GeneratedFiles::const_iterator cend = l.constEnd();
|
||||||
Core::EditorManager *em = Core::EditorManager::instance();
|
|
||||||
for (Core::GeneratedFiles::const_iterator it = l.constBegin(); it != cend; ++it) {
|
|
||||||
if (!em->openEditor(it->path(), it->editorKind())) {
|
|
||||||
*errorMessage = tr("Failed to open an editor for '%1'.").arg(it->path());
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
em->ensureEditorManagerVisible();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,50 +1,48 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/core" >
|
<qresource prefix="/core">
|
||||||
<file>images/openpilot_logo_256.png</file>
|
<file>images/openpilot_logo_256.png</file>
|
||||||
<file>images/openpilot_logo_128.png</file>
|
<file>images/openpilot_logo_128.png</file>
|
||||||
<file>images/openpilot_logo_64.png</file>
|
<file>images/openpilot_logo_64.png</file>
|
||||||
<file>images/clean_pane_small.png</file>
|
<file>images/clean_pane_small.png</file>
|
||||||
<file>images/clear.png</file>
|
<file>images/clear.png</file>
|
||||||
<file>images/closebutton.png</file>
|
<file>images/closebutton.png</file>
|
||||||
<file>images/dir.png</file>
|
<file>images/dir.png</file>
|
||||||
<file>images/editcopy.png</file>
|
<file>images/editcopy.png</file>
|
||||||
<file>images/editcut.png</file>
|
<file>images/editcut.png</file>
|
||||||
<file>images/editpaste.png</file>
|
<file>images/editpaste.png</file>
|
||||||
<file>images/empty14.png</file>
|
<file>images/empty14.png</file>
|
||||||
<file>images/filenew.png</file>
|
<file>images/filenew.png</file>
|
||||||
<file>images/fileopen.png</file>
|
<file>images/fileopen.png</file>
|
||||||
<file>images/filesave.png</file>
|
<file>images/filesave.png</file>
|
||||||
<file>images/find.png</file>
|
<file>images/find.png</file>
|
||||||
<file>images/findnext.png</file>
|
<file>images/findnext.png</file>
|
||||||
<file>images/qtcreator_logo_32.png</file>
|
<file>images/inputfield.png</file>
|
||||||
<file>images/inputfield.png</file>
|
<file>images/inputfield_disabled.png</file>
|
||||||
<file>images/inputfield_disabled.png</file>
|
<file>images/linkicon.png</file>
|
||||||
<file>images/linkicon.png</file>
|
<file>images/locked.png</file>
|
||||||
<file>images/locked.png</file>
|
<file>images/magnifier.png</file>
|
||||||
<file>images/magnifier.png</file>
|
<file>images/minus.png</file>
|
||||||
<file>images/minus.png</file>
|
<file>images/next.png</file>
|
||||||
<file>images/next.png</file>
|
<file>images/panel_button.png</file>
|
||||||
<file>images/panel_button.png</file>
|
<file>images/panel_button_checked.png</file>
|
||||||
<file>images/panel_button_checked.png</file>
|
<file>images/panel_button_checked_hover.png</file>
|
||||||
<file>images/panel_button_checked_hover.png</file>
|
<file>images/panel_button_hover.png</file>
|
||||||
<file>images/panel_button_hover.png</file>
|
<file>images/panel_button_pressed.png</file>
|
||||||
<file>images/panel_button_pressed.png</file>
|
<file>images/plus.png</file>
|
||||||
<file>images/plus.png</file>
|
<file>images/prev.png</file>
|
||||||
<file>images/prev.png</file>
|
<file>images/pushbutton.png</file>
|
||||||
<file>images/pushbutton.png</file>
|
<file>images/pushbutton_hover.png</file>
|
||||||
<file>images/pushbutton_hover.png</file>
|
<file>images/pushbutton_pressed.png</file>
|
||||||
<file>images/pushbutton_pressed.png</file>
|
<file>images/redo.png</file>
|
||||||
<file>images/qtwatermark.png</file>
|
<file>images/replace.png</file>
|
||||||
<file>images/redo.png</file>
|
<file>images/reset.png</file>
|
||||||
<file>images/replace.png</file>
|
<file>images/sidebaricon.png</file>
|
||||||
<file>images/reset.png</file>
|
<file>images/splitbutton_horizontal.png</file>
|
||||||
<file>images/sidebaricon.png</file>
|
<file>images/statusbar.png</file>
|
||||||
<file>images/splitbutton_horizontal.png</file>
|
<file>images/undo.png</file>
|
||||||
<file>images/statusbar.png</file>
|
<file>images/unknownfile.png</file>
|
||||||
<file>images/undo.png</file>
|
<file>images/unlocked.png</file>
|
||||||
<file>images/unknownfile.png</file>
|
<file>images/extension.png</file>
|
||||||
<file>images/unlocked.png</file>
|
<file>images/darkclosebutton.png</file>
|
||||||
<file>images/extension.png</file>
|
</qresource>
|
||||||
<file>images/darkclosebutton.png</file>
|
</RCC>
|
||||||
</qresource>
|
|
||||||
</RCC>
|
|
||||||
|
@ -33,8 +33,8 @@
|
|||||||
namespace Core {
|
namespace Core {
|
||||||
namespace Constants {
|
namespace Constants {
|
||||||
|
|
||||||
#define GCS_VERSION_MAJOR 1
|
#define GCS_VERSION_MAJOR 0
|
||||||
#define GCS_VERSION_MINOR 3
|
#define GCS_VERSION_MINOR 0
|
||||||
#define GCS_VERSION_RELEASE 1
|
#define GCS_VERSION_RELEASE 1
|
||||||
|
|
||||||
#define STRINGIFY_INTERNAL(x) #x
|
#define STRINGIFY_INTERNAL(x) #x
|
||||||
@ -60,33 +60,27 @@ const char * const GCS_REVISION_STR = "";
|
|||||||
|
|
||||||
//modes
|
//modes
|
||||||
const char * const MODE_WELCOME = "Welcome";
|
const char * const MODE_WELCOME = "Welcome";
|
||||||
const char * const MODE_EDIT = "Edit";
|
|
||||||
const char * const MODE_OUTPUT = "Output";
|
|
||||||
const int P_MODE_WELCOME = 100;
|
const int P_MODE_WELCOME = 100;
|
||||||
const int P_MODE_EDIT = 90;
|
|
||||||
const int P_MODE_OUTPUT = 10;
|
|
||||||
|
|
||||||
//menubar
|
//menubar
|
||||||
const char * const MENU_BAR = "QtCreator.MenuBar";
|
const char * const MENU_BAR = "GCS.MenuBar";
|
||||||
|
|
||||||
//menus
|
//menus
|
||||||
const char * const M_FILE = "QtCreator.Menu.File";
|
const char * const M_FILE = "GCS.Menu.File";
|
||||||
const char * const M_FILE_OPEN = "QtCreator.Menu.File.Open";
|
const char * const M_FILE_OPEN = "GCS.Menu.File.Open";
|
||||||
const char * const M_FILE_NEW = "QtCreator.Menu.File.New";
|
const char * const M_FILE_NEW = "GCS.Menu.File.New";
|
||||||
const char * const M_FILE_RECENTFILES = "QtCreator.Menu.File.RecentFiles";
|
const char * const M_FILE_RECENTFILES = "GCS.Menu.File.RecentFiles";
|
||||||
const char * const M_EDIT = "QtCreator.Menu.Edit";
|
const char * const M_EDIT = "GCS.Menu.Edit";
|
||||||
const char * const M_EDIT_ADVANCED = "QtCreator.Menu.Edit.Advanced";
|
const char * const M_EDIT_ADVANCED = "GCS.Menu.Edit.Advanced";
|
||||||
const char * const M_TOOLS = "QtCreator.Menu.Tools";
|
const char * const M_TOOLS = "GCS.Menu.Tools";
|
||||||
const char * const M_WINDOW = "QtCreator.Menu.Window";
|
const char * const M_WINDOW = "GCS.Menu.Window";
|
||||||
const char * const M_WINDOW_PANES = "QtCreator.Menu.Window.Panes";
|
const char * const M_WINDOW_PANES = "GCS.Menu.Window.Panes";
|
||||||
const char * const M_HELP = "QtCreator.Menu.Help";
|
const char * const M_HELP = "GCS.Menu.Help";
|
||||||
|
|
||||||
//contexts
|
//contexts
|
||||||
const char * const C_GLOBAL = "Global Context";
|
const char * const C_GLOBAL = "Global Context";
|
||||||
const int C_GLOBAL_ID = 0;
|
const int C_GLOBAL_ID = 0;
|
||||||
const char * const C_WELCOME_MODE = "Core.WelcomeMode";
|
const char * const C_WELCOME_MODE = "Core.WelcomeMode";
|
||||||
const char * const C_EDIT_MODE = "Core.EditMode";
|
|
||||||
const char * const C_EDITORMANAGER = "Core.EditorManager";
|
|
||||||
const char * const C_NAVIGATION_PANE = "Core.NavigationPane";
|
const char * const C_NAVIGATION_PANE = "Core.NavigationPane";
|
||||||
const char * const C_PROBLEM_PANE = "Core.ProblemPane";
|
const char * const C_PROBLEM_PANE = "Core.ProblemPane";
|
||||||
|
|
||||||
@ -95,106 +89,102 @@ const char * const K_DEFAULT_TEXT_EDITOR = QT_TRANSLATE_NOOP("OpenWith::Editors"
|
|||||||
const char * const K_DEFAULT_BINARY_EDITOR = QT_TRANSLATE_NOOP("OpenWith::Editors", "Binary Editor");
|
const char * const K_DEFAULT_BINARY_EDITOR = QT_TRANSLATE_NOOP("OpenWith::Editors", "Binary Editor");
|
||||||
|
|
||||||
//actions
|
//actions
|
||||||
const char * const UNDO = "QtCreator.Undo";
|
const char * const UNDO = "GCS.Undo";
|
||||||
const char * const REDO = "QtCreator.Redo";
|
const char * const REDO = "GCS.Redo";
|
||||||
const char * const COPY = "QtCreator.Copy";
|
const char * const COPY = "GCS.Copy";
|
||||||
const char * const PASTE = "QtCreator.Paste";
|
const char * const PASTE = "GCS.Paste";
|
||||||
const char * const CUT = "QtCreator.Cut";
|
const char * const CUT = "GCS.Cut";
|
||||||
const char * const SELECTALL = "QtCreator.SelectAll";
|
const char * const SELECTALL = "GCS.SelectAll";
|
||||||
|
|
||||||
const char * const GOTO = "QtCreator.Goto";
|
const char * const NEW = "GCS.New";
|
||||||
|
const char * const OPEN = "GCS.Open";
|
||||||
|
const char * const OPEN_WITH = "GCS.OpenWith";
|
||||||
|
const char * const REVERTTOSAVED = "GCS.RevertToSaved";
|
||||||
|
const char * const SAVE = "GCS.Save";
|
||||||
|
const char * const SAVEAS = "GCS.SaveAs";
|
||||||
|
const char * const SAVEALL = "GCS.SaveAll";
|
||||||
|
const char * const EXIT = "GCS.Exit";
|
||||||
|
|
||||||
const char * const NEW = "QtCreator.New";
|
const char * const OPTIONS = "GCS.Options";
|
||||||
const char * const OPEN = "QtCreator.Open";
|
const char * const TOGGLE_SIDEBAR = "GCS.ToggleSidebar";
|
||||||
const char * const OPEN_WITH = "QtCreator.OpenWith";
|
const char * const TOGGLE_FULLSCREEN = "GCS.ToggleFullScreen";
|
||||||
const char * const REVERTTOSAVED = "QtCreator.RevertToSaved";
|
|
||||||
const char * const SAVE = "QtCreator.Save";
|
|
||||||
const char * const SAVEAS = "QtCreator.SaveAs";
|
|
||||||
const char * const SAVEALL = "QtCreator.SaveAll";
|
|
||||||
const char * const PRINT = "QtCreator.Print";
|
|
||||||
const char * const EXIT = "QtCreator.Exit";
|
|
||||||
|
|
||||||
const char * const OPTIONS = "QtCreator.Options";
|
const char * const MINIMIZE_WINDOW = "GCS.MinimizeWindow";
|
||||||
const char * const TOGGLE_SIDEBAR = "QtCreator.ToggleSidebar";
|
const char * const ZOOM_WINDOW = "GCS.ZoomWindow";
|
||||||
const char * const TOGGLE_FULLSCREEN = "QtCreator.ToggleFullScreen";
|
|
||||||
|
|
||||||
const char * const MINIMIZE_WINDOW = "QtCreator.MinimizeWindow";
|
const char * const SPLIT = "GCS.Split";
|
||||||
const char * const ZOOM_WINDOW = "QtCreator.ZoomWindow";
|
const char * const SPLIT_SIDE_BY_SIDE = "GCS.SplitSideBySide";
|
||||||
|
const char * const REMOVE_CURRENT_SPLIT = "GCS.RemoveCurrentSplit";
|
||||||
const char * const SPLIT = "QtCreator.Split";
|
const char * const REMOVE_ALL_SPLITS = "GCS.RemoveAllSplits";
|
||||||
const char * const SPLIT_SIDE_BY_SIDE = "QtCreator.SplitSideBySide";
|
const char * const GOTO_OTHER_SPLIT = "GCS.GotoOtherSplit";
|
||||||
const char * const REMOVE_CURRENT_SPLIT = "QtCreator.RemoveCurrentSplit";
|
const char * const SAVEASDEFAULT = "GCS.SaveAsDefaultLayout";
|
||||||
const char * const REMOVE_ALL_SPLITS = "QtCreator.RemoveAllSplits";
|
const char * const RESTOREDEFAULT = "GCS.RestoreDefaultLayout";
|
||||||
const char * const GOTO_OTHER_SPLIT = "QtCreator.GotoOtherSplit";
|
const char * const CLOSE = "GCS.Close";
|
||||||
const char * const SAVEASDEFAULT = "QtCreator.SaveAsDefaultLayout";
|
const char * const CLOSEALL = "GCS.CloseAll";
|
||||||
const char * const RESTOREDEFAULT = "QtCreator.RestoreDefaultLayout";
|
const char * const CLOSEOTHERS = "GCS.CloseOthers";
|
||||||
const char * const CLOSE = "QtCreator.Close";
|
const char * const GOTONEXT = "GCS.GotoNext";
|
||||||
const char * const CLOSEALL = "QtCreator.CloseAll";
|
const char * const GOTOPREV = "GCS.GotoPrevious";
|
||||||
const char * const CLOSEOTHERS = "QtCreator.CloseOthers";
|
const char * const GOTONEXTINHISTORY = "GCS.GotoNextInHistory";
|
||||||
const char * const GOTONEXT = "QtCreator.GotoNext";
|
const char * const GOTOPREVINHISTORY = "GCS.GotoPreviousInHistory";
|
||||||
const char * const GOTOPREV = "QtCreator.GotoPrevious";
|
const char * const GO_BACK = "GCS.GoBack";
|
||||||
const char * const GOTONEXTINHISTORY = "QtCreator.GotoNextInHistory";
|
const char * const GO_FORWARD = "GCS.GoForward";
|
||||||
const char * const GOTOPREVINHISTORY = "QtCreator.GotoPreviousInHistory";
|
const char * const GOTOPREVIOUSGROUP = "GCS.GotoPreviousTabGroup";
|
||||||
const char * const GO_BACK = "QtCreator.GoBack";
|
const char * const GOTONEXTGROUP = "GCS.GotoNextTabGroup";
|
||||||
const char * const GO_FORWARD = "QtCreator.GoForward";
|
const char * const WINDOWSLIST = "GCS.WindowsList";
|
||||||
const char * const GOTOPREVIOUSGROUP = "QtCreator.GotoPreviousTabGroup";
|
const char * const ABOUT_OPENPILOTGCS = "GCS.AboutOpenPilotGCS";
|
||||||
const char * const GOTONEXTGROUP = "QtCreator.GotoNextTabGroup";
|
const char * const ABOUT_PLUGINS = "GCS.AboutPlugins";
|
||||||
const char * const WINDOWSLIST = "QtCreator.WindowsList";
|
const char * const ABOUT_QT = "GCS.AboutQt";
|
||||||
const char * const ABOUT_QTCREATOR = "QtCreator.AboutQtCreator";
|
const char * const S_RETURNTOEDITOR = "GCS.ReturnToEditor";
|
||||||
const char * const ABOUT_PLUGINS = "QtCreator.AboutPlugins";
|
const char * const OPEN_IN_EXTERNAL_EDITOR = "GCS.OpenInExternalEditor";
|
||||||
const char * const ABOUT_QT = "QtCreator.AboutQt";
|
|
||||||
const char * const S_RETURNTOEDITOR = "QtCreator.ReturnToEditor";
|
|
||||||
const char * const OPEN_IN_EXTERNAL_EDITOR = "QtCreator.OpenInExternalEditor";
|
|
||||||
|
|
||||||
// default groups
|
// default groups
|
||||||
const char * const G_DEFAULT_ONE = "QtCreator.Group.Default.One";
|
const char * const G_DEFAULT_ONE = "GCS.Group.Default.One";
|
||||||
const char * const G_DEFAULT_TWO = "QtCreator.Group.Default.Two";
|
const char * const G_DEFAULT_TWO = "GCS.Group.Default.Two";
|
||||||
const char * const G_DEFAULT_THREE = "QtCreator.Group.Default.Three";
|
const char * const G_DEFAULT_THREE = "GCS.Group.Default.Three";
|
||||||
|
|
||||||
// main menu bar groups
|
// main menu bar groups
|
||||||
const char * const G_FILE = "QtCreator.Group.File";
|
const char * const G_FILE = "GCS.Group.File";
|
||||||
const char * const G_EDIT = "QtCreator.Group.Edit";
|
const char * const G_EDIT = "GCS.Group.Edit";
|
||||||
const char * const G_VIEW = "QtCreator.Group.View";
|
const char * const G_VIEW = "GCS.Group.View";
|
||||||
const char * const G_TOOLS = "QtCreator.Group.Tools";
|
const char * const G_TOOLS = "GCS.Group.Tools";
|
||||||
const char * const G_WINDOW = "QtCreator.Group.Window";
|
const char * const G_WINDOW = "GCS.Group.Window";
|
||||||
const char * const G_HELP = "QtCreator.Group.Help";
|
const char * const G_HELP = "GCS.Group.Help";
|
||||||
|
|
||||||
// file menu groups
|
// file menu groups
|
||||||
const char * const G_FILE_NEW = "QtCreator.Group.File.New";
|
const char * const G_FILE_NEW = "GCS.Group.File.New";
|
||||||
const char * const G_FILE_OPEN = "QtCreator.Group.File.Open";
|
const char * const G_FILE_OPEN = "GCS.Group.File.Open";
|
||||||
const char * const G_FILE_PROJECT = "QtCreator.Group.File.Project";
|
const char * const G_FILE_PROJECT = "GCS.Group.File.Project";
|
||||||
const char * const G_FILE_SAVE = "QtCreator.Group.File.Save";
|
const char * const G_FILE_SAVE = "GCS.Group.File.Save";
|
||||||
const char * const G_FILE_CLOSE = "QtCreator.Group.File.Close";
|
const char * const G_FILE_CLOSE = "GCS.Group.File.Close";
|
||||||
const char * const G_FILE_PRINT = "QtCreator.Group.File.Print";
|
const char * const G_FILE_OTHER = "GCS.Group.File.Other";
|
||||||
const char * const G_FILE_OTHER = "QtCreator.Group.File.Other";
|
|
||||||
|
|
||||||
// edit menu groups
|
// edit menu groups
|
||||||
const char * const G_EDIT_UNDOREDO = "QtCreator.Group.Edit.UndoRedo";
|
const char * const G_EDIT_UNDOREDO = "GCS.Group.Edit.UndoRedo";
|
||||||
const char * const G_EDIT_COPYPASTE = "QtCreator.Group.Edit.CopyPaste";
|
const char * const G_EDIT_COPYPASTE = "GCS.Group.Edit.CopyPaste";
|
||||||
const char * const G_EDIT_SELECTALL = "QtCreator.Group.Edit.SelectAll";
|
const char * const G_EDIT_SELECTALL = "GCS.Group.Edit.SelectAll";
|
||||||
const char * const G_EDIT_ADVANCED = "QtCreator.Group.Edit.Advanced";
|
const char * const G_EDIT_ADVANCED = "GCS.Group.Edit.Advanced";
|
||||||
|
|
||||||
const char * const G_EDIT_FIND = "QtCreator.Group.Edit.Find";
|
const char * const G_EDIT_FIND = "GCS.Group.Edit.Find";
|
||||||
const char * const G_EDIT_OTHER = "QtCreator.Group.Edit.Other";
|
const char * const G_EDIT_OTHER = "GCS.Group.Edit.Other";
|
||||||
|
|
||||||
// advanced edit menu groups
|
// advanced edit menu groups
|
||||||
|
|
||||||
const char * const G_EDIT_FORMAT = "QtCreator.Group.Edit.Format";
|
const char * const G_EDIT_FORMAT = "GCS.Group.Edit.Format";
|
||||||
const char * const G_EDIT_COLLAPSING = "QtCreator.Group.Edit.Collapsing";
|
const char * const G_EDIT_COLLAPSING = "GCS.Group.Edit.Collapsing";
|
||||||
const char * const G_EDIT_BLOCKS = "QtCreator.Group.Edit.Blocks";
|
const char * const G_EDIT_BLOCKS = "GCS.Group.Edit.Blocks";
|
||||||
const char * const G_EDIT_FONT = "QtCreator.Group.Edit.Font";
|
const char * const G_EDIT_FONT = "GCS.Group.Edit.Font";
|
||||||
const char * const G_EDIT_EDITOR = "QtCreator.Group.Edit.Editor";
|
const char * const G_EDIT_EDITOR = "GCS.Group.Edit.Editor";
|
||||||
|
|
||||||
// window menu groups
|
// window menu groups
|
||||||
const char * const G_WINDOW_SIZE = "QtCreator.Group.Window.Size";
|
const char * const G_WINDOW_SIZE = "GCS.Group.Window.Size";
|
||||||
const char * const G_WINDOW_PANES = "QtCreator.Group.Window.Panes";
|
const char * const G_WINDOW_PANES = "GCS.Group.Window.Panes";
|
||||||
const char * const G_WINDOW_SPLIT = "QtCreator.Group.Window.Split";
|
const char * const G_WINDOW_SPLIT = "GCS.Group.Window.Split";
|
||||||
const char * const G_WINDOW_NAVIGATE = "QtCreator.Group.Window.Navigate";
|
const char * const G_WINDOW_NAVIGATE = "GCS.Group.Window.Navigate";
|
||||||
const char * const G_WINDOW_OTHER = "QtCreator.Group.Window.Other";
|
const char * const G_WINDOW_OTHER = "GCS.Group.Window.Other";
|
||||||
|
|
||||||
// help groups (global)
|
// help groups (global)
|
||||||
const char * const G_HELP_HELP = "QtCreator.Group.Help.Help";
|
const char * const G_HELP_HELP = "GCS.Group.Help.Help";
|
||||||
const char * const G_HELP_ABOUT = "QtCreator.Group.Help.About";
|
const char * const G_HELP_ABOUT = "GCS.Group.Help.About";
|
||||||
|
|
||||||
const char * const ICON_MINUS = ":/core/images/minus.png";
|
const char * const ICON_MINUS = ":/core/images/minus.png";
|
||||||
const char * const ICON_PLUS = ":/core/images/plus.png";
|
const char * const ICON_PLUS = ":/core/images/plus.png";
|
||||||
@ -219,8 +209,8 @@ const char * const ICON_MAGNIFIER = ":/core/images/magnifier.png";
|
|||||||
const char * const ICON_TOGGLE_SIDEBAR = ":/core/images/sidebaricon.png";
|
const char * const ICON_TOGGLE_SIDEBAR = ":/core/images/sidebaricon.png";
|
||||||
|
|
||||||
// wizard kind
|
// wizard kind
|
||||||
const char * const WIZARD_TYPE_FILE = "QtCreator::WizardType::File";
|
const char * const WIZARD_TYPE_FILE = "GCS::WizardType::File";
|
||||||
const char * const WIZARD_TYPE_CLASS = "QtCreator::WizardType::Class";
|
const char * const WIZARD_TYPE_CLASS = "GCS::WizardType::Class";
|
||||||
|
|
||||||
} // namespace Constants
|
} // namespace Constants
|
||||||
} // namespace Core
|
} // namespace Core
|
||||||
|
@ -85,11 +85,6 @@ ActionManager *CoreImpl::actionManager() const
|
|||||||
return m_mainwindow->actionManager();
|
return m_mainwindow->actionManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
FileManager *CoreImpl::fileManager() const
|
|
||||||
{
|
|
||||||
return m_mainwindow->fileManager();
|
|
||||||
}
|
|
||||||
|
|
||||||
UniqueIDManager *CoreImpl::uniqueIDManager() const
|
UniqueIDManager *CoreImpl::uniqueIDManager() const
|
||||||
{
|
{
|
||||||
return m_mainwindow->uniqueIDManager();
|
return m_mainwindow->uniqueIDManager();
|
||||||
@ -100,31 +95,11 @@ MessageManager *CoreImpl::messageManager() const
|
|||||||
return m_mainwindow->messageManager();
|
return m_mainwindow->messageManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
EditorManager *CoreImpl::editorManager() const
|
|
||||||
{
|
|
||||||
return m_mainwindow->editorManager();
|
|
||||||
}
|
|
||||||
|
|
||||||
ProgressManager *CoreImpl::progressManager() const
|
|
||||||
{
|
|
||||||
return m_mainwindow->progressManager();
|
|
||||||
}
|
|
||||||
|
|
||||||
ScriptManager *CoreImpl::scriptManager() const
|
|
||||||
{
|
|
||||||
return m_mainwindow->scriptManager();
|
|
||||||
}
|
|
||||||
|
|
||||||
VariableManager *CoreImpl::variableManager() const
|
VariableManager *CoreImpl::variableManager() const
|
||||||
{
|
{
|
||||||
return m_mainwindow->variableManager();
|
return m_mainwindow->variableManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
VCSManager *CoreImpl::vcsManager() const
|
|
||||||
{
|
|
||||||
return m_mainwindow->vcsManager();
|
|
||||||
}
|
|
||||||
|
|
||||||
ModeManager *CoreImpl::modeManager() const
|
ModeManager *CoreImpl::modeManager() const
|
||||||
{
|
{
|
||||||
return m_mainwindow->modeManager();
|
return m_mainwindow->modeManager();
|
||||||
|
@ -57,14 +57,9 @@ public:
|
|||||||
QWidget *parent = 0);
|
QWidget *parent = 0);
|
||||||
|
|
||||||
ActionManager *actionManager() const;
|
ActionManager *actionManager() const;
|
||||||
FileManager *fileManager() const ;
|
|
||||||
UniqueIDManager *uniqueIDManager() const;
|
UniqueIDManager *uniqueIDManager() const;
|
||||||
MessageManager *messageManager() const;
|
MessageManager *messageManager() const;
|
||||||
EditorManager *editorManager() const;
|
|
||||||
ProgressManager *progressManager() const;
|
|
||||||
ScriptManager *scriptManager() const;
|
|
||||||
VariableManager *variableManager() const;
|
VariableManager *variableManager() const;
|
||||||
VCSManager *vcsManager() const;
|
|
||||||
ModeManager *modeManager() const;
|
ModeManager *modeManager() const;
|
||||||
MimeDatabase *mimeDatabase() const;
|
MimeDatabase *mimeDatabase() const;
|
||||||
|
|
||||||
|
@ -28,11 +28,8 @@
|
|||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#include "coreplugin.h"
|
#include "coreplugin.h"
|
||||||
#include "editmode.h"
|
|
||||||
#include "editormanager.h"
|
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "modemanager.h"
|
#include "modemanager.h"
|
||||||
#include "fileiconprovider.h"
|
|
||||||
|
|
||||||
#include <extensionsystem/pluginmanager.h>
|
#include <extensionsystem/pluginmanager.h>
|
||||||
|
|
||||||
@ -41,19 +38,12 @@
|
|||||||
using namespace Core::Internal;
|
using namespace Core::Internal;
|
||||||
|
|
||||||
CorePlugin::CorePlugin() :
|
CorePlugin::CorePlugin() :
|
||||||
m_mainWindow(new MainWindow), m_editMode(0)
|
m_mainWindow(new MainWindow)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
CorePlugin::~CorePlugin()
|
CorePlugin::~CorePlugin()
|
||||||
{
|
{
|
||||||
if (m_editMode) {
|
|
||||||
removeObject(m_editMode);
|
|
||||||
delete m_editMode;
|
|
||||||
}
|
|
||||||
|
|
||||||
// delete FileIconProvider singleton
|
|
||||||
delete FileIconProvider::instance();
|
|
||||||
|
|
||||||
delete m_mainWindow;
|
delete m_mainWindow;
|
||||||
}
|
}
|
||||||
@ -62,11 +52,7 @@ bool CorePlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
|||||||
{
|
{
|
||||||
Q_UNUSED(arguments)
|
Q_UNUSED(arguments)
|
||||||
const bool success = m_mainWindow->init(errorMessage);
|
const bool success = m_mainWindow->init(errorMessage);
|
||||||
if (success) {
|
|
||||||
EditorManager *editorManager = m_mainWindow->editorManager();
|
|
||||||
m_editMode = new EditMode(editorManager);
|
|
||||||
addObject(m_editMode);
|
|
||||||
}
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,7 +55,6 @@ public slots:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
MainWindow *m_mainWindow;
|
MainWindow *m_mainWindow;
|
||||||
EditMode *m_editMode;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
@ -11,35 +11,19 @@ include(../../libs/utils/utils.pri)
|
|||||||
include(../../shared/scriptwrapper/scriptwrapper.pri)
|
include(../../shared/scriptwrapper/scriptwrapper.pri)
|
||||||
include(coreplugin_dependencies.pri)
|
include(coreplugin_dependencies.pri)
|
||||||
INCLUDEPATH += dialogs \
|
INCLUDEPATH += dialogs \
|
||||||
actionmanager \
|
actionmanager
|
||||||
editormanager \
|
|
||||||
progressmanager \
|
|
||||||
scriptmanager
|
|
||||||
DEPENDPATH += dialogs \
|
DEPENDPATH += dialogs \
|
||||||
actionmanager \
|
actionmanager
|
||||||
editormanager \
|
|
||||||
scriptmanager
|
|
||||||
SOURCES += mainwindow.cpp \
|
SOURCES += mainwindow.cpp \
|
||||||
editmode.cpp \
|
|
||||||
tabpositionindicator.cpp \
|
tabpositionindicator.cpp \
|
||||||
fancyactionbar.cpp \
|
fancyactionbar.cpp \
|
||||||
fancytabwidget.cpp \
|
fancytabwidget.cpp \
|
||||||
flowlayout.cpp \
|
|
||||||
generalsettings.cpp \
|
generalsettings.cpp \
|
||||||
filemanager.cpp \
|
|
||||||
uniqueidmanager.cpp \
|
uniqueidmanager.cpp \
|
||||||
messagemanager.cpp \
|
messagemanager.cpp \
|
||||||
messageoutputwindow.cpp \
|
messageoutputwindow.cpp \
|
||||||
outputpane.cpp \
|
|
||||||
vcsmanager.cpp \
|
|
||||||
viewmanager.cpp \
|
viewmanager.cpp \
|
||||||
versiondialog.cpp \
|
versiondialog.cpp \
|
||||||
editormanager/editormanager.cpp \
|
|
||||||
editormanager/editorview.cpp \
|
|
||||||
editormanager/openeditorsmodel.cpp \
|
|
||||||
editormanager/openeditorsview.cpp \
|
|
||||||
editormanager/openeditorswindow.cpp \
|
|
||||||
editormanager/iexternaleditor.cpp \
|
|
||||||
actionmanager/actionmanager.cpp \
|
actionmanager/actionmanager.cpp \
|
||||||
actionmanager/command.cpp \
|
actionmanager/command.cpp \
|
||||||
actionmanager/actioncontainer.cpp \
|
actionmanager/actioncontainer.cpp \
|
||||||
@ -49,12 +33,6 @@ SOURCES += mainwindow.cpp \
|
|||||||
dialogs/settingsdialog.cpp \
|
dialogs/settingsdialog.cpp \
|
||||||
dialogs/shortcutsettings.cpp \
|
dialogs/shortcutsettings.cpp \
|
||||||
dialogs/openwithdialog.cpp \
|
dialogs/openwithdialog.cpp \
|
||||||
progressmanager/progressmanager.cpp \
|
|
||||||
progressmanager/progressview.cpp \
|
|
||||||
progressmanager/progresspie.cpp \
|
|
||||||
progressmanager/futureprogress.cpp \
|
|
||||||
scriptmanager/scriptmanager.cpp \
|
|
||||||
scriptmanager/qworkbench_wrapper.cpp \
|
|
||||||
basemode.cpp \
|
basemode.cpp \
|
||||||
baseview.cpp \
|
baseview.cpp \
|
||||||
coreplugin.cpp \
|
coreplugin.cpp \
|
||||||
@ -63,44 +41,26 @@ SOURCES += mainwindow.cpp \
|
|||||||
coreimpl.cpp \
|
coreimpl.cpp \
|
||||||
basefilewizard.cpp \
|
basefilewizard.cpp \
|
||||||
plugindialog.cpp \
|
plugindialog.cpp \
|
||||||
inavigationwidgetfactory.cpp \
|
|
||||||
navigationwidget.cpp \
|
|
||||||
manhattanstyle.cpp \
|
manhattanstyle.cpp \
|
||||||
minisplitter.cpp \
|
minisplitter.cpp \
|
||||||
styleanimator.cpp \
|
styleanimator.cpp \
|
||||||
findplaceholder.cpp \
|
|
||||||
rightpane.cpp \
|
rightpane.cpp \
|
||||||
sidebar.cpp \
|
sidebar.cpp \
|
||||||
fileiconprovider.cpp \
|
|
||||||
mimedatabase.cpp \
|
mimedatabase.cpp \
|
||||||
icore.cpp \
|
icore.cpp \
|
||||||
editormanager/ieditor.cpp \
|
|
||||||
dialogs/ioptionspage.cpp \
|
dialogs/ioptionspage.cpp \
|
||||||
dialogs/iwizard.cpp \
|
dialogs/iwizard.cpp \
|
||||||
settingsdatabase.cpp \
|
settingsdatabase.cpp \
|
||||||
eventfilteringmainwindow.cpp
|
eventfilteringmainwindow.cpp
|
||||||
HEADERS += mainwindow.h \
|
HEADERS += mainwindow.h \
|
||||||
editmode.h \
|
|
||||||
tabpositionindicator.h \
|
tabpositionindicator.h \
|
||||||
fancyactionbar.h \
|
fancyactionbar.h \
|
||||||
fancytabwidget.h \
|
fancytabwidget.h \
|
||||||
flowlayout.h \
|
|
||||||
generalsettings.h \
|
generalsettings.h \
|
||||||
filemanager.h \
|
|
||||||
uniqueidmanager.h \
|
uniqueidmanager.h \
|
||||||
messagemanager.h \
|
messagemanager.h \
|
||||||
messageoutputwindow.h \
|
messageoutputwindow.h \
|
||||||
outputpane.h \
|
|
||||||
vcsmanager.h \
|
|
||||||
viewmanager.h \
|
viewmanager.h \
|
||||||
editormanager/editormanager.h \
|
|
||||||
editormanager/editorview.h \
|
|
||||||
editormanager/openeditorsmodel.h \
|
|
||||||
editormanager/openeditorsview.h \
|
|
||||||
editormanager/openeditorswindow.h \
|
|
||||||
editormanager/ieditor.h \
|
|
||||||
editormanager/iexternaleditor.h \
|
|
||||||
editormanager/ieditorfactory.h \
|
|
||||||
actionmanager/actioncontainer.h \
|
actionmanager/actioncontainer.h \
|
||||||
actionmanager/actionmanager.h \
|
actionmanager/actionmanager.h \
|
||||||
actionmanager/command.h \
|
actionmanager/command.h \
|
||||||
@ -115,11 +75,6 @@ HEADERS += mainwindow.h \
|
|||||||
dialogs/openwithdialog.h \
|
dialogs/openwithdialog.h \
|
||||||
dialogs/iwizard.h \
|
dialogs/iwizard.h \
|
||||||
dialogs/ioptionspage.h \
|
dialogs/ioptionspage.h \
|
||||||
progressmanager/progressmanager_p.h \
|
|
||||||
progressmanager/progressview.h \
|
|
||||||
progressmanager/progresspie.h \
|
|
||||||
progressmanager/futureprogress.h \
|
|
||||||
progressmanager/progressmanager.h \
|
|
||||||
icontext.h \
|
icontext.h \
|
||||||
icore.h \
|
icore.h \
|
||||||
ifile.h \
|
ifile.h \
|
||||||
@ -132,10 +87,6 @@ HEADERS += mainwindow.h \
|
|||||||
ifilewizardextension.h \
|
ifilewizardextension.h \
|
||||||
icorelistener.h \
|
icorelistener.h \
|
||||||
versiondialog.h \
|
versiondialog.h \
|
||||||
scriptmanager/metatypedeclarations.h \
|
|
||||||
scriptmanager/qworkbench_wrapper.h \
|
|
||||||
scriptmanager/scriptmanager.h \
|
|
||||||
scriptmanager/scriptmanager_p.h \
|
|
||||||
core_global.h \
|
core_global.h \
|
||||||
basemode.h \
|
basemode.h \
|
||||||
baseview.h \
|
baseview.h \
|
||||||
@ -145,15 +96,11 @@ HEADERS += mainwindow.h \
|
|||||||
coreimpl.h \
|
coreimpl.h \
|
||||||
basefilewizard.h \
|
basefilewizard.h \
|
||||||
plugindialog.h \
|
plugindialog.h \
|
||||||
inavigationwidgetfactory.h \
|
|
||||||
navigationwidget.h \
|
|
||||||
manhattanstyle.h \
|
manhattanstyle.h \
|
||||||
minisplitter.h \
|
minisplitter.h \
|
||||||
styleanimator.h \
|
styleanimator.h \
|
||||||
findplaceholder.h \
|
|
||||||
rightpane.h \
|
rightpane.h \
|
||||||
sidebar.h \
|
sidebar.h \
|
||||||
fileiconprovider.h \
|
|
||||||
mimedatabase.h \
|
mimedatabase.h \
|
||||||
settingsdatabase.h \
|
settingsdatabase.h \
|
||||||
eventfilteringmainwindow.h
|
eventfilteringmainwindow.h
|
||||||
@ -162,7 +109,6 @@ FORMS += dialogs/newdialog.ui \
|
|||||||
dialogs/shortcutsettings.ui \
|
dialogs/shortcutsettings.ui \
|
||||||
dialogs/saveitemsdialog.ui \
|
dialogs/saveitemsdialog.ui \
|
||||||
dialogs/openwithdialog.ui \
|
dialogs/openwithdialog.ui \
|
||||||
editormanager/openeditorsview.ui \
|
|
||||||
generalsettings.ui
|
generalsettings.ui
|
||||||
RESOURCES += core.qrc \
|
RESOURCES += core.qrc \
|
||||||
fancyactionbar.qrc
|
fancyactionbar.qrc
|
||||||
|
@ -29,7 +29,6 @@
|
|||||||
|
|
||||||
#include "saveitemsdialog.h"
|
#include "saveitemsdialog.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "vcsmanager.h"
|
|
||||||
|
|
||||||
#include <coreplugin/ifile.h>
|
#include <coreplugin/ifile.h>
|
||||||
|
|
||||||
|
@ -42,7 +42,6 @@ QT_END_NAMESPACE
|
|||||||
namespace Core {
|
namespace Core {
|
||||||
|
|
||||||
class IFile;
|
class IFile;
|
||||||
class EditorManager;
|
|
||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
|
@ -34,7 +34,6 @@
|
|||||||
#include "command_p.h"
|
#include "command_p.h"
|
||||||
#include "commandsfile.h"
|
#include "commandsfile.h"
|
||||||
#include "coreconstants.h"
|
#include "coreconstants.h"
|
||||||
#include "filemanager.h"
|
|
||||||
#include "icore.h"
|
#include "icore.h"
|
||||||
#include "uniqueidmanager.h"
|
#include "uniqueidmanager.h"
|
||||||
#include <utils/treewidgetcolumnstretcher.h>
|
#include <utils/treewidgetcolumnstretcher.h>
|
||||||
@ -267,6 +266,7 @@ void ShortcutSettings::defaultAction()
|
|||||||
|
|
||||||
void ShortcutSettings::exportAction()
|
void ShortcutSettings::exportAction()
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
QString fileName = ICore::instance()->fileManager()->getSaveFileNameWithExtension(
|
QString fileName = ICore::instance()->fileManager()->getSaveFileNameWithExtension(
|
||||||
tr("Export Keyboard Mapping Scheme"),
|
tr("Export Keyboard Mapping Scheme"),
|
||||||
ICore::instance()->resourcePath() + "/schemes/",
|
ICore::instance()->resourcePath() + "/schemes/",
|
||||||
@ -276,6 +276,7 @@ void ShortcutSettings::exportAction()
|
|||||||
CommandsFile cf(fileName);
|
CommandsFile cf(fileName);
|
||||||
cf.exportCommands(m_scitems);
|
cf.exportCommands(m_scitems);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShortcutSettings::initialize()
|
void ShortcutSettings::initialize()
|
||||||
|
@ -1,10 +1,5 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/fancyactionbar" >
|
<qresource prefix="/fancyactionbar">
|
||||||
<file>images/fancytoolbutton.svg</file>
|
<file>images/fancytoolbutton.svg</file>
|
||||||
<file>images/mode_Debug.png</file>
|
|
||||||
<file>images/mode_Edit.png</file>
|
|
||||||
<file>images/mode_Output.png</file>
|
|
||||||
<file>images/mode_Project.png</file>
|
|
||||||
<file>images/mode_Reference.png</file>
|
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
@ -32,7 +32,6 @@
|
|||||||
#include <utils/stylehelper.h>
|
#include <utils/stylehelper.h>
|
||||||
#include <utils/qtcolorbutton.h>
|
#include <utils/qtcolorbutton.h>
|
||||||
#include <utils/consoleprocess.h>
|
#include <utils/consoleprocess.h>
|
||||||
#include <coreplugin/editormanager/editormanager.h>
|
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
#include <QtGui/QMessageBox>
|
#include <QtGui/QMessageBox>
|
||||||
|
|
||||||
@ -73,8 +72,6 @@ QWidget *GeneralSettings::createPage(QWidget *parent)
|
|||||||
m_page->setupUi(w);
|
m_page->setupUi(w);
|
||||||
|
|
||||||
m_page->colorButton->setColor(StyleHelper::baseColor());
|
m_page->colorButton->setColor(StyleHelper::baseColor());
|
||||||
m_page->externalEditorEdit->setText(EditorManager::instance()->externalEditor());
|
|
||||||
m_page->reloadBehavior->setCurrentIndex(EditorManager::instance()->reloadBehavior());
|
|
||||||
#ifdef Q_OS_UNIX
|
#ifdef Q_OS_UNIX
|
||||||
m_page->terminalEdit->setText(ConsoleProcess::terminalEmulator(Core::ICore::instance()->settings()));
|
m_page->terminalEdit->setText(ConsoleProcess::terminalEmulator(Core::ICore::instance()->settings()));
|
||||||
#else
|
#else
|
||||||
@ -101,8 +98,6 @@ void GeneralSettings::apply()
|
|||||||
{
|
{
|
||||||
// Apply the new base color if accepted
|
// Apply the new base color if accepted
|
||||||
StyleHelper::setBaseColor(m_page->colorButton->color());
|
StyleHelper::setBaseColor(m_page->colorButton->color());
|
||||||
EditorManager::instance()->setExternalEditor(m_page->externalEditorEdit->text());
|
|
||||||
EditorManager::instance()->setReloadBehavior(IFile::ReloadBehavior(m_page->reloadBehavior->currentIndex()));
|
|
||||||
#ifdef Q_OS_UNIX
|
#ifdef Q_OS_UNIX
|
||||||
ConsoleProcess::setTerminalEmulator(Core::ICore::instance()->settings(),
|
ConsoleProcess::setTerminalEmulator(Core::ICore::instance()->settings(),
|
||||||
m_page->terminalEdit->text());
|
m_page->terminalEdit->text());
|
||||||
@ -121,7 +116,6 @@ void GeneralSettings::resetInterfaceColor()
|
|||||||
|
|
||||||
void GeneralSettings::resetExternalEditor()
|
void GeneralSettings::resetExternalEditor()
|
||||||
{
|
{
|
||||||
m_page->externalEditorEdit->setText(EditorManager::instance()->defaultExternalEditor());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Q_OS_UNIX
|
#ifdef Q_OS_UNIX
|
||||||
@ -139,6 +133,7 @@ void GeneralSettings::showHelpForExternalEditor()
|
|||||||
m_dialog->activateWindow();
|
m_dialog->activateWindow();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
QMessageBox *mb = new QMessageBox(QMessageBox::Information,
|
QMessageBox *mb = new QMessageBox(QMessageBox::Information,
|
||||||
tr("Variables"),
|
tr("Variables"),
|
||||||
EditorManager::instance()->externalEditorHelpText(),
|
EditorManager::instance()->externalEditorHelpText(),
|
||||||
@ -147,4 +142,5 @@ void GeneralSettings::showHelpForExternalEditor()
|
|||||||
mb->setWindowModality(Qt::NonModal);
|
mb->setWindowModality(Qt::NonModal);
|
||||||
m_dialog = mb;
|
m_dialog = mb;
|
||||||
mb->show();
|
mb->show();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -137,18 +137,7 @@
|
|||||||
active document.
|
active document.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
|
||||||
\fn ProgressManager *ICore::progressManager() const
|
|
||||||
\brief Returns the application's progress manager.
|
|
||||||
|
|
||||||
Use the progress manager to register a concurrent task to
|
|
||||||
show a progress bar the way Qt Creator does it.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\fn ScriptManager *ICore::scriptManager() const
|
|
||||||
\internal
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn VariableManager *ICore::variableManager() const
|
\fn VariableManager *ICore::variableManager() const
|
||||||
@ -159,17 +148,6 @@
|
|||||||
can be resolved/expanded from anywhere in the application.
|
can be resolved/expanded from anywhere in the application.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
|
||||||
\fn VCSManager *ICore::vcsManager() const
|
|
||||||
\brief Returns the application's vcs manager.
|
|
||||||
|
|
||||||
The vcs manager can be used to e.g. retrieve information about
|
|
||||||
the version control system used for a directory on hard disk.
|
|
||||||
The actual functionality for a specific version control system
|
|
||||||
must be implemented in a IVersionControl object and registered in
|
|
||||||
the plugin manager's object pool.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn ModeManager *ICore::modeManager() const
|
\fn ModeManager *ICore::modeManager() const
|
||||||
\brief Returns the application's mode manager.
|
\brief Returns the application's mode manager.
|
||||||
|
@ -43,19 +43,14 @@ QT_END_NAMESPACE
|
|||||||
namespace Core {
|
namespace Core {
|
||||||
|
|
||||||
class ActionManager;
|
class ActionManager;
|
||||||
class EditorManager;
|
|
||||||
class FileManager;
|
|
||||||
class IContext;
|
class IContext;
|
||||||
class IWizard;
|
class IWizard;
|
||||||
class MessageManager;
|
class MessageManager;
|
||||||
class MimeDatabase;
|
class MimeDatabase;
|
||||||
class ModeManager;
|
class ModeManager;
|
||||||
class ProgressManager;
|
|
||||||
class ScriptManager;
|
|
||||||
class SettingsDatabase;
|
class SettingsDatabase;
|
||||||
class UniqueIDManager;
|
class UniqueIDManager;
|
||||||
class VariableManager;
|
class VariableManager;
|
||||||
class VCSManager;
|
|
||||||
|
|
||||||
class CORE_EXPORT ICore : public QObject
|
class CORE_EXPORT ICore : public QObject
|
||||||
{
|
{
|
||||||
@ -82,14 +77,9 @@ public:
|
|||||||
QWidget *parent = 0) = 0;
|
QWidget *parent = 0) = 0;
|
||||||
|
|
||||||
virtual ActionManager *actionManager() const = 0;
|
virtual ActionManager *actionManager() const = 0;
|
||||||
virtual FileManager *fileManager() const = 0;
|
|
||||||
virtual UniqueIDManager *uniqueIDManager() const = 0;
|
virtual UniqueIDManager *uniqueIDManager() const = 0;
|
||||||
virtual MessageManager *messageManager() const = 0;
|
virtual MessageManager *messageManager() const = 0;
|
||||||
virtual EditorManager *editorManager() const = 0;
|
|
||||||
virtual ProgressManager *progressManager() const = 0;
|
|
||||||
virtual ScriptManager *scriptManager() const = 0;
|
|
||||||
virtual VariableManager *variableManager() const = 0;
|
virtual VariableManager *variableManager() const = 0;
|
||||||
virtual VCSManager *vcsManager() const = 0;
|
|
||||||
virtual ModeManager *modeManager() const = 0;
|
virtual ModeManager *modeManager() const = 0;
|
||||||
virtual MimeDatabase *mimeDatabase() const = 0;
|
virtual MimeDatabase *mimeDatabase() const = 0;
|
||||||
|
|
||||||
|
@ -33,7 +33,6 @@
|
|||||||
#include "basemode.h"
|
#include "basemode.h"
|
||||||
#include "coreimpl.h"
|
#include "coreimpl.h"
|
||||||
#include "coreconstants.h"
|
#include "coreconstants.h"
|
||||||
#include "editormanager.h"
|
|
||||||
#include "fancytabwidget.h"
|
#include "fancytabwidget.h"
|
||||||
#include "filemanager.h"
|
#include "filemanager.h"
|
||||||
#include "generalsettings.h"
|
#include "generalsettings.h"
|
||||||
@ -44,12 +43,8 @@
|
|||||||
#include "newdialog.h"
|
#include "newdialog.h"
|
||||||
#include "outputpane.h"
|
#include "outputpane.h"
|
||||||
#include "plugindialog.h"
|
#include "plugindialog.h"
|
||||||
#include "progressmanager_p.h"
|
|
||||||
#include "progressview.h"
|
|
||||||
#include "shortcutsettings.h"
|
#include "shortcutsettings.h"
|
||||||
#include "vcsmanager.h"
|
|
||||||
|
|
||||||
#include "scriptmanager_p.h"
|
|
||||||
#include "settingsdialog.h"
|
#include "settingsdialog.h"
|
||||||
#include "variablemanager.h"
|
#include "variablemanager.h"
|
||||||
#include "versiondialog.h"
|
#include "versiondialog.h"
|
||||||
@ -57,14 +52,12 @@
|
|||||||
#include "uniqueidmanager.h"
|
#include "uniqueidmanager.h"
|
||||||
#include "manhattanstyle.h"
|
#include "manhattanstyle.h"
|
||||||
#include "dialogs/iwizard.h"
|
#include "dialogs/iwizard.h"
|
||||||
#include "navigationwidget.h"
|
|
||||||
#include "rightpane.h"
|
#include "rightpane.h"
|
||||||
#include "editormanager/ieditorfactory.h"
|
|
||||||
#include "baseview.h"
|
#include "baseview.h"
|
||||||
#include "basefilewizard.h"
|
#include "basefilewizard.h"
|
||||||
#include "ioutputpane.h"
|
#include "ioutputpane.h"
|
||||||
|
#include "icorelistener.h"
|
||||||
|
|
||||||
#include <coreplugin/findplaceholder.h>
|
|
||||||
#include <coreplugin/settingsdatabase.h>
|
#include <coreplugin/settingsdatabase.h>
|
||||||
#include <utils/pathchooser.h>
|
#include <utils/pathchooser.h>
|
||||||
#include <utils/stylehelper.h>
|
#include <utils/stylehelper.h>
|
||||||
@ -115,22 +108,16 @@ MainWindow::MainWindow() :
|
|||||||
m_globalContext(QList<int>() << Constants::C_GLOBAL_ID),
|
m_globalContext(QList<int>() << Constants::C_GLOBAL_ID),
|
||||||
m_additionalContexts(m_globalContext),
|
m_additionalContexts(m_globalContext),
|
||||||
m_settings(new QSettings(QSettings::IniFormat, QSettings::UserScope,
|
m_settings(new QSettings(QSettings::IniFormat, QSettings::UserScope,
|
||||||
QLatin1String("Nokia"), QLatin1String("QtCreator"), this)),
|
QLatin1String("OpenPilot"), QLatin1String("OpenPilotGCS"), this)),
|
||||||
m_settingsDatabase(new SettingsDatabase(QFileInfo(m_settings->fileName()).path(),
|
m_settingsDatabase(new SettingsDatabase(QFileInfo(m_settings->fileName()).path(),
|
||||||
QLatin1String("QtCreator"),
|
QLatin1String("OpenPilotGCS"),
|
||||||
this)),
|
this)),
|
||||||
m_printer(0),
|
m_printer(0),
|
||||||
m_actionManager(new ActionManagerPrivate(this)),
|
m_actionManager(new ActionManagerPrivate(this)),
|
||||||
m_editorManager(0),
|
|
||||||
m_fileManager(new FileManager(this)),
|
|
||||||
m_progressManager(new ProgressManagerPrivate()),
|
|
||||||
m_scriptManager(new ScriptManagerPrivate(this)),
|
|
||||||
m_variableManager(new VariableManager(this)),
|
m_variableManager(new VariableManager(this)),
|
||||||
m_vcsManager(new VCSManager),
|
|
||||||
m_viewManager(0),
|
m_viewManager(0),
|
||||||
m_modeManager(0),
|
m_modeManager(0),
|
||||||
m_mimeDatabase(new MimeDatabase),
|
m_mimeDatabase(new MimeDatabase),
|
||||||
m_navigationWidget(0),
|
|
||||||
m_rightPaneWidget(0),
|
m_rightPaneWidget(0),
|
||||||
m_versionDialog(0),
|
m_versionDialog(0),
|
||||||
m_activeContext(0),
|
m_activeContext(0),
|
||||||
@ -144,16 +131,12 @@ MainWindow::MainWindow() :
|
|||||||
m_saveAllAction(0),
|
m_saveAllAction(0),
|
||||||
m_exitAction(0),
|
m_exitAction(0),
|
||||||
m_optionsAction(0),
|
m_optionsAction(0),
|
||||||
m_toggleSideBarAction(0),
|
|
||||||
m_toggleFullScreenAction(0),
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_WS_MAC
|
||||||
m_minimizeAction(0),
|
m_minimizeAction(0),
|
||||||
m_zoomAction(0),
|
m_zoomAction(0),
|
||||||
#endif
|
#endif
|
||||||
m_toggleSideBarButton(new QToolButton)
|
m_toggleFullScreenAction(0)
|
||||||
{
|
{
|
||||||
OutputPaneManager::create();
|
|
||||||
|
|
||||||
setWindowTitle(tr("OpenPilot GCS"));
|
setWindowTitle(tr("OpenPilot GCS"));
|
||||||
#ifndef Q_WS_MAC
|
#ifndef Q_WS_MAC
|
||||||
qApp->setWindowIcon(QIcon(":/core/images/openpilot_logo_128.png"));
|
qApp->setWindowIcon(QIcon(":/core/images/openpilot_logo_128.png"));
|
||||||
@ -184,22 +167,17 @@ MainWindow::MainWindow() :
|
|||||||
registerDefaultContainers();
|
registerDefaultContainers();
|
||||||
registerDefaultActions();
|
registerDefaultActions();
|
||||||
|
|
||||||
m_navigationWidget = new NavigationWidget(m_toggleSideBarAction);
|
|
||||||
m_rightPaneWidget = new RightPaneWidget();
|
m_rightPaneWidget = new RightPaneWidget();
|
||||||
|
|
||||||
m_modeStack = new FancyTabWidget(this);
|
m_modeStack = new FancyTabWidget(this);
|
||||||
m_modeManager = new ModeManager(this, m_modeStack);
|
m_modeManager = new ModeManager(this, m_modeStack);
|
||||||
m_modeManager->addWidget(m_progressManager->progressView());
|
//m_modeManager->addWidget(m_progressManager->progressView());
|
||||||
m_viewManager = new ViewManager(this);
|
m_viewManager = new ViewManager(this);
|
||||||
m_messageManager = new MessageManager;
|
m_messageManager = new MessageManager;
|
||||||
m_editorManager = new EditorManager(m_coreImpl, this);
|
|
||||||
m_editorManager->hide();
|
|
||||||
setCentralWidget(m_modeStack);
|
setCentralWidget(m_modeStack);
|
||||||
|
|
||||||
connect(QApplication::instance(), SIGNAL(focusChanged(QWidget*,QWidget*)),
|
connect(QApplication::instance(), SIGNAL(focusChanged(QWidget*,QWidget*)),
|
||||||
this, SLOT(updateFocusWidget(QWidget*,QWidget*)));
|
this, SLOT(updateFocusWidget(QWidget*,QWidget*)));
|
||||||
// Add a small Toolbutton for toggling the navigation widget
|
|
||||||
statusBar()->insertPermanentWidget(0, m_toggleSideBarButton);
|
|
||||||
|
|
||||||
// setUnifiedTitleAndToolBarOnMac(true);
|
// setUnifiedTitleAndToolBarOnMac(true);
|
||||||
#ifdef Q_OS_UNIX
|
#ifdef Q_OS_UNIX
|
||||||
@ -210,24 +188,6 @@ MainWindow::MainWindow() :
|
|||||||
setAcceptDrops(true);
|
setAcceptDrops(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::setSidebarVisible(bool visible)
|
|
||||||
{
|
|
||||||
if (NavigationWidgetPlaceHolder::current()) {
|
|
||||||
if (m_navigationWidget->isSuppressed() && visible) {
|
|
||||||
m_navigationWidget->setShown(true);
|
|
||||||
m_navigationWidget->setSuppressed(false);
|
|
||||||
} else {
|
|
||||||
m_navigationWidget->setShown(visible);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::setSuppressNavigationWidget(bool suppress)
|
|
||||||
{
|
|
||||||
if (NavigationWidgetPlaceHolder::current())
|
|
||||||
m_navigationWidget->setSuppressed(suppress);
|
|
||||||
}
|
|
||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
{
|
{
|
||||||
hide();
|
hide();
|
||||||
@ -246,27 +206,14 @@ MainWindow::~MainWindow()
|
|||||||
m_printer = 0;
|
m_printer = 0;
|
||||||
delete m_uniqueIDManager;
|
delete m_uniqueIDManager;
|
||||||
m_uniqueIDManager = 0;
|
m_uniqueIDManager = 0;
|
||||||
delete m_vcsManager;
|
|
||||||
m_vcsManager = 0;
|
|
||||||
pm->removeObject(m_outputMode);
|
pm->removeObject(m_outputMode);
|
||||||
delete m_outputMode;
|
delete m_outputMode;
|
||||||
m_outputMode = 0;
|
m_outputMode = 0;
|
||||||
//we need to delete editormanager and viewmanager explicitly before the end of the destructor,
|
|
||||||
//because they might trigger stuff that tries to access data from editorwindow, like removeContextWidget
|
|
||||||
|
|
||||||
// All modes are now gone
|
|
||||||
OutputPaneManager::destroy();
|
|
||||||
|
|
||||||
// Now that the OutputPaneManager is gone, is a good time to delete the view
|
|
||||||
pm->removeObject(m_outputView);
|
|
||||||
delete m_outputView;
|
|
||||||
|
|
||||||
delete m_editorManager;
|
|
||||||
m_editorManager = 0;
|
|
||||||
delete m_viewManager;
|
delete m_viewManager;
|
||||||
m_viewManager = 0;
|
m_viewManager = 0;
|
||||||
delete m_progressManager;
|
|
||||||
m_progressManager = 0;
|
|
||||||
pm->removeObject(m_coreImpl);
|
pm->removeObject(m_coreImpl);
|
||||||
delete m_coreImpl;
|
delete m_coreImpl;
|
||||||
m_coreImpl = 0;
|
m_coreImpl = 0;
|
||||||
@ -274,9 +221,6 @@ MainWindow::~MainWindow()
|
|||||||
delete m_rightPaneWidget;
|
delete m_rightPaneWidget;
|
||||||
m_rightPaneWidget = 0;
|
m_rightPaneWidget = 0;
|
||||||
|
|
||||||
delete m_navigationWidget;
|
|
||||||
m_navigationWidget = 0;
|
|
||||||
|
|
||||||
delete m_modeManager;
|
delete m_modeManager;
|
||||||
m_modeManager = 0;
|
m_modeManager = 0;
|
||||||
delete m_mimeDatabase;
|
delete m_mimeDatabase;
|
||||||
@ -291,62 +235,25 @@ bool MainWindow::init(QString *errorMessage)
|
|||||||
pm->addObject(m_coreImpl);
|
pm->addObject(m_coreImpl);
|
||||||
m_viewManager->init();
|
m_viewManager->init();
|
||||||
m_modeManager->init();
|
m_modeManager->init();
|
||||||
m_progressManager->init();
|
|
||||||
QWidget *outputModeWidget = new QWidget;
|
|
||||||
outputModeWidget->setLayout(new QVBoxLayout);
|
|
||||||
outputModeWidget->layout()->setMargin(0);
|
|
||||||
outputModeWidget->layout()->setSpacing(0);
|
|
||||||
m_outputMode = new BaseMode;
|
|
||||||
m_outputMode->setName(tr("Output"));
|
|
||||||
m_outputMode->setUniqueModeName(Constants::MODE_OUTPUT);
|
|
||||||
m_outputMode->setIcon(QIcon(QLatin1String(":/fancyactionbar/images/mode_Output.png")));
|
|
||||||
m_outputMode->setPriority(Constants::P_MODE_OUTPUT);
|
|
||||||
m_outputMode->setWidget(outputModeWidget);
|
|
||||||
OutputPanePlaceHolder *oph = new OutputPanePlaceHolder(m_outputMode);
|
|
||||||
oph->setCloseable(false);
|
|
||||||
outputModeWidget->layout()->addWidget(oph);
|
|
||||||
oph->setVisible(true); // since the output pane placeholder is invisible at startup by default (which makes sense in most cases)
|
|
||||||
outputModeWidget->setFocusProxy(oph);
|
|
||||||
|
|
||||||
connect(m_modeManager, SIGNAL(currentModeChanged(Core::IMode*)),
|
|
||||||
this, SLOT(modeChanged(Core::IMode*)), Qt::QueuedConnection);
|
|
||||||
|
|
||||||
m_outputMode->setContext(m_globalContext);
|
|
||||||
pm->addObject(m_outputMode);
|
|
||||||
pm->addObject(m_generalSettings);
|
pm->addObject(m_generalSettings);
|
||||||
pm->addObject(m_shortcutSettings);
|
pm->addObject(m_shortcutSettings);
|
||||||
|
|
||||||
// Add widget to the bottom, we create the view here instead of inside the
|
|
||||||
// OutputPaneManager, since the ViewManager needs to be initilized before
|
|
||||||
m_outputView = new Core::BaseView;
|
|
||||||
m_outputView->setUniqueViewName("OutputWindow");
|
|
||||||
m_outputView->setWidget(OutputPaneManager::instance()->buttonsWidget());
|
|
||||||
m_outputView->setDefaultPosition(Core::IView::Second);
|
|
||||||
pm->addObject(m_outputView);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::modeChanged(Core::IMode *mode)
|
void MainWindow::modeChanged(Core::IMode */*mode*/)
|
||||||
{
|
{
|
||||||
if (mode == m_outputMode) {
|
|
||||||
int idx = OutputPaneManager::instance()->m_widgetComboBox->itemData(OutputPaneManager::instance()->m_widgetComboBox->currentIndex()).toInt();
|
|
||||||
IOutputPane *out = OutputPaneManager::instance()->m_pageMap.value(idx);
|
|
||||||
if (out && out->canFocus())
|
|
||||||
out->setFocus();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::extensionsInitialized()
|
void MainWindow::extensionsInitialized()
|
||||||
{
|
{
|
||||||
m_editorManager->init();
|
|
||||||
|
|
||||||
m_viewManager->extensionsInitalized();
|
m_viewManager->extensionsInitalized();
|
||||||
|
|
||||||
m_messageManager->init();
|
m_messageManager->init();
|
||||||
OutputPaneManager::instance()->init();
|
|
||||||
|
|
||||||
m_actionManager->initialize();
|
m_actionManager->initialize();
|
||||||
m_vcsManager->extensionsInitialized();
|
|
||||||
readSettings();
|
readSettings();
|
||||||
updateContext();
|
updateContext();
|
||||||
|
|
||||||
@ -359,14 +266,6 @@ void MainWindow::closeEvent(QCloseEvent *event)
|
|||||||
{
|
{
|
||||||
emit m_coreImpl->saveSettingsRequested();
|
emit m_coreImpl->saveSettingsRequested();
|
||||||
|
|
||||||
// Save opened files
|
|
||||||
bool cancelled;
|
|
||||||
QList<IFile*> notSaved = fileManager()->saveModifiedFiles(fileManager()->modifiedFiles(), &cancelled);
|
|
||||||
if (cancelled || !notSaved.isEmpty()) {
|
|
||||||
event->ignore();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const QList<ICoreListener *> listeners =
|
const QList<ICoreListener *> listeners =
|
||||||
ExtensionSystem::PluginManager::instance()->getObjects<ICoreListener>();
|
ExtensionSystem::PluginManager::instance()->getObjects<ICoreListener>();
|
||||||
foreach (ICoreListener *listener, listeners) {
|
foreach (ICoreListener *listener, listeners) {
|
||||||
@ -465,7 +364,6 @@ void MainWindow::registerDefaultContainers()
|
|||||||
filemenu->appendGroup(Constants::G_FILE_PROJECT);
|
filemenu->appendGroup(Constants::G_FILE_PROJECT);
|
||||||
filemenu->appendGroup(Constants::G_FILE_SAVE);
|
filemenu->appendGroup(Constants::G_FILE_SAVE);
|
||||||
filemenu->appendGroup(Constants::G_FILE_CLOSE);
|
filemenu->appendGroup(Constants::G_FILE_CLOSE);
|
||||||
filemenu->appendGroup(Constants::G_FILE_PRINT);
|
|
||||||
filemenu->appendGroup(Constants::G_FILE_OTHER);
|
filemenu->appendGroup(Constants::G_FILE_OTHER);
|
||||||
connect(filemenu->menu(), SIGNAL(aboutToShow()), this, SLOT(aboutToShowRecentFiles()));
|
connect(filemenu->menu(), SIGNAL(aboutToShow()), this, SLOT(aboutToShowRecentFiles()));
|
||||||
|
|
||||||
@ -527,9 +425,6 @@ void MainWindow::registerDefaultActions()
|
|||||||
Command *cmd = createSeparator(am, this, QLatin1String("QtCreator.File.Sep.Save"), m_globalContext);
|
Command *cmd = createSeparator(am, this, QLatin1String("QtCreator.File.Sep.Save"), m_globalContext);
|
||||||
mfile->addAction(cmd, Constants::G_FILE_SAVE);
|
mfile->addAction(cmd, Constants::G_FILE_SAVE);
|
||||||
|
|
||||||
cmd = createSeparator(am, this, QLatin1String("QtCreator.File.Sep.Print"), m_globalContext);
|
|
||||||
mfile->addAction(cmd, Constants::G_FILE_PRINT);
|
|
||||||
|
|
||||||
cmd = createSeparator(am, this, QLatin1String("QtCreator.File.Sep.Close"), m_globalContext);
|
cmd = createSeparator(am, this, QLatin1String("QtCreator.File.Sep.Close"), m_globalContext);
|
||||||
mfile->addAction(cmd, Constants::G_FILE_CLOSE);
|
mfile->addAction(cmd, Constants::G_FILE_CLOSE);
|
||||||
|
|
||||||
@ -612,11 +507,6 @@ void MainWindow::registerDefaultActions()
|
|||||||
mfile->addAction(cmd, Constants::G_FILE_SAVE);
|
mfile->addAction(cmd, Constants::G_FILE_SAVE);
|
||||||
connect(m_saveAllAction, SIGNAL(triggered()), this, SLOT(saveAll()));
|
connect(m_saveAllAction, SIGNAL(triggered()), this, SLOT(saveAll()));
|
||||||
|
|
||||||
// Print Action
|
|
||||||
tmpaction = new QAction(tr("&Print..."), this);
|
|
||||||
cmd = am->registerAction(tmpaction, Constants::PRINT, m_globalContext);
|
|
||||||
mfile->addAction(cmd, Constants::G_FILE_PRINT);
|
|
||||||
|
|
||||||
// Exit Action
|
// Exit Action
|
||||||
m_exitAction = new QAction(tr("E&xit"), this);
|
m_exitAction = new QAction(tr("E&xit"), this);
|
||||||
cmd = am->registerAction(m_exitAction, Constants::EXIT, m_globalContext);
|
cmd = am->registerAction(m_exitAction, Constants::EXIT, m_globalContext);
|
||||||
@ -670,13 +560,6 @@ void MainWindow::registerDefaultActions()
|
|||||||
medit->addAction(cmd, Constants::G_EDIT_SELECTALL);
|
medit->addAction(cmd, Constants::G_EDIT_SELECTALL);
|
||||||
tmpaction->setEnabled(false);
|
tmpaction->setEnabled(false);
|
||||||
|
|
||||||
// Goto Action
|
|
||||||
tmpaction = new QAction(tr("&Go To Line..."), this);
|
|
||||||
cmd = am->registerAction(tmpaction, Constants::GOTO, m_globalContext);
|
|
||||||
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+L")));
|
|
||||||
medit->addAction(cmd, Constants::G_EDIT_OTHER);
|
|
||||||
tmpaction->setEnabled(false);
|
|
||||||
|
|
||||||
// Options Action
|
// Options Action
|
||||||
m_optionsAction = new QAction(tr("&Options..."), this);
|
m_optionsAction = new QAction(tr("&Options..."), this);
|
||||||
cmd = am->registerAction(m_optionsAction, Constants::OPTIONS, m_globalContext);
|
cmd = am->registerAction(m_optionsAction, Constants::OPTIONS, m_globalContext);
|
||||||
@ -706,21 +589,6 @@ void MainWindow::registerDefaultActions()
|
|||||||
mwindow->addAction(cmd, Constants::G_WINDOW_SIZE);
|
mwindow->addAction(cmd, Constants::G_WINDOW_SIZE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Show Sidebar Action
|
|
||||||
m_toggleSideBarAction = new QAction(QIcon(Constants::ICON_TOGGLE_SIDEBAR),
|
|
||||||
tr("Show Sidebar"), this);
|
|
||||||
m_toggleSideBarAction->setCheckable(true);
|
|
||||||
cmd = am->registerAction(m_toggleSideBarAction, Constants::TOGGLE_SIDEBAR, m_globalContext);
|
|
||||||
#ifdef Q_WS_MAC
|
|
||||||
cmd->setDefaultKeySequence(QKeySequence("Ctrl+0"));
|
|
||||||
#else
|
|
||||||
cmd->setDefaultKeySequence(QKeySequence("Alt+0"));
|
|
||||||
#endif
|
|
||||||
connect(m_toggleSideBarAction, SIGNAL(triggered(bool)), this, SLOT(setSidebarVisible(bool)));
|
|
||||||
m_toggleSideBarButton->setDefaultAction(cmd->action());
|
|
||||||
mwindow->addAction(cmd, Constants::G_WINDOW_PANES);
|
|
||||||
m_toggleSideBarAction->setEnabled(false);
|
|
||||||
|
|
||||||
#ifndef Q_WS_MAC
|
#ifndef Q_WS_MAC
|
||||||
// Full Screen Action
|
// Full Screen Action
|
||||||
m_toggleFullScreenAction = new QAction(tr("Full Screen"), this);
|
m_toggleFullScreenAction = new QAction(tr("Full Screen"), this);
|
||||||
@ -737,13 +605,13 @@ void MainWindow::registerDefaultActions()
|
|||||||
#else
|
#else
|
||||||
tmpaction = new QAction(tr("About &OpenPilot GCS..."), this);
|
tmpaction = new QAction(tr("About &OpenPilot GCS..."), this);
|
||||||
#endif
|
#endif
|
||||||
cmd = am->registerAction(tmpaction, Constants::ABOUT_QTCREATOR, m_globalContext);
|
cmd = am->registerAction(tmpaction, Constants::ABOUT_OPENPILOTGCS, m_globalContext);
|
||||||
mhelp->addAction(cmd, Constants::G_HELP_ABOUT);
|
mhelp->addAction(cmd, Constants::G_HELP_ABOUT);
|
||||||
tmpaction->setEnabled(true);
|
tmpaction->setEnabled(true);
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_WS_MAC
|
||||||
cmd->action()->setMenuRole(QAction::ApplicationSpecificRole);
|
cmd->action()->setMenuRole(QAction::ApplicationSpecificRole);
|
||||||
#endif
|
#endif
|
||||||
connect(tmpaction, SIGNAL(triggered()), this, SLOT(aboutQtCreator()));
|
connect(tmpaction, SIGNAL(triggered()), this, SLOT(aboutOpenPilogGCS()));
|
||||||
|
|
||||||
//About Plugins Action
|
//About Plugins Action
|
||||||
tmpaction = new QAction(tr("About &Plugins..."), this);
|
tmpaction = new QAction(tr("About &Plugins..."), this);
|
||||||
@ -754,12 +622,7 @@ void MainWindow::registerDefaultActions()
|
|||||||
cmd->action()->setMenuRole(QAction::ApplicationSpecificRole);
|
cmd->action()->setMenuRole(QAction::ApplicationSpecificRole);
|
||||||
#endif
|
#endif
|
||||||
connect(tmpaction, SIGNAL(triggered()), this, SLOT(aboutPlugins()));
|
connect(tmpaction, SIGNAL(triggered()), this, SLOT(aboutPlugins()));
|
||||||
// About Qt Action
|
|
||||||
// tmpaction = new QAction(tr("About &Qt..."), this);
|
|
||||||
// cmd = am->registerAction(tmpaction, Constants:: ABOUT_QT, m_globalContext);
|
|
||||||
// mhelp->addAction(cmd, Constants::G_HELP_ABOUT);
|
|
||||||
// tmpaction->setEnabled(true);
|
|
||||||
// connect(tmpaction, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
|
|
||||||
// About sep
|
// About sep
|
||||||
#ifndef Q_WS_MAC // doesn't have the "About" actions in the Help menu
|
#ifndef Q_WS_MAC // doesn't have the "About" actions in the Help menu
|
||||||
tmpaction = new QAction(this);
|
tmpaction = new QAction(this);
|
||||||
@ -776,11 +639,11 @@ void MainWindow::newFile()
|
|||||||
|
|
||||||
void MainWindow::openFile()
|
void MainWindow::openFile()
|
||||||
{
|
{
|
||||||
openFiles(editorManager()->getOpenFileNames());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static QList<IFileFactory*> getNonEditorFileFactories()
|
static QList<IFileFactory*> getNonEditorFileFactories()
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
const QList<IFileFactory*> allFileFactories =
|
const QList<IFileFactory*> allFileFactories =
|
||||||
ExtensionSystem::PluginManager::instance()->getObjects<IFileFactory>();
|
ExtensionSystem::PluginManager::instance()->getObjects<IFileFactory>();
|
||||||
QList<IFileFactory*> nonEditorFileFactories;
|
QList<IFileFactory*> nonEditorFileFactories;
|
||||||
@ -788,7 +651,9 @@ static QList<IFileFactory*> getNonEditorFileFactories()
|
|||||||
if (!qobject_cast<IEditorFactory *>(factory))
|
if (!qobject_cast<IEditorFactory *>(factory))
|
||||||
nonEditorFileFactories.append(factory);
|
nonEditorFileFactories.append(factory);
|
||||||
}
|
}
|
||||||
return nonEditorFileFactories;
|
#endif
|
||||||
|
QList<IFileFactory*> tmp;
|
||||||
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
static IFileFactory *findFileFactory(const QList<IFileFactory*> &fileFactories,
|
static IFileFactory *findFileFactory(const QList<IFileFactory*> &fileFactories,
|
||||||
@ -808,7 +673,6 @@ static IFileFactory *findFileFactory(const QList<IFileFactory*> &fileFactories,
|
|||||||
// opens either an editor or loads a project
|
// opens either an editor or loads a project
|
||||||
void MainWindow::openFiles(const QStringList &fileNames)
|
void MainWindow::openFiles(const QStringList &fileNames)
|
||||||
{
|
{
|
||||||
bool needToSwitchToEditor = false;
|
|
||||||
QList<IFileFactory*> nonEditorFileFactories = getNonEditorFileFactories();
|
QList<IFileFactory*> nonEditorFileFactories = getNonEditorFileFactories();
|
||||||
|
|
||||||
foreach (const QString &fileName, fileNames) {
|
foreach (const QString &fileName, fileNames) {
|
||||||
@ -817,53 +681,23 @@ void MainWindow::openFiles(const QStringList &fileNames)
|
|||||||
if (IFileFactory *fileFactory = findFileFactory(nonEditorFileFactories, mimeDatabase(), fi)) {
|
if (IFileFactory *fileFactory = findFileFactory(nonEditorFileFactories, mimeDatabase(), fi)) {
|
||||||
fileFactory->open(absoluteFilePath);
|
fileFactory->open(absoluteFilePath);
|
||||||
} else {
|
} else {
|
||||||
IEditor *editor = editorManager()->openEditor(absoluteFilePath);
|
|
||||||
if (editor)
|
|
||||||
needToSwitchToEditor = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (needToSwitchToEditor)
|
|
||||||
editorManager()->ensureEditorManagerVisible();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::setFocusToEditor()
|
void MainWindow::setFocusToEditor()
|
||||||
{
|
{
|
||||||
QWidget *focusWidget = qApp->focusWidget();
|
|
||||||
if (!EditorManager::instance()->isVisible())
|
|
||||||
{
|
|
||||||
m_coreImpl->modeManager()->activateMode(QLatin1String(Constants::MODE_EDIT));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IEditor *editor = m_editorManager->currentEditor())
|
|
||||||
editor->widget()->setFocus();
|
|
||||||
|
|
||||||
bool focusWasAlreadyInEditor = (focusWidget && focusWidget == qApp->focusWidget());
|
|
||||||
if (focusWasAlreadyInEditor) {
|
|
||||||
bool stuffVisible =
|
|
||||||
(FindToolBarPlaceHolder::getCurrent() &&
|
|
||||||
FindToolBarPlaceHolder::getCurrent()->isVisible())
|
|
||||||
|| (OutputPanePlaceHolder::getCurrent() &&
|
|
||||||
OutputPanePlaceHolder::getCurrent()->isVisible())
|
|
||||||
|| (RightPanePlaceHolder::current() &&
|
|
||||||
RightPanePlaceHolder::current()->isVisible());
|
|
||||||
if (stuffVisible) {
|
|
||||||
if (FindToolBarPlaceHolder::getCurrent())
|
|
||||||
FindToolBarPlaceHolder::getCurrent()->hide();
|
|
||||||
OutputPaneManager::instance()->slotHide();
|
|
||||||
RightPaneWidget::instance()->setShown(false);
|
|
||||||
} else {
|
|
||||||
m_coreImpl->modeManager()->activateMode(QLatin1String(Constants::MODE_EDIT));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList MainWindow::showNewItemDialog(const QString &title,
|
QStringList MainWindow::showNewItemDialog(const QString &title,
|
||||||
const QList<IWizard *> &wizards,
|
const QList<IWizard *> &wizards,
|
||||||
const QString &defaultLocation)
|
const QString &defaultLocation)
|
||||||
{
|
{
|
||||||
|
|
||||||
QString defaultDir = defaultLocation;
|
QString defaultDir = defaultLocation;
|
||||||
if (defaultDir.isEmpty() && !m_coreImpl->fileManager()->currentFile().isEmpty())
|
|
||||||
defaultDir = QFileInfo(m_coreImpl->fileManager()->currentFile()).absolutePath();
|
|
||||||
if (defaultDir.isEmpty())
|
if (defaultDir.isEmpty())
|
||||||
defaultDir = Utils::PathChooser::homePath();
|
defaultDir = Utils::PathChooser::homePath();
|
||||||
|
|
||||||
@ -903,7 +737,6 @@ bool MainWindow::showOptionsDialog(const QString &category,
|
|||||||
|
|
||||||
void MainWindow::saveAll()
|
void MainWindow::saveAll()
|
||||||
{
|
{
|
||||||
m_fileManager->saveModifiedFilesSilently(m_fileManager->modifiedFiles());
|
|
||||||
emit m_coreImpl->saveSettingsRequested();
|
emit m_coreImpl->saveSettingsRequested();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -919,18 +752,7 @@ void MainWindow::exit()
|
|||||||
|
|
||||||
void MainWindow::openFileWith()
|
void MainWindow::openFileWith()
|
||||||
{
|
{
|
||||||
QStringList fileNames = editorManager()->getOpenFileNames();
|
|
||||||
foreach (const QString &fileName, fileNames) {
|
|
||||||
bool isExternal;
|
|
||||||
const QString editorKind = editorManager()->getOpenWithEditorKind(fileName, &isExternal);
|
|
||||||
if (editorKind.isEmpty())
|
|
||||||
continue;
|
|
||||||
if (isExternal) {
|
|
||||||
editorManager()->openExternalEditor(fileName, editorKind);
|
|
||||||
} else {
|
|
||||||
editorManager()->openEditor(fileName, editorKind);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ActionManager *MainWindow::actionManager() const
|
ActionManager *MainWindow::actionManager() const
|
||||||
@ -938,11 +760,6 @@ ActionManager *MainWindow::actionManager() const
|
|||||||
return m_actionManager;
|
return m_actionManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
FileManager *MainWindow::fileManager() const
|
|
||||||
{
|
|
||||||
return m_fileManager;
|
|
||||||
}
|
|
||||||
|
|
||||||
UniqueIDManager *MainWindow::uniqueIDManager() const
|
UniqueIDManager *MainWindow::uniqueIDManager() const
|
||||||
{
|
{
|
||||||
return m_uniqueIDManager;
|
return m_uniqueIDManager;
|
||||||
@ -953,26 +770,6 @@ MessageManager *MainWindow::messageManager() const
|
|||||||
return m_messageManager;
|
return m_messageManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
VCSManager *MainWindow::vcsManager() const
|
|
||||||
{
|
|
||||||
return m_vcsManager;
|
|
||||||
}
|
|
||||||
|
|
||||||
EditorManager *MainWindow::editorManager() const
|
|
||||||
{
|
|
||||||
return m_editorManager;
|
|
||||||
}
|
|
||||||
|
|
||||||
ProgressManager *MainWindow::progressManager() const
|
|
||||||
{
|
|
||||||
return m_progressManager;
|
|
||||||
}
|
|
||||||
|
|
||||||
ScriptManager *MainWindow::scriptManager() const
|
|
||||||
{
|
|
||||||
return m_scriptManager;
|
|
||||||
}
|
|
||||||
|
|
||||||
VariableManager *MainWindow::variableManager() const
|
VariableManager *MainWindow::variableManager() const
|
||||||
{
|
{
|
||||||
return m_variableManager;
|
return m_variableManager;
|
||||||
@ -1117,8 +914,6 @@ void MainWindow::readSettings()
|
|||||||
|
|
||||||
m_settings->endGroup();
|
m_settings->endGroup();
|
||||||
|
|
||||||
m_editorManager->readSettings();
|
|
||||||
m_navigationWidget->restoreSettings(m_settings);
|
|
||||||
m_rightPaneWidget->readSettings(m_settings);
|
m_rightPaneWidget->readSettings(m_settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1139,11 +934,8 @@ void MainWindow::writeSettings()
|
|||||||
|
|
||||||
m_settings->endGroup();
|
m_settings->endGroup();
|
||||||
|
|
||||||
m_fileManager->saveRecentFiles();
|
|
||||||
m_viewManager->saveSettings(m_settings);
|
m_viewManager->saveSettings(m_settings);
|
||||||
m_actionManager->saveSettings(m_settings);
|
m_actionManager->saveSettings(m_settings);
|
||||||
m_editorManager->saveSettings();
|
|
||||||
m_navigationWidget->saveSettings(m_settings);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::addAdditionalContext(int context)
|
void MainWindow::addAdditionalContext(int context)
|
||||||
@ -1196,12 +988,7 @@ void MainWindow::aboutToShowRecentFiles()
|
|||||||
aci->menu()->clear();
|
aci->menu()->clear();
|
||||||
|
|
||||||
bool hasRecentFiles = false;
|
bool hasRecentFiles = false;
|
||||||
foreach (const QString &fileName, m_fileManager->recentFiles()) {
|
|
||||||
hasRecentFiles = true;
|
|
||||||
QAction *action = aci->menu()->addAction(fileName);
|
|
||||||
action->setData(fileName);
|
|
||||||
connect(action, SIGNAL(triggered()), this, SLOT(openRecentFile()));
|
|
||||||
}
|
|
||||||
aci->menu()->setEnabled(hasRecentFiles);
|
aci->menu()->setEnabled(hasRecentFiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1212,12 +999,10 @@ void MainWindow::openRecentFile()
|
|||||||
return;
|
return;
|
||||||
QString fileName = action->data().toString();
|
QString fileName = action->data().toString();
|
||||||
if (!fileName.isEmpty()) {
|
if (!fileName.isEmpty()) {
|
||||||
editorManager()->openEditor(fileName);
|
|
||||||
editorManager()->ensureEditorManagerVisible();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::aboutQtCreator()
|
void MainWindow::aboutOpenPilogGCS()
|
||||||
{
|
{
|
||||||
if (!m_versionDialog) {
|
if (!m_versionDialog) {
|
||||||
m_versionDialog = new VersionDialog(this);
|
m_versionDialog = new VersionDialog(this);
|
||||||
|
@ -48,20 +48,15 @@ namespace Core {
|
|||||||
class ActionManager;
|
class ActionManager;
|
||||||
class BaseMode;
|
class BaseMode;
|
||||||
class BaseView;
|
class BaseView;
|
||||||
class EditorManager;
|
|
||||||
class FileManager;
|
|
||||||
class IContext;
|
class IContext;
|
||||||
class IWizard;
|
class IWizard;
|
||||||
class MessageManager;
|
class MessageManager;
|
||||||
class MimeDatabase;
|
class MimeDatabase;
|
||||||
class ModeManager;
|
class ModeManager;
|
||||||
class ProgressManager;
|
|
||||||
class RightPaneWidget;
|
class RightPaneWidget;
|
||||||
class ScriptManager;
|
|
||||||
class SettingsDatabase;
|
class SettingsDatabase;
|
||||||
class UniqueIDManager;
|
class UniqueIDManager;
|
||||||
class VariableManager;
|
class VariableManager;
|
||||||
class VCSManager;
|
|
||||||
class ViewManagerInterface;
|
class ViewManagerInterface;
|
||||||
class IMode;
|
class IMode;
|
||||||
|
|
||||||
@ -71,8 +66,6 @@ class ActionManagerPrivate;
|
|||||||
class CoreImpl;
|
class CoreImpl;
|
||||||
class FancyTabWidget;
|
class FancyTabWidget;
|
||||||
class GeneralSettings;
|
class GeneralSettings;
|
||||||
class NavigationWidget;
|
|
||||||
class ProgressManagerPrivate;
|
|
||||||
class ShortcutSettings;
|
class ShortcutSettings;
|
||||||
class ViewManager;
|
class ViewManager;
|
||||||
class VersionDialog;
|
class VersionDialog;
|
||||||
@ -97,17 +90,12 @@ public:
|
|||||||
void openFiles(const QStringList &fileNames);
|
void openFiles(const QStringList &fileNames);
|
||||||
|
|
||||||
Core::ActionManager *actionManager() const;
|
Core::ActionManager *actionManager() const;
|
||||||
Core::FileManager *fileManager() const;
|
|
||||||
Core::UniqueIDManager *uniqueIDManager() const;
|
Core::UniqueIDManager *uniqueIDManager() const;
|
||||||
Core::MessageManager *messageManager() const;
|
Core::MessageManager *messageManager() const;
|
||||||
Core::EditorManager *editorManager() const;
|
|
||||||
Core::ProgressManager *progressManager() const;
|
|
||||||
Core::ScriptManager *scriptManager() const;
|
|
||||||
Core::VariableManager *variableManager() const;
|
Core::VariableManager *variableManager() const;
|
||||||
Core::ModeManager *modeManager() const;
|
Core::ModeManager *modeManager() const;
|
||||||
Core::MimeDatabase *mimeDatabase() const;
|
Core::MimeDatabase *mimeDatabase() const;
|
||||||
|
|
||||||
VCSManager *vcsManager() const;
|
|
||||||
inline QSettings *settings() const { return m_settings; }
|
inline QSettings *settings() const { return m_settings; }
|
||||||
inline SettingsDatabase *settingsDatabase() const { return m_settingsDatabase; }
|
inline SettingsDatabase *settingsDatabase() const { return m_settingsDatabase; }
|
||||||
virtual QPrinter *printer() const;
|
virtual QPrinter *printer() const;
|
||||||
@ -156,10 +144,9 @@ private slots:
|
|||||||
void openRecentFile();
|
void openRecentFile();
|
||||||
void setFocusToEditor();
|
void setFocusToEditor();
|
||||||
void saveAll();
|
void saveAll();
|
||||||
void aboutQtCreator();
|
void aboutOpenPilogGCS();
|
||||||
void aboutPlugins();
|
void aboutPlugins();
|
||||||
void updateFocusWidget(QWidget *old, QWidget *now);
|
void updateFocusWidget(QWidget *old, QWidget *now);
|
||||||
void setSidebarVisible(bool visible);
|
|
||||||
void destroyVersionDialog();
|
void destroyVersionDialog();
|
||||||
void modeChanged(Core::IMode *mode);
|
void modeChanged(Core::IMode *mode);
|
||||||
|
|
||||||
@ -179,18 +166,12 @@ private:
|
|||||||
SettingsDatabase *m_settingsDatabase;
|
SettingsDatabase *m_settingsDatabase;
|
||||||
mutable QPrinter *m_printer;
|
mutable QPrinter *m_printer;
|
||||||
ActionManagerPrivate *m_actionManager;
|
ActionManagerPrivate *m_actionManager;
|
||||||
EditorManager *m_editorManager;
|
|
||||||
FileManager *m_fileManager;
|
|
||||||
MessageManager *m_messageManager;
|
MessageManager *m_messageManager;
|
||||||
ProgressManagerPrivate *m_progressManager;
|
|
||||||
ScriptManager *m_scriptManager;
|
|
||||||
VariableManager *m_variableManager;
|
VariableManager *m_variableManager;
|
||||||
VCSManager *m_vcsManager;
|
|
||||||
ViewManager *m_viewManager;
|
ViewManager *m_viewManager;
|
||||||
ModeManager *m_modeManager;
|
ModeManager *m_modeManager;
|
||||||
MimeDatabase *m_mimeDatabase;
|
MimeDatabase *m_mimeDatabase;
|
||||||
FancyTabWidget *m_modeStack;
|
FancyTabWidget *m_modeStack;
|
||||||
NavigationWidget *m_navigationWidget;
|
|
||||||
RightPaneWidget *m_rightPaneWidget;
|
RightPaneWidget *m_rightPaneWidget;
|
||||||
Core::BaseView *m_outputView;
|
Core::BaseView *m_outputView;
|
||||||
VersionDialog *m_versionDialog;
|
VersionDialog *m_versionDialog;
|
||||||
@ -211,14 +192,12 @@ private:
|
|||||||
QAction *m_saveAllAction;
|
QAction *m_saveAllAction;
|
||||||
QAction *m_exitAction;
|
QAction *m_exitAction;
|
||||||
QAction *m_optionsAction;
|
QAction *m_optionsAction;
|
||||||
QAction *m_toggleSideBarAction;
|
|
||||||
QAction *m_toggleFullScreenAction;
|
QAction *m_toggleFullScreenAction;
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_WS_MAC
|
||||||
QAction *m_minimizeAction;
|
QAction *m_minimizeAction;
|
||||||
QAction *m_zoomAction;
|
QAction *m_zoomAction;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QToolButton *m_toggleSideBarButton;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
@ -140,7 +140,7 @@ void ModeManager::objectAdded(QObject *obj)
|
|||||||
|
|
||||||
// Register mode shortcut
|
// Register mode shortcut
|
||||||
ActionManager *am = m_mainWindow->actionManager();
|
ActionManager *am = m_mainWindow->actionManager();
|
||||||
const QString shortcutId = QLatin1String("QtCreator.Mode.") + mode->uniqueModeName();
|
const QString shortcutId = QLatin1String("GCS.Mode.") + mode->uniqueModeName();
|
||||||
QShortcut *shortcut = new QShortcut(m_mainWindow);
|
QShortcut *shortcut = new QShortcut(m_mainWindow);
|
||||||
shortcut->setWhatsThis(tr("Switch to %1 mode").arg(mode->name()));
|
shortcut->setWhatsThis(tr("Switch to %1 mode").arg(mode->name()));
|
||||||
Command *cmd = am->registerShortcut(shortcut, shortcutId, QList<int>() << Constants::C_GLOBAL_ID);
|
Command *cmd = am->registerShortcut(shortcut, shortcutId, QList<int>() << Constants::C_GLOBAL_ID);
|
||||||
|
@ -227,9 +227,9 @@ void NavigationWidget::closeSubWidget()
|
|||||||
void NavigationWidget::saveSettings(QSettings *settings)
|
void NavigationWidget::saveSettings(QSettings *settings)
|
||||||
{
|
{
|
||||||
QStringList views;
|
QStringList views;
|
||||||
for (int i=0; i<m_subWidgets.count(); ++i) {
|
//for (int i=0; i<m_subWidgets.count(); ++i) {
|
||||||
views.append(m_subWidgets.at(i)->factory()->displayName());
|
// views.append(m_subWidgets.at(i)->factory()->displayName());
|
||||||
}
|
//}
|
||||||
settings->setValue("Navigation/Views", views);
|
settings->setValue("Navigation/Views", views);
|
||||||
settings->setValue("Navigation/Visible", isShown());
|
settings->setValue("Navigation/Visible", isShown());
|
||||||
settings->setValue("Navigation/VerticalPosition", saveState());
|
settings->setValue("Navigation/VerticalPosition", saveState());
|
||||||
@ -496,12 +496,12 @@ INavigationWidgetFactory *NavigationSubWidget::factory()
|
|||||||
|
|
||||||
void NavigationSubWidget::saveSettings(int position)
|
void NavigationSubWidget::saveSettings(int position)
|
||||||
{
|
{
|
||||||
factory()->saveSettings(position, m_navigationWidget);
|
//factory()->saveSettings(position, m_navigationWidget);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NavigationSubWidget::restoreSettings(int position)
|
void NavigationSubWidget::restoreSettings(int position)
|
||||||
{
|
{
|
||||||
factory()->restoreSettings(position, m_navigationWidget);
|
//factory()->restoreSettings(position, m_navigationWidget);
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::Command *NavigationSubWidget::command(const QString &title) const
|
Core::Command *NavigationSubWidget::command(const QString &title) const
|
||||||
|
@ -84,6 +84,7 @@ void VariableManager::removeFileInfo(const QString &tag)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
void VariableManager::updateCurrentDocument(Core::IEditor *editor)
|
void VariableManager::updateCurrentDocument(Core::IEditor *editor)
|
||||||
{
|
{
|
||||||
const QString currentDocumentTag = QLatin1String("CURRENT_DOCUMENT");
|
const QString currentDocumentTag = QLatin1String("CURRENT_DOCUMENT");
|
||||||
@ -96,6 +97,7 @@ void VariableManager::updateCurrentDocument(Core::IEditor *editor)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
QString VariableManager::value(const QString &variable) const
|
QString VariableManager::value(const QString &variable) const
|
||||||
{
|
{
|
||||||
|
@ -31,7 +31,6 @@
|
|||||||
#define VARIABLEMANAGER_H
|
#define VARIABLEMANAGER_H
|
||||||
|
|
||||||
#include "core_global.h"
|
#include "core_global.h"
|
||||||
#include <coreplugin/editormanager/ieditor.h>
|
|
||||||
|
|
||||||
#include <QtCore/QObject>
|
#include <QtCore/QObject>
|
||||||
#include <QtCore/QMap>
|
#include <QtCore/QMap>
|
||||||
@ -61,8 +60,6 @@ public:
|
|||||||
bool remove(const QString &variable);
|
bool remove(const QString &variable);
|
||||||
QString resolve(const QString &stringWithVariables) const;
|
QString resolve(const QString &stringWithVariables) const;
|
||||||
|
|
||||||
private slots:
|
|
||||||
void updateCurrentDocument(Core::IEditor *editor);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QMap<QString, QString> m_map;
|
QMap<QString, QString> m_map;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/welcome" >
|
<qresource prefix="/welcome">
|
||||||
<file>images/btn_26.png</file>
|
<file>images/btn_26.png</file>
|
||||||
<file>images/btn_26_hover.png</file>
|
<file>images/btn_26_hover.png</file>
|
||||||
<file>images/btn_27.png</file>
|
<file>images/btn_27.png</file>
|
||||||
<file>images/btn_27_hover.png</file>
|
<file>images/btn_27_hover.png</file>
|
||||||
@ -9,9 +9,6 @@
|
|||||||
<file>images/feedback-bar-background.png</file>
|
<file>images/feedback-bar-background.png</file>
|
||||||
<file>images/list_bullet_arrow.png</file>
|
<file>images/list_bullet_arrow.png</file>
|
||||||
<file>images/mode_project.png</file>
|
<file>images/mode_project.png</file>
|
||||||
<file>images/nokia_logo.png</file>
|
|
||||||
<file>images/product_logo.png</file>
|
|
||||||
<file>images/qt_logo.png</file>
|
|
||||||
<file>images/rc_combined.png</file>
|
<file>images/rc_combined.png</file>
|
||||||
<file>images/background_center_frame.png</file>
|
<file>images/background_center_frame.png</file>
|
||||||
<file>images/center_frame_header.png</file>
|
<file>images/center_frame_header.png</file>
|
||||||
|
@ -118,7 +118,7 @@ QString WelcomeMode::name() const
|
|||||||
|
|
||||||
QIcon WelcomeMode::icon() const
|
QIcon WelcomeMode::icon() const
|
||||||
{
|
{
|
||||||
return QIcon(QLatin1String(":/core/images/qtcreator_logo_32.png"));
|
return QIcon(QLatin1String(":/core/images/openpilot_logo_64.png"));
|
||||||
}
|
}
|
||||||
|
|
||||||
int WelcomeMode::priority() const
|
int WelcomeMode::priority() const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user