Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
afd70ddc
Commit
afd70ddc
authored
Aug 02, 2012
by
Aleksei Kanash
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed SANKORE-536
Show desktop: "Add folder" make sankore freezes after virtual keyboard was opened
parent
d82fdd7d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
17 deletions
+43
-17
UBFeaturesController.cpp
src/board/UBFeaturesController.cpp
+5
-0
UBFeaturesWidget.cpp
src/gui/UBFeaturesWidget.cpp
+29
-5
UBFeaturesWidget.h
src/gui/UBFeaturesWidget.h
+4
-0
UBLibraryWidget.cpp
src/gui/UBLibraryWidget.cpp
+5
-11
UBLibraryWidget.h
src/gui/UBLibraryWidget.h
+0
-1
No files found.
src/board/UBFeaturesController.cpp
View file @
afd70ddc
...
...
@@ -424,6 +424,11 @@ void UBFeaturesController::addNewFolder(const QString &name)
{
QString
path
=
currentElement
.
getFullPath
().
toLocalFile
()
+
"/"
+
name
;
if
(
"/root"
==
currentElement
.
getFullVirtualPath
())
{
return
;
}
if
(
!
QFileInfo
(
path
).
exists
())
{
QDir
().
mkpath
(
path
);
}
...
...
src/gui/UBFeaturesWidget.cpp
View file @
afd70ddc
...
...
@@ -3,7 +3,6 @@
#include "UBFeaturesWidget.h"
#include "domain/UBAbstractWidget.h"
#include "gui/UBThumbnailWidget.h"
#include "gui/UBLibraryWidget.h"
#include "frameworks/UBFileSystemUtils.h"
#include "core/UBApplication.h"
#include "core/UBDownloadManager.h"
...
...
@@ -18,7 +17,10 @@ const int FeatureListBorderOffset = 10;
const
char
featureTypeSplitter
=
':'
;
static
const
QString
mimeSankoreFeatureTypes
=
"Sankore/featureTypes"
;
UBFeaturesWidget
::
UBFeaturesWidget
(
QWidget
*
parent
,
const
char
*
name
)
:
UBDockPaletteWidget
(
parent
),
imageGatherer
(
NULL
)
UBFeaturesWidget
::
UBFeaturesWidget
(
QWidget
*
parent
,
const
char
*
name
)
:
UBDockPaletteWidget
(
parent
)
,
imageGatherer
(
NULL
)
,
mkFolderDlg
(
NULL
)
{
setObjectName
(
name
);
...
...
@@ -162,10 +164,22 @@ void UBFeaturesWidget::currentSelected(const QModelIndex ¤t)
void
UBFeaturesWidget
::
createNewFolder
()
{
UBNewFolderDlg
dlg
;
if
(
QDialog
::
Accepted
==
dlg
.
exec
())
{
controller
->
addNewFolder
(
dlg
.
folderName
());
if
(
!
mkFolderDlg
)
{
mkFolderDlg
=
new
UBNewFolderDlg
(
this
);
connect
(
mkFolderDlg
,
SIGNAL
(
accepted
()),
this
,
SLOT
(
addFolder
()));
}
mkFolderDlg
->
setWindowFlags
(
Qt
::
WindowStaysOnTopHint
);
mkFolderDlg
->
resize
(
this
->
size
().
width
()
-
20
,
80
);
mkFolderDlg
->
move
(
5
,
this
->
size
().
height
()
-
200
);
mkFolderDlg
->
show
();
}
void
UBFeaturesWidget
::
addFolder
()
{
if
(
mkFolderDlg
)
controller
->
addNewFolder
(
mkFolderDlg
->
folderName
());
}
void
UBFeaturesWidget
::
deleteElements
(
const
UBFeaturesMimeData
*
mimeData
)
...
...
@@ -337,6 +351,16 @@ void UBFeaturesWidget::removeElementsFromFavorite()
controller
->
refreshModels
();
}
void
UBFeaturesWidget
::
resizeEvent
(
QResizeEvent
*
event
)
{
UBDockPaletteWidget
::
resizeEvent
(
event
);
if
(
mkFolderDlg
)
{
mkFolderDlg
->
resize
(
this
->
size
().
width
()
-
20
,
80
);
mkFolderDlg
->
move
(
5
,
this
->
size
().
height
()
-
200
);
}
}
void
UBFeaturesWidget
::
switchToListView
()
{
stackedWidget
->
setCurrentIndex
(
ID_LISTVIEW
);
...
...
src/gui/UBFeaturesWidget.h
View file @
afd70ddc
...
...
@@ -21,6 +21,7 @@
#include "api/UBWidgetUniboardAPI.h"
#include "UBFeaturesActionBar.h"
#include "UBRubberBand.h"
#include "gui/UBLibraryWidget.h"
#define THUMBNAIL_WIDTH 400
#define ID_LISTVIEW 0
...
...
@@ -71,6 +72,7 @@ private slots:
void
currentSelected
(
const
QModelIndex
&
);
void
searchStarted
(
const
QString
&
);
void
createNewFolder
();
void
addFolder
();
void
deleteElements
(
const
UBFeaturesMimeData
*
);
void
addToFavorite
(
const
UBFeaturesMimeData
*
);
void
removeFromFavorite
(
const
UBFeaturesMimeData
*
);
...
...
@@ -82,6 +84,7 @@ private slots:
void
rescanModel
();
private
:
void
resizeEvent
(
QResizeEvent
*
event
);
void
switchToListView
();
void
switchToProperties
();
void
switchToWebView
();
...
...
@@ -97,6 +100,7 @@ private:
QStackedWidget
*
stackedWidget
;
int
currentStackedWidget
;
UBDownloadHttpFile
*
imageGatherer
;
UBNewFolderDlg
*
mkFolderDlg
;
};
...
...
src/gui/UBLibraryWidget.cpp
View file @
afd70ddc
...
...
@@ -547,7 +547,6 @@ UBNewFolderDlg::UBNewFolderDlg(QWidget *parent, const char *name):QDialog(parent
,
mpAddButton
(
NULL
)
,
mpCancelButton
(
NULL
)
,
mpLayout
(
NULL
)
,
mpHLayout
(
NULL
)
{
setObjectName
(
name
);
setWindowTitle
(
tr
(
"Add new folder"
));
...
...
@@ -562,15 +561,14 @@ UBNewFolderDlg::UBNewFolderDlg(QWidget *parent, const char *name):QDialog(parent
mpButtons
=
new
QDialogButtonBox
(
Qt
::
Horizontal
,
this
);
mpLayout
=
new
QVBoxLayout
(
this
);
mpHLayout
=
new
QHBoxLayout
(
0
);
setLayout
(
mpLayout
);
mpLayout
->
addLayout
(
mpHLayout
,
0
);
mp
HLayout
->
addWidget
(
mpLabel
,
0
);
mp
HLayout
->
addWidget
(
mpLineEdit
,
1
);
mp
Layout
->
addWidget
(
mpLabel
,
1
);
mp
Layout
->
addWidget
(
mpLineEdit
);
mpButtons
->
addButton
(
mpAddButton
,
QDialogButtonBox
::
ActionRole
);
mpButtons
->
addButton
(
mpCancelButton
,
QDialogButtonBox
::
ActionRole
);
mpLayout
->
addWidget
(
mpButtons
);
mpLayout
->
addWidget
(
mpButtons
,
1
,
Qt
::
AlignJustify
);
connect
(
mpAddButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
accept
()));
connect
(
mpCancelButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
reject
()));
...
...
@@ -612,11 +610,7 @@ UBNewFolderDlg::~UBNewFolderDlg()
delete
mpLabel
;
mpLabel
=
NULL
;
}
if
(
NULL
!=
mpHLayout
)
{
delete
mpHLayout
;
mpHLayout
=
NULL
;
}
if
(
NULL
!=
mpLayout
)
{
delete
mpLayout
;
...
...
src/gui/UBLibraryWidget.h
View file @
afd70ddc
...
...
@@ -119,7 +119,6 @@ private:
QPushButton
*
mpAddButton
;
QPushButton
*
mpCancelButton
;
QVBoxLayout
*
mpLayout
;
QHBoxLayout
*
mpHLayout
;
};
#endif // UBLIBRARYWIDGET_H
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