Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kumir2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kumir
kumir2
Commits
3a9b2ac9
Commit
3a9b2ac9
authored
Jun 25, 2013
by
Victor Yacovlev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show console toggle button
parent
1a672c74
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
158 additions
and
93 deletions
+158
-93
share/kumir2/translations/CoreGUI_ru.ts
share/kumir2/translations/CoreGUI_ru.ts
+100
-90
src/plugins/coregui/mainwindow.cpp
src/plugins/coregui/mainwindow.cpp
+4
-0
src/plugins/coregui/mainwindow.ui
src/plugins/coregui/mainwindow.ui
+12
-0
src/plugins/coregui/plugin.cpp
src/plugins/coregui/plugin.cpp
+23
-1
src/plugins/coregui/plugin.h
src/plugins/coregui/plugin.h
+2
-0
src/plugins/coregui/terminal.cpp
src/plugins/coregui/terminal.cpp
+5
-0
src/plugins/coregui/terminal.h
src/plugins/coregui/terminal.h
+1
-0
src/shared/widgets/secondarywindow.cpp
src/shared/widgets/secondarywindow.cpp
+10
-2
src/shared/widgets/secondarywindow.h
src/shared/widgets/secondarywindow.h
+1
-0
No files found.
share/kumir2/translations/CoreGUI_ru.ts
View file @
3a9b2ac9
This diff is collapsed.
Click to expand it.
src/plugins/coregui/mainwindow.cpp
View file @
3a9b2ac9
...
...
@@ -949,6 +949,9 @@ void MainWindow::loadSettings()
}
restoreState
(
m_plugin
->
mySettings
()
->
value
(
Plugin
::
MainWindowStateKey
).
toByteArray
());
ui
->
splitter
->
restoreState
(
m_plugin
->
mySettings
()
->
value
(
Plugin
::
MainWindowSplitterStateKey
).
toByteArray
());
bool
showConsole
=
m_plugin
->
mySettings
()
->
value
(
Plugin
::
MainWindowShowConsoleKey
,
true
).
toBool
();
ui
->
actionShow_Console_Pane
->
setChecked
(
showConsole
);
m_plugin
->
showConsolePane
(
showConsole
);
}
void
MainWindow
::
saveSettings
()
...
...
@@ -958,6 +961,7 @@ void MainWindow::saveSettings()
sett
->
setValue
(
Plugin
::
MainWindowGeometryKey
,
r
);
sett
->
setValue
(
Plugin
::
MainWindowStateKey
,
saveState
());
sett
->
setValue
(
Plugin
::
MainWindowSplitterStateKey
,
ui
->
splitter
->
saveState
());
sett
->
setValue
(
Plugin
::
MainWindowShowConsoleKey
,
ui
->
actionShow_Console_Pane
->
isChecked
());
}
void
MainWindow
::
restoreSession
()
...
...
src/plugins/coregui/mainwindow.ui
View file @
3a9b2ac9
...
...
@@ -114,6 +114,7 @@
<property
name=
"title"
>
<string>
Window
</string>
</property>
<addaction
name=
"actionShow_Console_Pane"
/>
</widget>
<addaction
name=
"menuFile"
/>
<addaction
name=
"menuEdit"
/>
...
...
@@ -250,6 +251,17 @@
<enum>
Qt::ApplicationShortcut
</enum>
</property>
</action>
<action
name=
"actionShow_Console_Pane"
>
<property
name=
"checkable"
>
<bool>
true
</bool>
</property>
<property
name=
"text"
>
<string>
Show Console Pane
</string>
</property>
<property
name=
"shortcut"
>
<string>
F12
</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>
...
...
src/plugins/coregui/plugin.cpp
View file @
3a9b2ac9
...
...
@@ -32,6 +32,7 @@ QString Plugin::SessionTabIndexKey = "Session/TabIndex";
QString
Plugin
::
RecentFileKey
=
"History/FileDialog"
;
QString
Plugin
::
RecentFilesKey
=
"History/RecentFiles"
;
QString
Plugin
::
MainWindowGeometryKey
=
"Geometry/MainWindow"
;
QString
Plugin
::
MainWindowShowConsoleKey
=
"State/ConsoleToggle"
;
QString
Plugin
::
MainWindowStateKey
=
"State/MainWindow"
;
QString
Plugin
::
MainWindowSplitterStateKey
=
"State/MainWindowSplitter"
;
QString
Plugin
::
DockVisibleKey
=
"DockWindow/Visible"
;
...
...
@@ -151,6 +152,15 @@ QString Plugin::initialize(const QStringList & parameters)
// termWindow->toggleViewAction()->setShortcut(QKeySequence("F12"));
#endif
connect
(
mainWindow_
->
ui
->
actionShow_Console_Pane
,
SIGNAL
(
triggered
(
bool
)),
this
,
SLOT
(
showConsolePane
(
bool
)));
QToolButton
*
btnShowConsole
=
new
QToolButton
(
mainWindow_
);
btnShowConsole
->
setDefaultAction
(
mainWindow_
->
ui
->
actionShow_Console_Pane
);
btnShowConsole
->
setToolTip
(
mainWindow_
->
ui
->
actionShow_Console_Pane
->
text
());
mainWindow_
->
statusBar_
->
addButtonToLeft
(
btnShowConsole
);
QToolButton
*
btnSaveTerm
=
new
QToolButton
(
mainWindow_
);
btnSaveTerm
->
setPopupMode
(
QToolButton
::
InstantPopup
);
QMenu
*
menuSaveTerm
=
new
QMenu
(
btnSaveTerm
);
...
...
@@ -414,14 +424,26 @@ void Plugin::handleSecondaryWindowDocked(QWidget * w, const QString & title)
actorsDockPlace_
->
addTab
(
w
,
w
->
windowTitle
());
actorsDockPlace_
->
setCurrentWidget
(
w
);
actorsDockPlace_
->
setVisible
(
true
);
mainWindow_
->
ui
->
actionShow_Console_Pane
->
setChecked
(
true
);
showConsolePane
(
true
);
}
void
Plugin
::
handleSecondaryWindowUndocked
(
QWidget
*
w
)
{
int
index
=
actorsDockPlace_
->
indexOf
(
w
);
actorsDockPlace_
->
removeTab
(
index
);
if
(
actorsDockPlace_
->
count
()
==
0
)
if
(
actorsDockPlace_
->
count
()
==
0
)
{
actorsDockPlace_
->
setVisible
(
false
);
if
(
m_terminal
->
isEmpty
())
{
mainWindow_
->
ui
->
actionShow_Console_Pane
->
setChecked
(
false
);
showConsolePane
(
false
);
}
}
}
void
Plugin
::
showConsolePane
(
bool
v
)
{
mainWindow_
->
ui
->
bottomWidget
->
setVisible
(
v
);
}
...
...
src/plugins/coregui/plugin.h
View file @
3a9b2ac9
...
...
@@ -39,6 +39,7 @@ public:
static
QString
RecentFileKey
;
static
QString
RecentFilesKey
;
static
QString
MainWindowGeometryKey
;
static
QString
MainWindowShowConsoleKey
;
static
QString
MainWindowStateKey
;
static
QString
MainWindowSplitterStateKey
;
static
QString
DockVisibleKey
;
...
...
@@ -56,6 +57,7 @@ protected slots:
void
prepareKumirProgramToRun
();
void
handleSecondaryWindowDocked
(
QWidget
*
w
,
const
QString
&
title
);
void
handleSecondaryWindowUndocked
(
QWidget
*
w
);
void
showConsolePane
(
bool
v
);
protected:
QString
initialize
(
const
QStringList
&
arguments
);
...
...
src/plugins/coregui/terminal.cpp
View file @
3a9b2ac9
...
...
@@ -93,6 +93,11 @@ Term::Term(QWidget *parent) :
}
bool
Term
::
isEmpty
()
const
{
return
sessions_
.
isEmpty
();
}
QSize
Term
::
minimumSizeHint
()
const
{
QSize
result
=
m_plane
->
minimumSizeHint
();
...
...
src/plugins/coregui/terminal.h
View file @
3a9b2ac9
...
...
@@ -16,6 +16,7 @@ public:
explicit
Term
(
QWidget
*
parent
=
0
);
bool
isActiveComponent
()
const
;
QSize
minimumSizeHint
()
const
;
bool
isEmpty
()
const
;
signals:
void
openTextEditor
(
const
QString
&
suggestedFileName
,
const
QString
&
text
);
void
message
(
const
QString
&
);
...
...
src/shared/widgets/secondarywindow.cpp
View file @
3a9b2ac9
...
...
@@ -600,8 +600,8 @@ void SecondaryWindowPrivate::init(QWidget *centralWidget,
topBorder_
->
setFixedHeight
(
qMax
(
maxButtonHeight
,
topBorderHeight
));
toggleVisibleAction_
=
new
QAction
(
this
);
toggleVisibleAction_
->
setCheckable
(
tru
e
);
connect
(
toggleVisibleAction_
,
SIGNAL
(
triggered
(
bool
)),
pClass_
,
SLOT
(
setVisible
(
bool
)));
toggleVisibleAction_
->
setCheckable
(
fals
e
);
connect
(
toggleVisibleAction_
,
SIGNAL
(
triggered
(
)),
pClass_
,
SLOT
(
activate
(
)));
startTimer
(
500
);
...
...
@@ -615,6 +615,14 @@ void SecondaryWindowPrivate::init(QWidget *centralWidget,
dockPlace_
->
setMinimumWidth
(
centralWidget_
->
minimumWidth
());
}
void
SecondaryWindow
::
activate
()
{
if
(
!
isVisible
())
setVisible
(
true
);
if
(
isFloating
())
activateWindow
();
}
void
SecondaryWindowPrivate
::
timerEvent
(
QTimerEvent
*
e
)
{
e
->
accept
();
...
...
src/shared/widgets/secondarywindow.h
View file @
3a9b2ac9
...
...
@@ -53,6 +53,7 @@ protected:
bool
eventFilter
(
QObject
*
obj
,
QEvent
*
evt
);
protected
slots
:
void
checkForPlaceVisible
(
bool
show
);
void
activate
();
private:
class
SecondaryWindowPrivate
*
pImpl_
;
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment