Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
resources
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TDT4102
VS-Code
resources
Commits
adbd4269
Commit
adbd4269
authored
1 year ago
by
Joakim Hunskaar
Browse files
Options
Downloads
Patches
Plain Diff
added getters for width and height, and new function setSize
parent
f658094e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dependencies/subprojects/animationwindow/include/Widget.h
+3
-0
3 additions, 0 deletions
dependencies/subprojects/animationwindow/include/Widget.h
dependencies/subprojects/animationwindow/src/Widget.cpp
+13
-0
13 additions, 0 deletions
dependencies/subprojects/animationwindow/src/Widget.cpp
with
16 additions
and
0 deletions
dependencies/subprojects/animationwindow/include/Widget.h
+
3
−
0
View file @
adbd4269
...
...
@@ -32,5 +32,8 @@ namespace TDT4102 {
void
setCallback
(
std
::
function
<
void
(
void
)
>
callback
);
virtual
~
Widget
()
{}
void
setVisible
(
bool
isVisible
);
unsigned
int
getWidth
()
const
;
unsigned
int
getHeight
()
const
;
void
setSize
(
unsigned
int
newWidth
,
unsigned
int
newHeight
);
};
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
dependencies/subprojects/animationwindow/src/Widget.cpp
+
13
−
0
View file @
adbd4269
...
...
@@ -18,4 +18,17 @@ TDT4102::Widget::Widget(TDT4102::Point location, unsigned int widgetWidth, unsig
void
TDT4102
::
Widget
::
setVisible
(
bool
visible
)
{
isVisible
=
visible
;
}
unsigned
int
TDT4102
::
Widget
::
getWidth
()
const
{
return
width
;
}
unsigned
int
TDT4102
::
Widget
::
getHeight
()
const
{
return
height
;
}
void
TDT4102
::
Widget
::
setSize
(
unsigned
int
newWidth
,
unsigned
int
newHeight
)
{
width
=
newWidth
;
height
=
newHeight
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment