Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • CamiTK Community Edition CamiTK Community Edition
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 17
    • Issues 17
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 3
    • Merge requests 3
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • CamiTK
  • CamiTK Community EditionCamiTK Community Edition
  • Issues
  • #30

Closed
Open
Created Mar 27, 2018 by Emmanuel Promayon@promayoeOwner0 of 5 tasks completed0/5 tasks

Easy action GUI/widget for specific properties

As a CEP developer
I would like to easily add/easily manage specific high-level properties/parameters to my action
So that my action source code is only focusing on the processing

Description / Overview

This story is about having an easy way to declare and manage specific high level properties in actions.

In an Action derived class it should be easy to add properties (and automatically create their GUI) for the following:

  • QStringList → dropdown list
  • list of instanciated/available components (with possible restriction to components of a given type) → GUI = dropdown list
  • list of MedicalImageViewer viewers → GUI = dropdown list
  • button (name + icon + tristate or not + double state or not + slot to call) → GUI = QPushButton automatically added to the default ActionWidget that calls the slot.

Therefore it should be possible to directly write something like:

// MyAction constructor
MyAction::MyAction(..) : .. {
   ...
   QStringList myList;
   myList << "A" << "B" << "C";
   addParameters(new Property(tr("List of strings"), myList, ...);

   Property *listOfComp = new Property(tr("Image 1", Property::LIST_OF_COMPONENT, ...);
   listOfComp->setAttribute("componentName", "ImageComponent");
   addParameters(listOfComp);

   addParameters(new Property(tr("Viewer to show"), Property::LIST_OF_MEDICAL_VIEWERS, ...);

   Property *pushMeProp = new Property(tr("Push Me"), SLOT(pushMeSlot()), ...);
   pushMeProp->setAttribute("checkable",true);
   pushMeProp->setAttribute("icon",QIcon(":/images/myIcon.png"));
   addParameters(pushMeProp);
   ...
}

Acceptance test

  • there is a tutorial showing how to use these highlevel
  • the Action and Property API documentation is updated
  • the wizard allow for the creation of such properties
  • the CEP generator is aware of these properties and there are new tests in the cepgenerator/testing/cepgernerator-test.sh
  • any action in CamiTK CE that manages this type of high-level properties otherwise should use the new way
Edited Jun 12, 2018 by Emmanuel Promayon
Assignee
Assign to
Time tracking