Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nheko
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Nheko Reborn
nheko
Commits
b8b31cb3
Commit
b8b31cb3
authored
3 years ago
by
Malte E
Browse files
Options
Downloads
Patches
Plain Diff
CreateRoom dialog in QML
parent
9bac429e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#2885
passed
3 years ago
Stage: build
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
resources/qml/RoomList.qml
+12
-1
12 additions, 1 deletion
resources/qml/RoomList.qml
resources/qml/dialogs/CreateRoom.qml
+81
-0
81 additions, 0 deletions
resources/qml/dialogs/CreateRoom.qml
resources/res.qrc
+1
-0
1 addition, 0 deletions
resources/res.qrc
with
94 additions
and
1 deletion
resources/qml/RoomList.qml
+
12
−
1
View file @
b8b31cb3
...
@@ -26,6 +26,13 @@ Page {
...
@@ -26,6 +26,13 @@ Page {
}
}
Component
{
id
:
createRoomComponent
CreateRoom
{
}
}
ListView
{
ListView
{
id
:
roomlist
id
:
roomlist
...
@@ -648,7 +655,11 @@ Page {
...
@@ -648,7 +655,11 @@ Page {
Platform.MenuItem
{
Platform.MenuItem
{
text
:
qsTr
(
"
Create a new room
"
)
text
:
qsTr
(
"
Create a new room
"
)
onTriggered
:
Nheko
.
openCreateRoomDialog
()
onTriggered
:
{
var
createRoom
=
createRoomComponent
.
createObject
(
timelineRoot
);
createRoom
.
show
();
timelineRoot
.
destroyOnClose
(
createRoom
);
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
resources/qml/dialogs/CreateRoom.qml
0 → 100644
+
81
−
0
View file @
b8b31cb3
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later
import
"
..
"
import
QtQuick
2.15
import
QtQuick
.
Window
2.13
import
QtQuick
.
Layouts
1.3
import
QtQuick
.
Controls
2.3
import
im
.
nheko
1.0
ApplicationWindow
{
id
:
createRoomRoot
title
:
qsTr
(
"
Create Room
"
)
minimumWidth
:
rootLayout
.
implicitWidth
+
2
*
rootLayout
.
anchors
.
margins
minimumHeight
:
rootLayout
.
implicitHeight
+
footer
.
implicitHeight
+
2
*
rootLayout
.
anchors
.
margins
GridLayout
{
id
:
rootLayout
anchors.fill
:
parent
anchors.margins
:
Nheko
.
paddingSmall
columns
:
2
MatrixTextField
{
id
:
newRoomName
Layout.columnSpan
:
2
Layout.fillWidth
:
true
focus
:
true
placeholderText
:
qsTr
(
"
Name
"
)
}
MatrixTextField
{
id
:
newRoomTopic
Layout.columnSpan
:
2
Layout.fillWidth
:
true
focus
:
true
placeholderText
:
qsTr
(
"
Topic
"
)
}
MatrixTextField
{
id
:
newRoomAlias
Layout.columnSpan
:
2
Layout.fillWidth
:
true
focus
:
true
placeholderText
:
qsTr
(
"
Alias
"
)
}
Label
{
Layout.preferredWidth
:
implicitWidth
Layout.alignment
:
Qt
.
AlignLeft
text
:
qsTr
(
"
Room Visibility
"
)
color
:
Nheko
.
colors
.
text
}
ComboBox
{
id
:
newRoomVisibility
Layout.preferredWidth
:
implicitWidth
Layout.alignment
:
Qt
.
AlignRight
model
:
[
qsTr
(
"
Private
"
),
qsTr
(
"
Public
"
)]
}
Label
{
Layout.preferredWidth
:
implicitWidth
Layout.alignment
:
Qt
.
AlignLeft
text
:
qsTr
(
"
Room Preset
"
)
color
:
Nheko
.
colors
.
text
}
ComboBox
{
id
:
newRoomPreset
Layout.preferredWidth
:
implicitWidth
Layout.alignment
:
Qt
.
AlignRight
model
:
[
qsTr
(
"
Private Chat
"
),
qsTr
(
"
Public Chat
"
),
qsTr
(
"
Trusted Private Chat
"
)]
}
}
footer
:
DialogButtonBox
{
standardButtons
:
DialogButtonBox
.
Cancel
Button
{
text
:
"
CreateRoom
"
DialogButtonBox.buttonRole
:
DialogButtonBox
.
AcceptRole
}
onRejected
:
createRoomRoot
.
close
();
//onAccepted: createRoom(newRoomName.text, newRoomTopic.text, newRoomAlias.text, newRoomVisibility.index, newRoomPreset.index)
}
}
This diff is collapsed.
Click to expand it.
resources/res.qrc
+
1
−
0
View file @
b8b31cb3
...
@@ -143,6 +143,7 @@
...
@@ -143,6 +143,7 @@
<file>qml/device-verification/NewVerificationRequest.qml</file>
<file>qml/device-verification/NewVerificationRequest.qml</file>
<file>qml/device-verification/Success.qml</file>
<file>qml/device-verification/Success.qml</file>
<file>qml/device-verification/Waiting.qml</file>
<file>qml/device-verification/Waiting.qml</file>
<file>qml/dialogs/CreateRoom.qml</file>
<file>qml/dialogs/ImageOverlay.qml</file>
<file>qml/dialogs/ImageOverlay.qml</file>
<file>qml/dialogs/ImagePackEditorDialog.qml</file>
<file>qml/dialogs/ImagePackEditorDialog.qml</file>
<file>qml/dialogs/ImagePackSettingsDialog.qml</file>
<file>qml/dialogs/ImagePackSettingsDialog.qml</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