Commit 0b7d8942 authored by Cole Neubauer's avatar Cole Neubauer
Browse files

The Text color of IPCE project items has now been explicitely changed to black Fixes #5095

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/branches/ipce@7952 41f8697f-d340-4b68-9986-7bafba869bb8
parent 85832d65
Loading
Loading
Loading
Loading
+48 −1
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ namespace Isis {
   * Constructs an item without children, a parent, or a model.
   */
  ProjectItem::ProjectItem() : QStandardItem() {
    setTextColor(Qt::black);
    setEditable(false);
  }

@@ -57,6 +58,7 @@ namespace Isis {
   * @param[in] item (ProjectItem *) The item to copy.
   */
  ProjectItem::ProjectItem(ProjectItem *item) {
    setTextColor(Qt::black);
    item->setEditable(false);
    setProjectItem(item);
    for (int i=0; i < item->rowCount(); i++) {
@@ -73,6 +75,7 @@ namespace Isis {
   * @param[in] filename A icon to display next to the treetext
   */
  ProjectItem::ProjectItem(FileItemQsp filename, QString treeText, QIcon icon) {
    setTextColor(Qt::black);
    setEditable(false);
    setData(QVariant::fromValue<FileItemQsp>(filename));
    setText(treeText);
@@ -89,6 +92,7 @@ namespace Isis {
   */
  ProjectItem::ProjectItem(FileItemQsp filename, QString treeText, QString toolTipText,
                           QIcon icon) {
    setTextColor(Qt::black);
    setEditable(false);
    setData(QVariant::fromValue<FileItemQsp>(filename));
    setText(treeText);
@@ -104,6 +108,7 @@ namespace Isis {
   *                                          construct from.
   */
  ProjectItem::ProjectItem(BundleResults bundleResults) {
    setTextColor(Qt::black);
    setEditable(false);
    setBundleResults(bundleResults);
  }
@@ -116,6 +121,7 @@ namespace Isis {
   *                                               construct from.
   */
  ProjectItem::ProjectItem(BundleSettingsQsp bundleSettings) {
    setTextColor(Qt::black);
    setEditable(false);
    setBundleSettings(bundleSettings);
  }
@@ -128,6 +134,7 @@ namespace Isis {
   *                                                      to construct from.
   */
  ProjectItem::ProjectItem(BundleSolutionInfo *bundleSolutionInfo) {
    setTextColor(Qt::black);
    setEditable(false);
    setBundleSolutionInfo(bundleSolutionInfo);

@@ -147,6 +154,7 @@ namespace Isis {
   * @param[in] control (Control *) The Control to construct from.
   */
  ProjectItem::ProjectItem(Control *control) {
    setTextColor(Qt::black);
    setEditable(false);
    setControl(control);
  }
@@ -158,6 +166,7 @@ namespace Isis {
   * @param[in] controlList (ControlList *) The ControlList to construct from.
   */
  ProjectItem::ProjectItem(ControlList *controlList) {
    setTextColor(Qt::black);
    setEditable(false);
    setControlList(controlList);
    foreach (Control *control, *controlList) {
@@ -172,6 +181,7 @@ namespace Isis {
   * @param[in] controls (QList<ControlList *>) The list to construct from.
   */
  ProjectItem::ProjectItem(QList<ControlList *> controls) {
    setTextColor(Qt::black);
    setEditable(false);
    setControls();
    foreach (ControlList *controlList, controls) {
@@ -187,6 +197,7 @@ namespace Isis {
   *                                                  construct from.
   */
  ProjectItem::ProjectItem(CorrelationMatrix correlationMatrix) {
    setTextColor(Qt::black);
    setEditable(false);
    setCorrelationMatrix(correlationMatrix);
  }
@@ -198,6 +209,7 @@ namespace Isis {
   * @param[in] image (Image *) The Image to construct from.
   */
  ProjectItem::ProjectItem(Image *image) {
    setTextColor(Qt::black);
    setEditable(true);
    setImage(image);
  }
@@ -209,6 +221,7 @@ namespace Isis {
   * @param[in] imageList (ImageList *) The ImageList to construct from.
   */
  ProjectItem::ProjectItem(ImageList *imageList) {
    setTextColor(Qt::black);
    setEditable(true);
    setImageList(imageList);
    foreach (Image *image, *imageList) {
@@ -223,6 +236,7 @@ namespace Isis {
   * @param[in] images (QList<ImageList *>) The list to construct from.
   */
  ProjectItem::ProjectItem(QList<ImageList *> images) {
    setTextColor(Qt::black);
    setEditable(false);
    setImages();
    foreach (ImageList *imageList, images) {
@@ -236,7 +250,8 @@ namespace Isis {
   *
   * @param[in] shape (Shape *) The Shape to construct from.
   */
  ProjectItem::ProjectItem(Shape *shape) {
  ProjectItem::ProjectItem(Shape *shape) {\
    setTextColor(Qt::black);
    setEditable(false);
    setShape(shape);
  }
@@ -248,6 +263,7 @@ namespace Isis {
   * @param[in] shapeList (ShapeList *) The ShapeList to construct from.
   */
  ProjectItem::ProjectItem(ShapeList *shapeList) {
    setTextColor(Qt::black);
    setEditable(false);
    setShapeList(shapeList);
    foreach (Shape *shape, *shapeList) {
@@ -262,6 +278,7 @@ namespace Isis {
   * @param[in] shapes (QList<ShapeList *>) The list to construct from.
   */
  ProjectItem::ProjectItem(QList<ShapeList *> shapes) {
    setTextColor(Qt::black);
    setEditable(false);
    setShapes();
    foreach (ShapeList *shapeList, shapes) {
@@ -276,6 +293,7 @@ namespace Isis {
   * @param[in] guiCamera (GuiCameraQsp) The camera to construct from.
   */
  ProjectItem::ProjectItem(GuiCameraQsp guiCamera) {
    setTextColor(Qt::black);
    setEditable(false);
    setGuiCamera(guiCamera);
  }
@@ -288,6 +306,7 @@ namespace Isis {
   *                                            construct from.
   */
  ProjectItem::ProjectItem(GuiCameraList *guiCameraList) {
    setTextColor(Qt::black);
    setEditable(false);
    setGuiCameraList();
    foreach (GuiCameraQsp guiCamera, *guiCameraList) {
@@ -302,6 +321,7 @@ namespace Isis {
   * @param[in] project (Project *) The Project to construct from.
   */
  ProjectItem::ProjectItem(Project *project) {
    setTextColor(Qt::black);
    setProject(project);
//  qDebug()<<"ProjectItem::ProjectItem(Project *project)  rowCount() = "<<rowCount();
    appendRow( new ProjectItem( project->controls() ) );
@@ -333,6 +353,7 @@ namespace Isis {
   *                                                  from.
   */
  ProjectItem::ProjectItem(QList<BundleSolutionInfo *> results) {
    setTextColor(Qt::black);
    setEditable(false);
    setResults();
    foreach (BundleSolutionInfo *bundleSolutionInfo, results) {
@@ -347,6 +368,7 @@ namespace Isis {
   * @param[in] targetBody (TargetBodyQsp) The target body to construct from.
   */
  ProjectItem::ProjectItem(TargetBodyQsp targetBody) {
    setTextColor(Qt::black);
    setEditable(false);
    setTargetBody(targetBody);
  }
@@ -358,6 +380,7 @@ namespace Isis {
   * @param[in] targetBodyList (TargetBodyList *) The list to construct from.
   */
  ProjectItem::ProjectItem(TargetBodyList *targetBodyList) {
    setTextColor(Qt::black);
    setEditable(false);
    setTargetBodyList();
    foreach (TargetBodyQsp targetBody, *targetBodyList) {
@@ -674,6 +697,7 @@ namespace Isis {
   * @param[in] item (ProjectItem *) The other item.
   */
  void ProjectItem::setProjectItem(ProjectItem *item) {
    setTextColor(Qt::black);
    setText( item->text() );
    setIcon( item->icon() );
    setData( item->data() );
@@ -687,6 +711,7 @@ namespace Isis {
   * @param[in] bundleResults (BundleResults) The BundleResults.
   */
  void ProjectItem::setBundleResults(BundleResults bundleResults) {
    setTextColor(Qt::black);
    setText("Statistics");
    setIcon( QIcon(":results") );
    setData( QVariant::fromValue<BundleResults>(bundleResults) );
@@ -699,6 +724,7 @@ namespace Isis {
   * @param[in] bundleSettings (BundleSettingsQsp) The BundleSettingsQsp.
   */
  void ProjectItem::setBundleSettings(BundleSettingsQsp bundleSettings) {
    setTextColor(Qt::black);
    setText("Settings");
    setIcon( QIcon(":settings") );
    setData( QVariant::fromValue<BundleSettingsQsp>(bundleSettings) );
@@ -711,6 +737,7 @@ namespace Isis {
   * @param[in] bundleSolutionInfo (BundleSolutionInfo *) The BundleSolutionInfo.
   */
  void ProjectItem::setBundleSolutionInfo(BundleSolutionInfo *bundleSolutionInfo) {
    setTextColor(Qt::black);
    if (bundleSolutionInfo->name() != "") {
      setText( bundleSolutionInfo->name() );
    }
@@ -728,6 +755,7 @@ namespace Isis {
   * @param[in] image (Image *) The Image.
   */
  void ProjectItem::setImage(Image *image) {
    setTextColor(Qt::black);
    setText( QFileInfo( image->fileName() ).fileName() );
    setIcon( QIcon(":pictures") );
    setData( QVariant::fromValue<Image *>(image) );
@@ -740,6 +768,7 @@ namespace Isis {
   * @param[in] imageList (ImageList *) The ImageList.
   */
  void ProjectItem::setImageList(ImageList *imageList) {
    setTextColor(Qt::black);
    if (imageList->name() != "") {
      setText( imageList->name() );
    }
@@ -755,6 +784,7 @@ namespace Isis {
   * Sets the text, icon, and data corresponding to a list of ImageList.
   */
  void ProjectItem::setImages() {
    setTextColor(Qt::black);
    setText("Images");
    setIcon( QIcon(":pictures") );
    setData( QVariant() );
@@ -767,6 +797,7 @@ namespace Isis {
   * @param[in] shape (Shape *) The Shape.
   */
  void ProjectItem::setShape(Shape *shape) {
    setTextColor(Qt::black);
    setText( QFileInfo( shape->fileName() ).fileName() );
    setIcon( QIcon(":dem") );
    setData( QVariant::fromValue<Shape *>(shape) );
@@ -779,6 +810,7 @@ namespace Isis {
   * @param[in] shapeList (ShapeList *) The ShapeList.
   */
  void ProjectItem::setShapeList(ShapeList *shapeList) {
    setTextColor(Qt::black);
    if (shapeList->name() != "") {
      setText( shapeList->name() );
    }
@@ -794,6 +826,7 @@ namespace Isis {
   * Sets the text, icon, and data corresponding to a list of ShapeList.
   */
  void ProjectItem::setShapes() {
    setTextColor(Qt::black);
    setText("Shapes");
    setIcon( QIcon(":dem") );
    setData( QVariant() );
@@ -806,6 +839,7 @@ namespace Isis {
   * @param[in] control (Control *) The Control.
   */
  void ProjectItem::setControl(Control *control) {
    setTextColor(Qt::black);
    setText( QFileInfo( control->fileName() ).fileName() );
    setIcon( QIcon(":pointReg") );
    setData( QVariant::fromValue<Control *>(control) );
@@ -818,6 +852,7 @@ namespace Isis {
   * @param[in] controlList (ControlList *) The ControlList.
   */
  void ProjectItem::setControlList(ControlList *controlList) {
    setTextColor(Qt::black);
    setText( controlList->name() );
    setIcon( QIcon(":folder") );
    setData( QVariant::fromValue<ControlList *>(controlList) );
@@ -828,6 +863,7 @@ namespace Isis {
   * Sets the text, icon, and data corresponding to a list of ControlList.
   */
  void ProjectItem::setControls() {
    setTextColor(Qt::black);
    setText("Control Networks");
    setIcon( QIcon(":layers") );
    setData( QVariant() );
@@ -840,6 +876,7 @@ namespace Isis {
   * @param[in] correlationMatrix (CorrelationMatrix) The CorrelationMatrix.
   */
  void ProjectItem::setCorrelationMatrix(CorrelationMatrix correlationMatrix) {
    setTextColor(Qt::black);
    setText("Correlation Matrix");
    setIcon( QIcon(":pointReg") );
    setData( QVariant::fromValue<CorrelationMatrix>(correlationMatrix) );
@@ -857,6 +894,7 @@ namespace Isis {
   *               to appear on the command line.  Fixes #3982.
   */
  void ProjectItem::setProject(Project *project) {
    setTextColor(Qt::black);
    setText( project->name() );
    setIcon( QIcon(":data-management") );
    setData( QVariant::fromValue<Project *>(project) );
@@ -867,6 +905,7 @@ namespace Isis {
   * Sets the text, icon, and data corresponding to a list of Results.
   */
  void ProjectItem::setResults() {
    setTextColor(Qt::black);
    setText("Results");
    setIcon( QIcon(":results") );
    setData( QVariant() );
@@ -879,6 +918,7 @@ namespace Isis {
   * @param[in] guiCamera (GuiCameraQsp) The GuiCameraQsp.
   */
  void ProjectItem::setGuiCamera(GuiCameraQsp guiCamera) {
    setTextColor(Qt::black);
    setText( guiCamera->displayProperties()->displayName() );
    setIcon( QIcon(":camera") );
    setData( QVariant::fromValue<GuiCameraQsp>(guiCamera) );
@@ -889,6 +929,7 @@ namespace Isis {
   * Sets the text, icon, and data corresponding to a GuiCameraQsp.
   */
  void ProjectItem::setGuiCameraList() {
    setTextColor(Qt::black);
    setText("Sensors");
    setIcon( QIcon(":camera") );
    setData( QVariant() );
@@ -899,6 +940,7 @@ namespace Isis {
   * Sets the text, icon, and data corresponding to SpaceCraft.
   */
  void ProjectItem::setSpacecraft() {
    setTextColor(Qt::black);
    setText("Spacecraft");
    setIcon( QIcon(":spacecraft") );
    setData( QVariant() );
@@ -911,6 +953,7 @@ namespace Isis {
   * @param targetBody Target body to set data from
   */
  void ProjectItem::setTargetBody(TargetBodyQsp targetBody) {
    setTextColor(Qt::black);
    setText( targetBody->displayProperties()->displayName() );
    if (targetBody->displayProperties()->displayName() == "MOON")
      setIcon( QIcon(":moon") );
@@ -930,6 +973,7 @@ namespace Isis {
   * Sets the text, icon, and data corresponding to a TargetBodyList.
   */
  void ProjectItem::setTargetBodyList() {
    setTextColor(Qt::black);
    setText("Target Body");
    setIcon( QIcon(":moonPhase") );
    setData( QVariant() );
@@ -971,6 +1015,7 @@ namespace Isis {
   * @param[in] item (ProjectItem *) The item to append.
   */
  void ProjectItem::appendRow(ProjectItem *item) {
    setTextColor(Qt::black);
    QStandardItem::appendRow(item);
  }

@@ -994,6 +1039,7 @@ namespace Isis {
   * @param[in] item (ProjectItem *) The item.
   */
  void ProjectItem::insertRow(int row, ProjectItem *item) {
    setTextColor(Qt::black);
    QStandardItem::insertRow(row, item);
  }

@@ -1025,6 +1071,7 @@ namespace Isis {
   * @param[in] item (ProjectItem *) The item.
   */
  void ProjectItem::setChild(int row, ProjectItem *item) {
    setTextColor(Qt::black);
    QStandardItem::setChild(row, item);
  }

+4 −2
Original line number Diff line number Diff line
@@ -124,6 +124,8 @@ namespace Isis {
   *     @history 2017-07-13 Makayla Shepherd - Added the ability to change the name of image
   *                             imports, shape imports, and bundle solution info. Fixes #4855,
   *                             #4979, #4980.
   *     @history 2017-08-03 Cole Neubauer - Explicitely set the color of each new ProjectItem to
   *                             Qt::Black Fixes #5095
   *
   */
  class ProjectItem : public QStandardItem {