21#include "Application.h"
24#include "GuiCubeParameter.h"
25#include "GuiInputAttribute.h"
26#include "GuiOutputAttribute.h"
27#include "IException.h"
28#include "ProgramLauncher.h"
30#include "UserInterface.h"
44 int group,
int param) :
49 fileAction->setText(
"Select Cube");
50 connect(fileAction, SIGNAL(triggered(
bool)),
this, SLOT(
SelectFile()));
51 p_menu->addAction(fileAction);
54 attAction->setText(
"Change Attributes ...");
55 connect(attAction, SIGNAL(triggered(
bool)),
this, SLOT(
SelectAttribute()));
56 p_menu->addAction(attAction);
59 viewAction->setText(
"View cube");
60 connect(viewAction, SIGNAL(triggered(
bool)),
this, SLOT(
ViewCube()));
61 p_menu->addAction(viewAction);
64 labAction->setText(
"View labels");
65 connect(labAction, SIGNAL(triggered(
bool)),
this, SLOT(
ViewLabel()));
66 p_menu->addAction(labAction);
68 p_fileButton->setMenu(p_menu);
69 p_fileButton->setPopupMode(QToolButton::MenuButtonPopup);
70 QString optButtonWhatsThisText =
"<p><b>Function:</b> \
71 Opens a file chooser window to select a file from</p> <p>\
72 <b>Hint: </b> Click the arrow for more cube parameter options</p>";
73 p_fileButton->setWhatsThis(optButtonWhatsThisText);
91 if(p_ui->ParamFileMode(p_group, p_param) ==
"input") {
93 QString curAtt = att.toString();
95 int status = GuiInputAttribute::GetAttributes(curAtt, newAtt,
96 p_ui->ParamName(p_group, p_param),
98 if((status == 1) && (curAtt != newAtt)) {
99 Isis::FileName f(p_lineEdit->text());
100 p_lineEdit->setText(f.expanded() + newAtt);
108 QString curAtt = att.toString();
110 int status = GuiOutputAttribute::GetAttributes(curAtt, newAtt,
111 p_ui->ParamName(p_group, p_param),
114 if((status == 1) && (curAtt != newAtt)) {
115 Isis::FileName f(p_lineEdit->text());
116 p_lineEdit->setText(f.expanded() + newAtt);
131 QString cubeName =
Value();
139 QString command =
"$ISISROOT/bin/qview " + cubeName +
" &";
144 QString msg =
"You must enter a cube name to open";
145 throw IException(IException::User, msg, _FILEINFO_);
148 catch(IException &e) {
149 Isis::iApp->GuiReportError(e);
161 QString cubeName =
Value();
168 Isis::Pvl *label = temp.
label();
176 QString msg =
"You must enter a cube name to open";
177 throw IException(IException::User, msg, _FILEINFO_);
180 catch(IException &e) {
181 Isis::iApp->GuiReportError(e);
static void GuiLog(const Pvl &results)
Writes the Pvl results to the sessionlog, but not to the printfile.
void addAttributes(const FileName &fileNameWithAtts)
Append the attributes found in the filename to these cube attributes.
Manipulate and parse attributes of output cube filenames.
bool propagatePixelType() const
Return true if the pixel type is to be propagated from an input cube.
IO Handler for Isis Cubes.
void open(const QString &cfile, QString access="r")
This method will try to open a file as either a cube or geotiff in either read or read/write.
void close(bool remove=false)
Closes the cube and updates the labels.
Pvl * label() const
Returns a pointer to the IsisLabel object associated with the cube.
void SelectAttribute()
Select cube attributes.
~GuiCubeParameter()
Destructor of GuiCubeParameter object.
GuiCubeParameter(QGridLayout *grid, UserInterface &ui, int group, int param)
Constructs GuiCubeParameter object.
void ViewCube()
Opens cube in qview.
void ViewLabel()
Displays cube label in the GUI log.
virtual void SelectFile()
Gets an input/output file from a GUI filechooser or typed in filename.
GuiFileNameParameter(QGridLayout *grid, UserInterface &ui, int group, int param)
Construct a GuiFileNameParameter object.
QString Value()
Gets the value found in the line edit text box.
virtual bool IsModified()
Return if the parameter value is different from the default value.
static void RunSystemCommand(QString commandLine)
This runs arbitrary system commands.
Command Line and Xml loader, validation, and access.
This is free and unencumbered software released into the public domain.