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
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
CGoGN
CGoGN
Commits
e56957ac
Commit
e56957ac
authored
Jun 17, 2015
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug mac colorSelection
parent
e74095de
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
38 deletions
+37
-38
SCHNApps/Plugins/surface_render/forms/surface_render.ui
SCHNApps/Plugins/surface_render/forms/surface_render.ui
+27
-3
SCHNApps/Plugins/surface_render/include/surface_render_dockTab.h
...s/Plugins/surface_render/include/surface_render_dockTab.h
+1
-1
SCHNApps/Plugins/surface_render/src/surface_render_dockTab.cpp
...pps/Plugins/surface_render/src/surface_render_dockTab.cpp
+4
-2
SCHNApps/src/schnapps.cpp
SCHNApps/src/schnapps.cpp
+2
-7
SCHNApps/src/view.cpp
SCHNApps/src/view.cpp
+3
-25
No files found.
SCHNApps/Plugins/surface_render/forms/surface_render.ui
View file @
e56957ac
...
...
@@ -6,7 +6,7 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
2
40
</width>
<width>
2
76
</width>
<height>
600
</height>
</rect>
</property>
...
...
@@ -115,7 +115,7 @@
<item>
<widget
class=
"QPushButton"
name=
"scolorButton"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"
Preferred
"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"
Minimum
"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
...
...
@@ -214,7 +214,7 @@
<item>
<widget
class=
"QPushButton"
name=
"dcolorButton"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"
Preferred
"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"
Minimum
"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
...
...
@@ -390,6 +390,18 @@
</item>
<item>
<widget
class=
"QPushButton"
name=
"bfcolorButton"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Minimum"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
16777215
</width>
<height>
32
</height>
</size>
</property>
<property
name=
"text"
>
<string>
Back Color
</string>
</property>
...
...
@@ -424,6 +436,18 @@
</item>
<item>
<widget
class=
"QPushButton"
name=
"bothcolorButton"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Minimum"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
16777215
</width>
<height>
32
</height>
</size>
</property>
<property
name=
"text"
>
<string>
Front n Back
</string>
</property>
...
...
SCHNApps/Plugins/surface_render/include/surface_render_dockTab.h
View file @
e56957ac
...
...
@@ -54,7 +54,7 @@ private slots:
void
vertexColorClicked
();
void
backColorClicked
();
void
bothColorClicked
();
void
colorSelected
(
const
QColor
&
col
);
void
colorSelected
();
private:
void
addPositionVBO
(
QString
name
);
...
...
SCHNApps/Plugins/surface_render/src/surface_render_dockTab.cpp
View file @
e56957ac
...
...
@@ -36,7 +36,8 @@ Surface_Render_DockTab::Surface_Render_DockTab(SCHNApps* s, Surface_Render_Plugi
connect
(
vcolorButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
vertexColorClicked
()));
connect
(
bfcolorButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
backColorClicked
()));
connect
(
bothcolorButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
bothColorClicked
()));
connect
(
m_colorDial
,
SIGNAL
(
colorSelected
(
const
QColor
&
)),
this
,
SLOT
(
colorSelected
(
const
QColor
&
)));
connect
(
m_colorDial
,
SIGNAL
(
accepted
()),
this
,
SLOT
(
colorSelected
()));
}
...
...
@@ -235,8 +236,9 @@ void Surface_Render_DockTab::bothColorClicked()
}
void
Surface_Render_DockTab
::
colorSelected
(
const
QColor
&
col
)
void
Surface_Render_DockTab
::
colorSelected
()
{
QColor
col
=
m_colorDial
->
currentColor
();
if
(
m_currentColorDial
==
1
)
{
m_diffuseColor
=
col
;
...
...
SCHNApps/src/schnapps.cpp
View file @
e56957ac
...
...
@@ -975,7 +975,6 @@ void SCHNApps::showHidePythonDock()
void
SCHNApps
::
execPythonCmd
(
const
QString
&
cmd
)
{
#ifdef WIN32
QString
line
=
cmd
;
if
(
line
.
size
()
>=
2
)
{
...
...
@@ -986,10 +985,6 @@ void SCHNApps::execPythonCmd(const QString& cmd)
m_pythonConsole
.
consoleMessage
(
spaces
+
line
);
m_pythonConsole
.
executeLine
(
false
);
}
#else
m_pythonConsole
.
consoleMessage
(
cmd
);
m_pythonConsole
.
executeLine
(
false
);
#endif
}
void
SCHNApps
::
loadPythonScriptFromFile
(
const
QString
&
fileName
)
...
...
@@ -1189,7 +1184,7 @@ void SCHNApps::setPythonShortcut(const QString& keys, const QString& command)
if
(
keys
.
length
()
==
1
)
{
k
=
keys
[
0
].
unicode
();
k
=
keys
[
0
].
toUpper
().
unicode
();
}
else
{
...
...
@@ -1205,7 +1200,7 @@ void SCHNApps::setPythonShortcut(const QString& keys, const QString& command)
k
|=
Qt
::
KeypadModifier
;
k
<<=
32
;
QChar
c
=
keys
[
keys
.
length
()
-
1
];
QChar
c
=
keys
[
keys
.
length
()
-
1
]
.
toUpper
()
;
k
|=
c
.
unicode
();
}
...
...
SCHNApps/src/view.cpp
View file @
e56957ac
...
...
@@ -508,34 +508,12 @@ void View::keyPressEvent(QKeyEvent* event)
k
<<=
32
;
k
|=
event
->
key
();
// exec python shortcuts if exist
m_schnapps
->
execPythonShortcut
(
k
);
// exec python shortcuts if exist
and stop propagation of event !
if
(
m_schnapps
->
execPythonShortcut
(
k
))
return
;
switch
(
event
->
key
())
{
case
Qt
::
Key_Z
:
{
/* const glm::mat4& msv = getCurrentCamera()->getTransfoMatrix();
float sx = msv[0][0];
float sy = msv[1][1];
float sz = msv[2][2];
Utils::QT::inputValues(
Utils::QT::VarFloat(0.1f, 10.0f, sx, "Scale X",
Utils::QT::VarFloat(0.1f, 10.0f, sy, "Scale Y",
Utils::QT::VarFloat(0.1f, 10.0f, sz, "Scale Z"))), "Scaling view");
getCurrentCamera()->setScaling(sx, sy, sz);
QString msg = QString("Sx=") + QString::number(msv[0][0]) + QString(" / Sy=") + QString::number(msv[1][1]) + QString(" / Sz=") + QString::number(msv[2][2]);
m_schnapps->statusBar()->showMessage(msg, 2000);
QTextStream* rec = m_schnapps->pythonStreamRecorder();
if (rec)
*rec << this->getName() << " getCurrentCamera().setScaling(" << sx << ", " << sy << ", " << sz << ");" << endl;*/
}
break
;
case
Qt
::
Key_S
:
{
b_saveSnapshots
=
!
b_saveSnapshots
;
...
...
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