<commit_before>// Copyright (c) 2015 <NAME>.
// Uranium is released under the terms of the AGPLv3 or higher.

import QtQuick 2.1
import QtQuick.Controls 1.1
import QtQuick.Layouts 1.1

import UM 1.1 as UM

PreferencesPage
{
    id: base;

    property alias model: objectList.model;
    property alias section: objectList.section;
    property string nameRole: "name";
    property bool detailsVisible: true;

    property variant objectList: objectList;
    property variant currentItem: objectList.currentItem != null ? objectList.model.getItem(objectList.currentIndex) : null;
    property string scrollviewCaption: "";

    default property alias details: detailsPane.children;

    signal itemActivated();
    signal activateObject();
    signal addObject();
    signal removeObject();
    signal renameObject();

    property alias activateEnabled: activateButton.enabled;
    property alias addEnabled: addButton.enabled;
    property alias removeEnabled: removeButton.enabled;
    property alias renameEnabled: renameButton.enabled;

    property alias buttons: buttons.children;

    property alias addText: addButton.text;

    resetEnabled: false;

    property string activeId: ""
    property int activeIndex: -1

    Row
    {
        id: buttons;

        width: childrenRect.width;
        height: childrenRect.height;

        Button
        {
            id: activateButton;
            text: catalog.i18nc("@action:button", "Activate");
            iconName: "list-activate";
            onClicked: base.activateObject();
        }
        Button
        {
            id: addButton;
            text: catalog.i18nc("@action:button", "Add");
            iconName: "list-add";
            onClicked: base.addObject();
        }
        Button
        {
            id: removeButton;
            text: catalog.i18nc("@action:button", "Remove");
            iconName: "list-remove";
            onClicked: base.removeObject();
        }
        Button
        {
            id: renameButton;
            text: catalog.i18nc("@action:button", "Rename");
            iconName: "edit-rename";
            onClicked: base.renameObject();
        }
    }

    Item
    {
        anchors
        {
            top: buttons.bottom;
            topMargin: UM.Theme.getSize("default_margin").height;
            left: parent.left;
            right: parent.right;
            bottom: parent.bottom;
        }

        Label
        {
            id: captionLabel
            anchors<commit_msg>Remove hardcoded buttons in ManagementPage in favour of an empty row<commit_after>// Copyright (c) 2015 <NAME>.V.
// Uranium is released under the terms of the AGPLv3 or higher.

import QtQuick 2.1
import QtQuick.Controls 1.1
import QtQuick.Layouts 1.1

import UM 1.1 as UM

PreferencesPage
{
    id: base;

    property alias model: objectList.model;
    property alias section: objectList.section;
    property string nameRole: "name";
    property bool detailsVisible: true;

    property variant objectList: objectList;
    property variant currentItem: objectList.currentItem != null ? objectList.model.getItem(objectList.currentIndex) : null;
    property string scrollviewCaption: "";

    default property alias details: detailsPane.children;

    signal itemActivated();


    property alias buttons: buttonRow.children;


    resetEnabled: false;

    property string activeId: ""
    property int activeIndex: -1

    Row
    {
        id: buttonRow;

        anchors
        {
            left: parent.left
            right: parent.right
            top: parent.top
        }

        height: childrenRect.height;
    }

    Item
    {
        anchors
        {
            top: buttonRow.bottom;
            topMargin: UM.Theme.getSize("default_margin").height;
            left: parent.left;
            right: parent.right;
            bottom: parent.bottom;
        }

        Label
        {
            id: captionLabel
            anchors
{'fraction_non_alphanumeric': 0.08714321798433948, 'fraction_numerical': 0.009093205354887599, 'mean_word_length': 2.1230283911671926, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4881324', 'n_tokens_mistral': 1091, 'n_tokens_neox': 1039, 'n_words': 294}