Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Register
Sign in
Toggle navigation
Menu
Андрей Никулин
editor
Commits
fc7c24ad
Commit
fc7c24ad
authored
4 years ago
by
Андрей Никулин
Browse files
Options
Download
Patches
Plain Diff
Upload New File
parent
885addb7
master
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dialog.cpp
+41
-0
dialog.cpp
with
41 additions
and
0 deletions
+41
-0
dialog.cpp
0 → 100644
+
41
−
0
View file @
fc7c24ad
#include
"dialog.h"
#include
"ui_dialog.h"
Dialog
::
Dialog
(
QWidget
*
parent
,
QStringList
&
list
,
QVector
<
Editor
::
Tab
>&
tabs
)
:
QDialog
(
parent
),
ui
(
new
Ui
::
Dialog
)
{
ui
->
setupUi
(
this
);
ui
->
m_table
->
setRowCount
(
tabs
.
size
());
ui
->
m_table
->
setColumnCount
(
2
);
QHeaderView
*
header
=
ui
->
m_table
->
horizontalHeader
();
header
->
setSectionResizeMode
(
QHeaderView
::
Stretch
);
for
(
int
i
=
0
;
i
<
tabs
.
size
();
i
++
)
{
if
(
tabs
[
i
].
m_file
!=
nullptr
)
ui
->
m_table
->
setItem
(
i
,
1
,
new
QTableWidgetItem
(
QFileInfo
(
*
tabs
[
i
].
m_file
).
absolutePath
()));
ui
->
m_table
->
setItem
(
i
,
0
,
new
QTableWidgetItem
(
list
.
at
(
i
)));
}
connect
(
ui
->
m_buttons
,
SIGNAL
(
accepted
()),
SLOT
(
slotSave
()));
connect
(
ui
->
m_buttons
,
SIGNAL
(
rejected
()),
SLOT
(
slotDiscard
()));
}
void
Dialog
::
slotSave
()
{
emit
signalSave
();
this
->
close
();
}
void
Dialog
::
slotDiscard
()
{
emit
signalDiscard
();
this
->
close
();
}
Dialog
::~
Dialog
()
{
delete
ui
;
}
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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
Menu
Explore
Projects
Groups
Topics
Snippets