Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
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
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
b45d9e02
Commit
b45d9e02
authored
1 year ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
ProjectsView w/o ui
parent
3e94ad89
No related branches found
No related tags found
1 merge request
!2064
Project view without .ui
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
GUI/View/Project/ProjectsView.cpp
+6
-9
6 additions, 9 deletions
GUI/View/Project/ProjectsView.cpp
GUI/View/Project/ProjectsView.h
+0
-6
0 additions, 6 deletions
GUI/View/Project/ProjectsView.h
GUI/View/Project/ProjectsView.ui
+0
-178
0 additions, 178 deletions
GUI/View/Project/ProjectsView.ui
with
6 additions
and
193 deletions
GUI/View/Project/ProjectsView.cpp
+
6
−
9
View file @
b45d9e02
...
@@ -17,7 +17,6 @@
...
@@ -17,7 +17,6 @@
#include
"GUI/Support/Util/Path.h"
#include
"GUI/Support/Util/Path.h"
#include
"GUI/View/Project/ProjectManager.h"
#include
"GUI/View/Project/ProjectManager.h"
#include
"GUI/View/Widget/GroupBoxes.h"
#include
"GUI/View/Widget/GroupBoxes.h"
#include
"ui_ProjectsView.h"
#include
<QCommandLinkButton>
#include
<QCommandLinkButton>
#include
<QDesktopServices>
#include
<QDesktopServices>
#include
<QDir>
#include
<QDir>
...
@@ -25,18 +24,15 @@
...
@@ -25,18 +24,15 @@
ProjectsView
::
ProjectsView
(
QWidget
*
parent
)
ProjectsView
::
ProjectsView
(
QWidget
*
parent
)
:
QWidget
(
parent
)
:
QWidget
(
parent
)
,
m_ui
(
new
Ui
::
ProjectsView
)
{
{
m_ui
->
setupUi
(
this
);
GroupBoxCollapser
::
installIntoGroupBox
(
m_ui
->
groupBox_2
);
QPalette
palette
=
this
->
palette
();
QPalette
palette
=
this
->
palette
();
palette
.
setColor
(
QPalette
::
Window
,
Qt
::
white
);
palette
.
setColor
(
QPalette
::
Window
,
Qt
::
white
);
setPalette
(
palette
);
setPalette
(
palette
);
/*
connect(m_ui->newButton, &QPushButton::clicked, projectManager(), &ProjectManager::newProject);
connect(m_ui->newButton, &QPushButton::clicked, projectManager(), &ProjectManager::newProject);
connect(m_ui->openButton, &QPushButton::clicked, [this]() { projectManager()->openProject(); });
connect(m_ui->openButton, &QPushButton::clicked, [this]() { projectManager()->openProject(); });
*/
connect
(
projectManager
(),
&
ProjectManager
::
recentListModified
,
this
,
connect
(
projectManager
(),
&
ProjectManager
::
recentListModified
,
this
,
&
ProjectsView
::
updateRecentProjectPanel
);
&
ProjectsView
::
updateRecentProjectPanel
);
...
@@ -50,8 +46,9 @@ ProjectManager* ProjectsView::projectManager()
...
@@ -50,8 +46,9 @@ ProjectManager* ProjectsView::projectManager()
void
ProjectsView
::
updateRecentProjectPanel
()
void
ProjectsView
::
updateRecentProjectPanel
()
{
{
/*
GUI::Util::Layout::clearLayout(m_ui->recentProjectsLayout);
GUI::Util::Layout::clearLayout(m_ui->recentProjectsLayout);
*/
for
(
const
auto
&
file
:
projectManager
()
->
recentProjects
())
{
for
(
const
auto
&
file
:
projectManager
()
->
recentProjects
())
{
auto
*
button
=
new
QCommandLinkButton
;
auto
*
button
=
new
QCommandLinkButton
;
button
->
setText
(
QFileInfo
(
file
).
baseName
());
button
->
setText
(
QFileInfo
(
file
).
baseName
());
...
@@ -60,7 +57,7 @@ void ProjectsView::updateRecentProjectPanel()
...
@@ -60,7 +57,7 @@ void ProjectsView::updateRecentProjectPanel()
connect
(
button
,
&
QCommandLinkButton
::
clicked
,
connect
(
button
,
&
QCommandLinkButton
::
clicked
,
[
this
,
file
]
{
projectManager
()
->
openProject
(
file
);
});
[
this
,
file
]
{
projectManager
()
->
openProject
(
file
);
});
m_ui
->
recentProjectsLayout
->
addWidget
(
button
);
//
m_ui->recentProjectsLayout->addWidget(button);
}
}
m_ui
->
recentProjectsLayout
->
addStretch
(
1
);
//
m_ui->recentProjectsLayout->addStretch(1);
}
}
This diff is collapsed.
Click to expand it.
GUI/View/Project/ProjectsView.h
+
0
−
6
View file @
b45d9e02
...
@@ -19,10 +19,6 @@
...
@@ -19,10 +19,6 @@
class
ProjectManager
;
class
ProjectManager
;
namespace
Ui
{
class
ProjectsView
;
}
class
ProjectsView
:
public
QWidget
{
class
ProjectsView
:
public
QWidget
{
Q_OBJECT
Q_OBJECT
public:
public:
...
@@ -31,8 +27,6 @@ public:
...
@@ -31,8 +27,6 @@ public:
private:
private:
ProjectManager
*
projectManager
();
ProjectManager
*
projectManager
();
void
updateRecentProjectPanel
();
void
updateRecentProjectPanel
();
Ui
::
ProjectsView
*
m_ui
;
};
};
#endif // BORNAGAIN_GUI_VIEW_PROJECT_PROJECTSVIEW_H
#endif // BORNAGAIN_GUI_VIEW_PROJECT_PROJECTSVIEW_H
This diff is collapsed.
Click to expand it.
GUI/View/Project/ProjectsView.ui
deleted
100644 → 0
+
0
−
178
View file @
3e94ad89
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
ProjectsView
</class>
<widget
class=
"QWidget"
name=
"ProjectsView"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
1064
</width>
<height>
914
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
Form
</string>
</property>
<property
name=
"autoFillBackground"
>
<bool>
true
</bool>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_5"
>
<property
name=
"spacing"
>
<number>
6
</number>
</property>
<property
name=
"leftMargin"
>
<number>
9
</number>
</property>
<property
name=
"topMargin"
>
<number>
9
</number>
</property>
<property
name=
"rightMargin"
>
<number>
9
</number>
</property>
<property
name=
"bottomMargin"
>
<number>
9
</number>
</property>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<property
name=
"spacing"
>
<number>
30
</number>
</property>
<item>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
<property
name=
"spacing"
>
<number>
7
</number>
</property>
<item>
<widget
class=
"QPushButton"
name=
"newButton"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Fixed"
vsizetype=
"Fixed"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"minimumSize"
>
<size>
<width>
140
</width>
<height>
45
</height>
</size>
</property>
<property
name=
"toolTip"
>
<string>
Create new project
</string>
</property>
<property
name=
"text"
>
<string>
New project
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QPushButton"
name=
"openButton"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Fixed"
vsizetype=
"Fixed"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"minimumSize"
>
<size>
<width>
140
</width>
<height>
45
</height>
</size>
</property>
<property
name=
"toolTip"
>
<string>
Open existing project
</string>
</property>
<property
name=
"text"
>
<string>
Open project...
</string>
</property>
</widget>
</item>
<item>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
40
</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget
class=
"QFrame"
name=
"frame"
>
<property
name=
"frameShape"
>
<enum>
QFrame::VLine
</enum>
</property>
<property
name=
"frameShadow"
>
<enum>
QFrame::Plain
</enum>
</property>
</widget>
</item>
<item>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_2"
>
<property
name=
"spacing"
>
<number>
7
</number>
</property>
<item>
<widget
class=
"QGroupBox"
name=
"groupBox_2"
>
<property
name=
"title"
>
<string>
Recent projects
</string>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_6"
>
<item>
<widget
class=
"QScrollArea"
name=
"scrollArea"
>
<property
name=
"frameShape"
>
<enum>
QFrame::NoFrame
</enum>
</property>
<property
name=
"horizontalScrollBarPolicy"
>
<enum>
Qt::ScrollBarAlwaysOff
</enum>
</property>
<property
name=
"widgetResizable"
>
<bool>
true
</bool>
</property>
<widget
class=
"QWidget"
name=
"scrollAreaWidgetContents"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
821
</width>
<height>
850
</height>
</rect>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_3"
>
<property
name=
"leftMargin"
>
<number>
0
</number>
</property>
<property
name=
"topMargin"
>
<number>
0
</number>
</property>
<property
name=
"rightMargin"
>
<number>
0
</number>
</property>
<property
name=
"bottomMargin"
>
<number>
0
</number>
</property>
<item>
<widget
class=
"QWidget"
name=
"widgetForRecentProjects"
native=
"true"
>
<layout
class=
"QVBoxLayout"
name=
"recentProjectsLayout"
/>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
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