Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use jaspQMLControlsLib & jaspCommonLib #5436

Draft
wants to merge 8 commits into
base: useJaspQMLControlsPlugin
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Clean up
  • Loading branch information
boutinb committed Mar 7, 2024
commit 710ac112cf060e73c3a1f5ff5301426a2338fabf
1 change: 0 additions & 1 deletion Desktop/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ target_include_directories(
${PROJECT_SOURCE_DIR}/jaspCommonLib
${PROJECT_SOURCE_DIR}/jaspCommonLib/QtUtils
${PROJECT_SOURCE_DIR}/CommonData
#${PROJECT_SOURCE_DIR}/JASPQMLControlsPlugin
# ReadStat
$<$<PLATFORM_ID:Windows>:${RTOOLS_LIBREADSTAT_H}>
${LIBREADSTAT_INCLUDE_DIRS}
Expand Down
2 changes: 1 addition & 1 deletion Desktop/components/JASP/Widgets/AnalysisForms.qml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ FocusScope

ALTNavigation.enabled: true
ALTNavigation.scopeOnly: true
ALTNavigation.strategy: AssignmentStrategy.INDEXED
ALTNavigation.strategy: JASP.INDEXED
ALTNavigation.requestedPostfix: "A"

move: Transition
Expand Down
23 changes: 11 additions & 12 deletions Desktop/components/JASP/Widgets/RCommanderWindow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@

import QtQuick
import QtQuick.Window
import QtQuick.Controls
import JASP
import JASP.Widgets as JW
import JASP.Controls as JC
import QtQuick.Controls as QTC
import JASP.Widgets
import JASP.Controls

Window
{
Expand Down Expand Up @@ -108,7 +107,7 @@ Window
height: Math.max(outputWindow.implicitHeight, outputScroll.height)
width: outputScroll.width

TextArea
QTC.TextArea
{
id: outputWindow
text: rCmd.output
Expand Down Expand Up @@ -139,7 +138,7 @@ Window
}
}

JC.JASPScrollBar
JASPScrollBar
{
id: vertScroll
flickable: outputScroll
Expand Down Expand Up @@ -190,7 +189,7 @@ Window
width: codeEntry.width
height: codeEntry.implicitHeight

TextArea
QTC.TextArea
{
id: codeEntry
font: jaspTheme.fontRCode
Expand Down Expand Up @@ -228,7 +227,7 @@ Window
interactive: false
}

JC.JASPScrollBar
JASPScrollBar
{
id: codeEntryScrollbar
flickable: codeEntryFlickable;
Expand All @@ -252,7 +251,7 @@ Window
}
}

JC.RoundedButton
RoundedButton
{
id: runButton
text: qsTr("Run code")
Expand Down Expand Up @@ -291,7 +290,7 @@ Window
}
}

JC.RoundedButton
RoundedButton
{
id: addAnalysisItem
text: qsTr("Add analysis")
Expand All @@ -310,7 +309,7 @@ Window
function addAnalysis() { if(addAnalysisItem.enabled && rCmd.addAnalysis(codeEntry.text)) codeEntry.text = ""; }
}

JC.RoundedButton
RoundedButton
{
id: clearOutput
text: qsTr("Clear output")
Expand All @@ -326,7 +325,7 @@ Window
}
}

JC.DropDown
DropDown
{
id: selectModule
values: dynamicModules.loadedModulesTitles
Expand Down
4 changes: 2 additions & 2 deletions Desktop/components/JASP/Widgets/Ribbon/Ribbons.qml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
//

import QtQuick
import JASP
import JASP.Widgets
import JASP.Controls

Item
Expand Down Expand Up @@ -133,7 +133,7 @@ Item

ALTNavigation.enabled: true
ALTNavigation.scopeOnly: true
ALTNavigation.strategy: AssignmentStrategy.INDEXED
ALTNavigation.strategy: JASP.INDEXED
ALTNavigation.requestedPostfix: "M"

onDragStarted: customMenu.hide()
Expand Down
5 changes: 2 additions & 3 deletions Desktop/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,9 @@ MainWindow::MainWindow(QApplication * application) : QObject(application), _appl
makeConnections();

qmlRegisterUncreatableType<MessageForwarder> ("JASP", 1, 0, "MessageForwarder", "You can't touch this" );
qmlRegisterType<DataSetView> ("JASP", 1, 0, "DataSetView" );
qmlRegisterType<DataSetView> ("JASP.Controls", 1, 0, "DataSetView" ); // Register the real DataSetView in QML
qmlRegisterType<JaspTheme> ("JASP", 1, 0, "JaspTheme" );
qmlRegisterType<RCommander> ("JASP", 1, 0, "RCommander" );
qmlRegisterType<ResultsJsInterface> ("JASP", 1, 0, "ResultsJsInterface" );
qmlRegisterType<RCommander> ("JASP.Widgets", 1, 0, "RCommander" );
qmlRegisterUncreatableType<PlotEditor::AxisModel> ("JASP.PlotEditor", 1, 0, "AxisModel", "Can't make it");
qmlRegisterUncreatableType<PlotEditor::PlotEditorModel> ("JASP.PlotEditor", 1, 0, "PlotEditorModel", "Can't make it");

Expand Down
1 change: 1 addition & 0 deletions Desktop/qquick/datasetview.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ struct ItemContextualized
class DataSetView : public QQuickItem
{
Q_OBJECT
QML_ELEMENT

Q_PROPERTY( QAbstractItemModel * model READ model WRITE setModel NOTIFY modelChanged )
Q_PROPERTY( int itemHorizontalPadding READ itemHorizontalPadding WRITE setItemHorizontalPadding NOTIFY itemHorizontalPaddingChanged )
Expand Down
2 changes: 2 additions & 0 deletions Desktop/qquick/rcommander.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ class EngineRepresentation;
class RCommander : public QQuickItem
{
Q_OBJECT
QML_ELEMENT

Q_PROPERTY(QString output READ output WRITE setOutput NOTIFY outputChanged )
Q_PROPERTY(bool running READ running WRITE setRunning NOTIFY runningChanged )
Q_PROPERTY(bool isAnalysisCode READ isAnalysisCode NOTIFY isAnalysisCodeChanged )
Expand Down
2 changes: 1 addition & 1 deletion Docs/development/jasp-qml-style-example.qml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import JASP.Widgets 1.0
Form
{ //Opening braces should on their own line and at the exact same indent as the closing brace.

GroupBox //A subitem is indented and always has a space between the previous subitem/property/function
Group //A subitem is indented and always has a space between the previous subitem/property/function
{
title: qsTr("A nice grouping of elements") //putting qsTr(...) around string constants allows us to make the interface translatable.

Expand Down
2 changes: 1 addition & 1 deletion jaspCommonLib
Submodule jaspCommonLib updated 1 files
+1 −1 appinfo.h