Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • CamiTK Community Edition CamiTK Community Edition
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 19
    • Issues 19
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • CamiTKCamiTK
  • CamiTK Community EditionCamiTK Community Edition
  • Issues
  • #30
Closed
Open
Issue created Mar 27, 2018 by Emmanuel Promayon@promayoeOwner

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