Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
17b5354e
Commit
17b5354e
authored
Jun 29, 2010
by
Friedemann Kleint
Browse files
Designer: Initially disable form preview.
Reviewed-by:
Kai Köhne
<
kai.koehne@nokia.com
>
Task-number: QTCREATORBUG-1762
parent
5df0e9dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/designer/formeditorw.cpp
View file @
17b5354e
...
...
@@ -152,6 +152,7 @@ FormEditorW::FormEditorW() :
m_actionPrint
(
0
),
m_actionPreview
(
0
),
m_actionGroupPreviewInStyle
(
0
),
m_previewInStyleMenu
(
0
),
m_actionAboutPlugins
(
0
),
m_shortcutMapper
(
new
QSignalMapper
(
this
)),
m_context
(
0
),
...
...
@@ -533,7 +534,10 @@ void FormEditorW::setupActions()
// Preview in style...
m_actionGroupPreviewInStyle
=
m_fwm
->
actionGroupPreviewInStyle
();
mformtools
->
addMenu
(
createPreviewStyleMenu
(
am
,
m_actionGroupPreviewInStyle
));
Core
::
ActionContainer
*
previewAC
=
createPreviewStyleMenu
(
am
,
m_actionGroupPreviewInStyle
);
m_previewInStyleMenu
=
previewAC
->
menu
();
mformtools
->
addMenu
(
previewAC
);
setPreviewMenuEnabled
(
false
);
// Form settings
createSeparator
(
this
,
am
,
m_contexts
,
medit
,
QLatin1String
(
"FormEditor.Edit.Separator2"
),
Core
::
Constants
::
G_EDIT_OTHER
);
...
...
@@ -608,6 +612,12 @@ Core::ActionContainer *FormEditorW::createPreviewStyleMenu(Core::ActionManager *
return
menuPreviewStyle
;
}
void
FormEditorW
::
setPreviewMenuEnabled
(
bool
e
)
{
m_actionPreview
->
setEnabled
(
e
);
m_previewInStyleMenu
->
setEnabled
(
e
);
}
void
FormEditorW
::
saveSettings
(
QSettings
*
s
)
{
s
->
beginGroup
(
settingsGroup
);
...
...
@@ -731,8 +741,7 @@ void FormEditorW::activeFormWindowChanged(QDesignerFormWindowInterface *afw)
qDebug
()
<<
Q_FUNC_INFO
<<
afw
<<
" of "
<<
m_fwm
->
formWindowCount
();
m_fwm
->
closeAllPreviews
();
m_actionPreview
->
setEnabled
(
afw
!=
0
);
m_actionGroupPreviewInStyle
->
setEnabled
(
afw
!=
0
);
setPreviewMenuEnabled
(
afw
!=
0
);
}
EditorData
FormEditorW
::
activeEditor
()
const
...
...
src/plugins/designer/formeditorw.h
View file @
17b5354e
...
...
@@ -44,6 +44,7 @@ class QDesignerFormWindowInterface;
class
QAction
;
class
QActionGroup
;
class
QMenu
;
class
QSignalMapper
;
class
QSettings
;
class
QToolBar
;
...
...
@@ -122,6 +123,7 @@ private slots:
void
currentEditorChanged
(
Core
::
IEditor
*
editor
);
void
toolChanged
(
int
);
void
print
();
void
setPreviewMenuEnabled
(
bool
e
);
void
updateShortcut
(
QObject
*
command
);
void
closeFormEditorsForXmlEditors
(
QList
<
Core
::
IEditor
*>
editors
);
...
...
@@ -179,6 +181,7 @@ private:
QAction
*
m_actionPrint
;
QAction
*
m_actionPreview
;
QActionGroup
*
m_actionGroupPreviewInStyle
;
QMenu
*
m_previewInStyleMenu
;
QAction
*
m_actionAboutPlugins
;
QAction
*
m_modeActionSeparator
;
QSignalMapper
*
m_shortcutMapper
;
...
...
Write
Preview
Supports
Markdown
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