MAK Data Logger API Documentation for HLA
List of all members | Public Slots | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes
MAKLogger::DtLoggerTapeDialog Class Reference

The Logger Tape File Dialog. More...

+ Inheritance diagram for MAKLogger::DtLoggerTapeDialog:
+ Collaboration diagram for MAKLogger::DtLoggerTapeDialog:

Public Slots

virtual void showLoggerTapeInfo ()
 Slot to toggle showing the dialog preview widget panel, depending on whether the dialog's "Show more logger information" button has been clicked.

Public Member Functions

 DtLoggerTapeDialog (QWidget *parent, QString directory, QString caption, Qt::WindowFlags f=Qt::Dialog)
 CTOR.
virtual ~DtLoggerTapeDialog ()
 DTOR.
virtual void setFileWithPath (const QString fileWithPath)
 Set the currently opened file.
virtual void setSaveMode (bool save)
 Set whether this is a save file dialog or not. If not, it will be an open file dialog.
virtual void setShowDescriptionOnly ()
 Set whether this file dialog will only show the description meta data widget.
virtual void setShowPreviewButton (bool show)
 Set whether the Preview/Edit button should be shown in the meta data widget panel.
virtual void setEnablePreviewButton (bool enable)
 Set whether the Preview/Edit button is enabled or not.
virtual void setNeedUpgradeForDescription (bool current, int loadedVersion)
 Set whether the file format is current.
virtual void setShowEditPanel ()
 Set to toggle into edit mode if not already there.
virtual void setAppProtocol (const QString &protocol, bool display=false)
 Set the protocol string for the current application run.
virtual void setDescriptionText (const QString &description)
 Set the description text where a description already exists but is not saved.
virtual QString descriptionText ()
 Get the current description text from the dialog preview widget panel.
virtual bool descriptionChanged ()
 Get whether the description was changed in the dialog preview widget panel.

Protected Slots

virtual void fileSelectionChanged (const QString &file)
 Slot to take the new file selection from the dialog's file list widget and display the file's meta data in the preview widget panel.
virtual void fileNameTextChanged (const QString &text)
 Slot to check for typed filename.
virtual void onFolderSelectionChanged (int index)
 If the selection in the folder combox box is changed, need to clear the preview display.
virtual void onNavigateButtonClicked ()
 If the back, forward or to parent button is clicked, need to clear the preview display.

Protected Member Functions

virtual bool eventFilter (QObject *obj, QEvent *event)
 Make sure the Open button is not enabled when an invalid file selection has been made.
virtual void accept ()
 Only accept key press or double-click action on a file selection if the Open button is currently enabled.

Protected Attributes

DtLoggerPreviewWidgetmyLoggerTapePreviewWidget
QToolButton * myInfoButton
QPushButton * myOpenButton
QListView * myListView
QListWidget * myListWidget
QSize myDialogSize
int myPreviewPanelWidth
bool myOpenButtonEnabled

Detailed Description

The Logger Tape File Dialog.

Constructor & Destructor Documentation

MAKLogger::DtLoggerTapeDialog::DtLoggerTapeDialog ( QWidget parent,
QString  directory,
QString  caption,
Qt::WindowFlags  f = Qt::Dialog 
)

CTOR.

virtual MAKLogger::DtLoggerTapeDialog::~DtLoggerTapeDialog ( )
virtual

DTOR.

Member Function Documentation

virtual void MAKLogger::DtLoggerTapeDialog::accept ( )
protectedvirtual

Only accept key press or double-click action on a file selection if the Open button is currently enabled.

virtual bool MAKLogger::DtLoggerTapeDialog::descriptionChanged ( )
virtual

Get whether the description was changed in the dialog preview widget panel.

virtual QString MAKLogger::DtLoggerTapeDialog::descriptionText ( )
virtual

Get the current description text from the dialog preview widget panel.

virtual bool MAKLogger::DtLoggerTapeDialog::eventFilter ( QObject obj,
QEvent event 
)
protectedvirtual

Make sure the Open button is not enabled when an invalid file selection has been made.

virtual void MAKLogger::DtLoggerTapeDialog::fileNameTextChanged ( const QString &  text)
protectedvirtualslot

Slot to check for typed filename.

If the file exists, the preview widget panel will be invoked to display the file information. If the file is valid, meaning it is a logger tape file, and it was created for the same protocol as the current application run, the Open button will be enabled, otherwise disabled.

virtual void MAKLogger::DtLoggerTapeDialog::fileSelectionChanged ( const QString &  file)
protectedvirtualslot

Slot to take the new file selection from the dialog's file list widget and display the file's meta data in the preview widget panel.

If the file is valid, meaning it is a logger tape file, and it was created for the same protocol as the current application run, the Open button will be enabled, otherwise disabled.

virtual void MAKLogger::DtLoggerTapeDialog::onFolderSelectionChanged ( int  index)
protectedvirtualslot

If the selection in the folder combox box is changed, need to clear the preview display.

virtual void MAKLogger::DtLoggerTapeDialog::onNavigateButtonClicked ( )
protectedvirtualslot

If the back, forward or to parent button is clicked, need to clear the preview display.

virtual void MAKLogger::DtLoggerTapeDialog::setAppProtocol ( const QString &  protocol,
bool  display = false 
)
virtual

Set the protocol string for the current application run.

Passed on to the dialog's preview widget panel. Set the display param as true in order to cause the protocol string to also be used for initial display. Used when there is no saved file to read from.

virtual void MAKLogger::DtLoggerTapeDialog::setDescriptionText ( const QString &  description)
virtual

Set the description text where a description already exists but is not saved.

virtual void MAKLogger::DtLoggerTapeDialog::setEnablePreviewButton ( bool  enable)
virtual

Set whether the Preview/Edit button is enabled or not.

virtual void MAKLogger::DtLoggerTapeDialog::setFileWithPath ( const QString  fileWithPath)
virtual

Set the currently opened file.

Used by the Save/SaveAs dialog. This causes the meta data information to appear in the preview widget on opening the dialog.

virtual void MAKLogger::DtLoggerTapeDialog::setNeedUpgradeForDescription ( bool  current,
int  loadedVersion 
)
virtual

Set whether the file format is current.

On false, if the loaded file version requires an upgrade for writing a description, this will disable the Preview/Edit button and add a tooltip stating that it is necessary to upgrade the logger file in order to add a description.

virtual void MAKLogger::DtLoggerTapeDialog::setSaveMode ( bool  save)
virtual

Set whether this is a save file dialog or not. If not, it will be an open file dialog.

virtual void MAKLogger::DtLoggerTapeDialog::setShowDescriptionOnly ( )
virtual

Set whether this file dialog will only show the description meta data widget.

Used for all file dialogs except the Open File and Logger Information dialogs.

virtual void MAKLogger::DtLoggerTapeDialog::setShowEditPanel ( )
virtual

Set to toggle into edit mode if not already there.

virtual void MAKLogger::DtLoggerTapeDialog::setShowPreviewButton ( bool  show)
virtual

Set whether the Preview/Edit button should be shown in the meta data widget panel.

Shown for all file dialogs except for the Open File dialog.

virtual void MAKLogger::DtLoggerTapeDialog::showLoggerTapeInfo ( )
virtualslot

Slot to toggle showing the dialog preview widget panel, depending on whether the dialog's "Show more logger information" button has been clicked.

Member Data Documentation

QSize MAKLogger::DtLoggerTapeDialog::myDialogSize
protected
QToolButton* MAKLogger::DtLoggerTapeDialog::myInfoButton
protected
QListView* MAKLogger::DtLoggerTapeDialog::myListView
protected
QListWidget* MAKLogger::DtLoggerTapeDialog::myListWidget
protected
DtLoggerPreviewWidget* MAKLogger::DtLoggerTapeDialog::myLoggerTapePreviewWidget
protected
QPushButton* MAKLogger::DtLoggerTapeDialog::myOpenButton
protected
bool MAKLogger::DtLoggerTapeDialog::myOpenButtonEnabled
protected
int MAKLogger::DtLoggerTapeDialog::myPreviewPanelWidth
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Mon Jan 19 08:20:14 EST 2015 from SVN revision 149581
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)