Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jami-client-windows
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
savoirfairelinux
jami-client-windows
Commits
74e4b8bc
Commit
74e4b8bc
authored
10 years ago
by
Edric Milaret
Browse files
Options
Downloads
Patches
Plain Diff
UI: wait screen for setup wizard
Refs #73052 Change-Id: Ib53a79cbd4104b21aeaad570f89c57979ecb243d
parent
12353822
No related branches found
No related tags found
No related merge requests found
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
images/spinner.gif
+0
-0
0 additions, 0 deletions
images/spinner.gif
ressources.qrc
+1
-0
1 addition, 0 deletions
ressources.qrc
wizarddialog.cpp
+28
-15
28 additions, 15 deletions
wizarddialog.cpp
wizarddialog.h
+5
-2
5 additions, 2 deletions
wizarddialog.h
wizarddialog.ui
+14
-2
14 additions, 2 deletions
wizarddialog.ui
with
48 additions
and
19 deletions
images/spinner.gif
0 → 100644
+
0
−
0
View file @
74e4b8bc
10.5 KiB
This diff is collapsed.
Click to expand it.
ressources.qrc
+
1
−
0
View file @
74e4b8bc
...
@@ -21,5 +21,6 @@
...
@@ -21,5 +21,6 @@
<file>images/sort-variant.png</file>
<file>images/sort-variant.png</file>
<file>images/arrow-down.png</file>
<file>images/arrow-down.png</file>
<file>images/arrow-up.png</file>
<file>images/arrow-up.png</file>
<file>images/spinner.gif</file>
</qresource>
</qresource>
</RCC>
</RCC>
This diff is collapsed.
Click to expand it.
wizarddialog.cpp
+
28
−
15
View file @
74e4b8bc
...
@@ -19,7 +19,10 @@
...
@@ -19,7 +19,10 @@
#include
"wizarddialog.h"
#include
"wizarddialog.h"
#include
"ui_wizarddialog.h"
#include
"ui_wizarddialog.h"
#include
<QMovie>
#include
"accountmodel.h"
#include
"accountmodel.h"
#include
"account.h"
#include
"utils.h"
#include
"utils.h"
...
@@ -33,6 +36,14 @@ WizardDialog::WizardDialog(QWidget *parent) :
...
@@ -33,6 +36,14 @@ WizardDialog::WizardDialog(QWidget *parent) :
this
->
setWindowFlags
(
Qt
::
FramelessWindowHint
);
this
->
setWindowFlags
(
Qt
::
FramelessWindowHint
);
this
->
setFixedSize
(
this
->
width
(),
this
->
height
());
this
->
setFixedSize
(
this
->
width
(),
this
->
height
());
ui
->
buttonBox
->
setEnabled
(
false
);
ui
->
buttonBox
->
setEnabled
(
false
);
ui
->
spinnerLabel
->
hide
();
QMovie
*
movie
=
new
QMovie
(
":images/spinner.gif"
);
if
(
movie
->
isValid
())
{
ui
->
spinnerLabel
->
setMovie
(
movie
);
movie
->
start
();
}
}
}
WizardDialog
::~
WizardDialog
()
WizardDialog
::~
WizardDialog
()
...
@@ -43,28 +54,30 @@ WizardDialog::~WizardDialog()
...
@@ -43,28 +54,30 @@ WizardDialog::~WizardDialog()
void
void
WizardDialog
::
accept
()
WizardDialog
::
accept
()
{
{
ui
->
label
->
setText
(
"Working..."
);
//ui->spinnerLabel->show();
ui
->
label
->
setText
(
"Please wait while we create your account."
);
ui
->
buttonBox
->
setEnabled
(
false
);
ui
->
buttonBox
->
setEnabled
(
false
);
ui
->
usernameEdit
->
setEnabled
(
false
);
ui
->
usernameEdit
->
setEnabled
(
false
);
QtConcurrent
::
run
(
this
,
&
WizardDialog
::
setup
).
waitForFinished
();
repaint
();
}
void
Utils
::
CreateStartupLink
();
WizardDialog
::
endSetup
()
{
QDialog
::
accept
();
}
void
WizardDialog
::
setup
()
{
auto
account
=
AccountModel
::
instance
()
->
add
(
ui
->
usernameEdit
->
text
(),
Account
::
Protocol
::
RING
);
auto
account
=
AccountModel
::
instance
()
->
add
(
ui
->
usernameEdit
->
text
(),
Account
::
Protocol
::
RING
);
AccountModel
::
instance
()
->
ip2ip
()
->
setRingtonePath
(
Utils
::
GetRingtonePath
());
AccountModel
::
instance
()
->
ip2ip
()
->
setRingtonePath
(
Utils
::
GetRingtonePath
());
account
->
setRingtonePath
(
Utils
::
GetRingtonePath
());
account
->
setRingtonePath
(
Utils
::
GetRingtonePath
());
AccountModel
::
instance
()
->
save
();
account
->
setUpnpEnabled
(
true
);
Utils
::
CreateStartupLink
();
endSetup
();
connect
(
account
,
SIGNAL
(
changed
(
Account
*
)),
this
,
SLOT
(
endSetup
(
Account
*
)));
account
->
performAction
(
Account
::
EditAction
::
SAVE
);
}
void
WizardDialog
::
endSetup
(
Account
*
a
)
{
Q_UNUSED
(
a
)
QDialog
::
accept
();
}
}
void
void
...
...
This diff is collapsed.
Click to expand it.
wizarddialog.h
+
5
−
2
View file @
74e4b8bc
...
@@ -22,6 +22,8 @@
...
@@ -22,6 +22,8 @@
#include
<QDialog>
#include
<QDialog>
#include
<QtConcurrent/QtConcurrent>
#include
<QtConcurrent/QtConcurrent>
#include
"account.h"
namespace
Ui
{
namespace
Ui
{
class
WizardDialog
;
class
WizardDialog
;
}
}
...
@@ -38,13 +40,14 @@ private slots:
...
@@ -38,13 +40,14 @@ private slots:
void
on_usernameEdit_textChanged
(
const
QString
&
arg1
);
void
on_usernameEdit_textChanged
(
const
QString
&
arg1
);
void
accept
();
void
accept
();
void
endSetup
();
private:
private:
Ui
::
WizardDialog
*
ui
;
Ui
::
WizardDialog
*
ui
;
private:
private:
void
setup
();
void
setup
();
private
slots
:
void
endSetup
(
Account
*
a
);
};
};
#endif // WIZARDDIALOG_H
#endif // WIZARDDIALOG_H
This diff is collapsed.
Click to expand it.
wizarddialog.ui
+
14
−
2
View file @
74e4b8bc
...
@@ -435,7 +435,17 @@
...
@@ -435,7 +435,17 @@
<string/>
<string/>
</property>
</property>
<property
name=
"pixmap"
>
<property
name=
"pixmap"
>
<pixmap>
:/images/logo-ring-standard-coul.png
</pixmap>
<pixmap
resource=
"ressources.qrc"
>
:/images/logo-ring-standard-coul.png
</pixmap>
</property>
<property
name=
"scaledContents"
>
<bool>
true
</bool>
</property>
</widget>
</item>
<item
alignment=
"Qt::AlignHCenter"
>
<widget
class=
"QLabel"
name=
"spinnerLabel"
>
<property
name=
"text"
>
<string/>
</property>
</property>
<property
name=
"scaledContents"
>
<property
name=
"scaledContents"
>
<bool>
true
</bool>
<bool>
true
</bool>
...
@@ -471,7 +481,9 @@
...
@@ -471,7 +481,9 @@
</item>
</item>
</layout>
</layout>
</widget>
</widget>
<resources/>
<resources>
<include
location=
"ressources.qrc"
/>
</resources>
<connections>
<connections>
<connection>
<connection>
<sender>
buttonBox
</sender>
<sender>
buttonBox
</sender>
...
...
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