ij-16.png   inspectorJ -- JavaTM Profiler
sf project site browse source checkout source
SourceForge.net Logo



inspectorj::client::SessionProfileDialog Class Reference

#include <sessionprofiledialog.h>

Inheritance diagram for inspectorj::client::SessionProfileDialog:

Inheritance graph
[legend]
Collaboration diagram for inspectorj::client::SessionProfileDialog:

Collaboration graph
[legend]
List of all members.

Detailed Description

SessionProfileDialog allows users to create and manage session profiles.

Author:
James May

Definition at line 47 of file sessionprofiledialog.h.

Public Member Functions

 SessionProfileDialog (QMap< QString, SessionProfile > &, QString profileName)
 Constructor.
 ~SessionProfileDialog ()
 Destructor.
void setProfileDir (QString)

Private Slots

void updateAddBtn (QString)
 Updates the addClassFilterBtn based on the value of the QString str.
void updateRemoveBtn ()
 Updates the removeClassFilterBtn based on whether a filter to be removed is currently selected in the filterList.
void updateAddClassPathBtn (QString)
 Updates the addClassPathBtn based on the value of the QString str.
void updateRemoveClassPathBtn ()
 Updates the removeClassPathBtn based on whether a classPath to be removed is currently selected in the classPathList.
void addFilter ()
 Adds a filter to a profile.
void removeFilter ()
 Removes the currently selected filter(s) from the filterList.
void addClassPath ()
 Adds a classPath to a profile.
void removeClassPath ()
 Removes the currently selected classPath(s) from the classPathList.
void saveProfile ()
 Save the profile being edited/created.
void browseJreHome ()
 Show file dialog to browse for the jre home dir.
void browseTomcatHome ()
 Show file dialog to browse for the tomcat home dir.
void browseClassPath ()
 Show file dialog to browse for class path entries.
void updateNavigationBtns ()
 Update the wizard navigation buttons.

Private Member Functions

void initDialog ()
 Initialize this dialog.
bool isPageValid (int)
 Validate the data on the given page.

Private Attributes

QString profileDir
QMap< QString, SessionProfile > & profiles
 A map of SessionProfiles.
QList< QWidget * > pages
 List of dialog pages.
WizardControlwizard
 Wizard control for page navigation.
SessionProfile profile
 SessionProfile to be created or edited.


Constructor & Destructor Documentation

inspectorj::client::SessionProfileDialog::SessionProfileDialog ( QMap< QString, SessionProfile > &  profs,
QString  profileName 
)

Constructor.

Parameters:
profs A map of SessionProfiles
profileName profile name is an optional parameter representing the name of a profile to be loaded for editing when the dialog is displayed.

Definition at line 40 of file sessionprofiledialog.cpp.

References Ui_SessionProfileDlg::addClassFilterBtn, addClassPath(), Ui_SessionProfileDlg::addClassPathBtn, addFilter(), Ui_SessionProfileDlg::backBtn, browseClassPath(), Ui_SessionProfileDlg::browseClassPathBtn, browseJreHome(), browseTomcatHome(), Ui_SessionProfileDlg::classFilterEdit, Ui_SessionProfileDlg::classPathEdit, Ui_SessionProfileDlg::classPathList, Ui_SessionProfileDlg::filterList, Ui_SessionProfileDlg::finishBtn, Ui_SessionProfileDlg::hostNameEdit, Ui_SessionProfileDlg::hostPortEdit, initDialog(), Ui_SessionProfileDlg::jarFileEdit, Ui_SessionProfileDlg::jarFileRadBtn, Ui_SessionProfileDlg::jreHomeBrowseBtn, Ui_SessionProfileDlg::jreHomeEdit, Ui_SessionProfileDlg::launchExternalRadBtn, Ui_SessionProfileDlg::mainClassEdit, Ui_SessionProfileDlg::mainClassRadBtn, Ui_SessionProfileDlg::nextBtn, Ui_SessionProfileDlg::page1, Ui_SessionProfileDlg::page2, pages, profile, Ui_SessionProfileDlg::profileNameEdit, Ui_SessionProfileDlg::removeClassFilterBtn, removeClassPath(), Ui_SessionProfileDlg::removeClassPathBtn, removeFilter(), saveProfile(), inspectorj::client::SessionProfile::setName(), Ui_SessionProfileDlg::tomcatBrowseBtn, Ui_SessionProfileDlg::tomcatRadBtn, updateAddBtn(), updateAddClassPathBtn(), updateNavigationBtns(), updateRemoveBtn(), updateRemoveClassPathBtn(), and wizard.

inspectorj::client::SessionProfileDialog::~SessionProfileDialog (  ) 

Destructor.

Definition at line 92 of file sessionprofiledialog.cpp.

References wizard.


Member Function Documentation

void inspectorj::client::SessionProfileDialog::updateAddBtn ( QString  str  )  [private, slot]

Updates the addClassFilterBtn based on the value of the QString str.

If str is empty, addClassFilterBtn is disabled, otherwise it is enabled.

Parameters:
str The QString to check for emptiness.

Definition at line 354 of file sessionprofiledialog.cpp.

References Ui_SessionProfileDlg::addClassFilterBtn.

Referenced by SessionProfileDialog().

void inspectorj::client::SessionProfileDialog::updateRemoveBtn (  )  [private, slot]

Updates the removeClassFilterBtn based on whether a filter to be removed is currently selected in the filterList.

Definition at line 373 of file sessionprofiledialog.cpp.

References Ui_SessionProfileDlg::filterList, and Ui_SessionProfileDlg::removeClassFilterBtn.

Referenced by SessionProfileDialog().

void inspectorj::client::SessionProfileDialog::updateAddClassPathBtn ( QString  str  )  [private, slot]

Updates the addClassPathBtn based on the value of the QString str.

If str is empty, addClassPathBtn is disabled, otherwise it is enabled.

Parameters:
str The QString to check for emptiness.

Definition at line 364 of file sessionprofiledialog.cpp.

References Ui_SessionProfileDlg::addClassPathBtn.

Referenced by SessionProfileDialog().

void inspectorj::client::SessionProfileDialog::updateRemoveClassPathBtn (  )  [private, slot]

Updates the removeClassPathBtn based on whether a classPath to be removed is currently selected in the classPathList.

Definition at line 384 of file sessionprofiledialog.cpp.

References Ui_SessionProfileDlg::classPathList, and Ui_SessionProfileDlg::removeClassPathBtn.

Referenced by SessionProfileDialog().

void inspectorj::client::SessionProfileDialog::addFilter (  )  [private, slot]

Adds a filter to a profile.

The filter is entered in the classFilterEdit widget.

Definition at line 334 of file sessionprofiledialog.cpp.

References Ui_SessionProfileDlg::classFilterEdit, and Ui_SessionProfileDlg::filterList.

Referenced by SessionProfileDialog().

void inspectorj::client::SessionProfileDialog::removeFilter (  )  [private, slot]

Removes the currently selected filter(s) from the filterList.

Definition at line 394 of file sessionprofiledialog.cpp.

References Ui_SessionProfileDlg::filterList.

Referenced by SessionProfileDialog().

void inspectorj::client::SessionProfileDialog::addClassPath (  )  [private, slot]

Adds a classPath to a profile.

The classPath is entered in the classPathEdit widget.

Definition at line 343 of file sessionprofiledialog.cpp.

References Ui_SessionProfileDlg::classPathEdit, and Ui_SessionProfileDlg::classPathList.

Referenced by SessionProfileDialog().

void inspectorj::client::SessionProfileDialog::removeClassPath (  )  [private, slot]

Removes the currently selected classPath(s) from the classPathList.

Definition at line 406 of file sessionprofiledialog.cpp.

References Ui_SessionProfileDlg::classPathList.

Referenced by SessionProfileDialog().

void inspectorj::client::SessionProfileDialog::saveProfile (  )  [private, slot]

Save the profile being edited/created.

This slot is called when the OK button is clicked.

Definition at line 275 of file sessionprofiledialog.cpp.

References Ui_SessionProfileDlg::applicationArgsEdit, Ui_SessionProfileDlg::classPathList, Ui_SessionProfileDlg::filterList, inspectorj::client::SessionProfile::getFileName(), inspectorj::client::SessionProfile::getName(), inspectorj::client::ijConnection::host, Ui_SessionProfileDlg::hostNameEdit, Ui_SessionProfileDlg::hostPortEdit, Ui_SessionProfileDlg::jarFileEdit, Ui_SessionProfileDlg::jarFileRadBtn, Ui_SessionProfileDlg::javaOptionsEdit, Ui_SessionProfileDlg::jreHomeEdit, Ui_SessionProfileDlg::launchExternalRadBtn, Ui_SessionProfileDlg::mainClassEdit, Ui_SessionProfileDlg::mainClassRadBtn, inspectorj::client::ijConnection::port, profile, profileDir, Ui_SessionProfileDlg::profileNameEdit, profiles, inspectorj::toolset::ProfileToolSet::saveProfile(), inspectorj::client::SessionProfile::setApplicationArgs(), inspectorj::client::SessionProfile::setApplicationEntry(), inspectorj::client::SessionProfile::setClassFilters(), inspectorj::client::SessionProfile::setClassPath(), inspectorj::client::SessionProfile::setConnection(), inspectorj::client::SessionProfile::setExternalLaunch(), inspectorj::client::SessionProfile::setFileName(), inspectorj::client::SessionProfile::setJarFile(), inspectorj::client::SessionProfile::setJavaOptions(), inspectorj::client::SessionProfile::setJreHome(), inspectorj::client::SessionProfile::setName(), inspectorj::client::SessionProfile::setTomcatApp(), Ui_SessionProfileDlg::tomcatEdit, and Ui_SessionProfileDlg::tomcatRadBtn.

Referenced by SessionProfileDialog().

void inspectorj::client::SessionProfileDialog::browseJreHome (  )  [private, slot]

Show file dialog to browse for the jre home dir.

Definition at line 224 of file sessionprofiledialog.cpp.

References Ui_SessionProfileDlg::jreHomeEdit.

Referenced by SessionProfileDialog().

void inspectorj::client::SessionProfileDialog::browseTomcatHome (  )  [private, slot]

Show file dialog to browse for the tomcat home dir.

Definition at line 238 of file sessionprofiledialog.cpp.

References Ui_SessionProfileDlg::tomcatEdit.

Referenced by SessionProfileDialog().

void inspectorj::client::SessionProfileDialog::browseClassPath (  )  [private, slot]

Show file dialog to browse for class path entries.

Definition at line 252 of file sessionprofiledialog.cpp.

References Ui_SessionProfileDlg::classPathList.

Referenced by SessionProfileDialog().

void inspectorj::client::SessionProfileDialog::updateNavigationBtns (  )  [private, slot]

Update the wizard navigation buttons.

Definition at line 174 of file sessionprofiledialog.cpp.

References Ui_SessionProfileDlg::finishBtn, inspectorj::client::WizardControl::getCurrentPageNum(), inspectorj::client::WizardControl::getNumPages(), isPageValid(), Ui_SessionProfileDlg::launchExternalRadBtn, Ui_SessionProfileDlg::launchInternalRadBtn, Ui_SessionProfileDlg::nextBtn, and wizard.

Referenced by SessionProfileDialog().

void inspectorj::client::SessionProfileDialog::initDialog (  )  [private]

Initialize this dialog.

if a non empty profileName was passed into the ctor, then that profile will be loaded for editing. Otherwise all fields will be initially blank.

Definition at line 104 of file sessionprofiledialog.cpp.

References Ui_SessionProfileDlg::applicationArgsEdit, Ui_SessionProfileDlg::classPathList, Ui_SessionProfileDlg::filterList, inspectorj::client::SessionProfile::getApplicationArgs(), inspectorj::client::SessionProfile::getApplicationEntry(), inspectorj::client::SessionProfile::getClassFilters(), inspectorj::client::SessionProfile::getClassPath(), inspectorj::client::SessionProfile::getConnection(), inspectorj::client::SessionProfile::getJavaOptions(), inspectorj::client::SessionProfile::getJreHome(), inspectorj::client::SessionProfile::getName(), inspectorj::client::ijConnection::host, Ui_SessionProfileDlg::hostNameEdit, Ui_SessionProfileDlg::hostPortEdit, inspectorj::client::SessionProfile::isExternalLaunch(), inspectorj::client::SessionProfile::isJarFile(), inspectorj::client::SessionProfile::isTomcatApp(), Ui_SessionProfileDlg::jarFileEdit, Ui_SessionProfileDlg::jarFileRadBtn, Ui_SessionProfileDlg::javaOptionsEdit, Ui_SessionProfileDlg::jreHomeEdit, Ui_SessionProfileDlg::launchExternalRadBtn, Ui_SessionProfileDlg::launchInternalRadBtn, Ui_SessionProfileDlg::mainClassEdit, Ui_SessionProfileDlg::mainClassRadBtn, inspectorj::client::ijConnection::port, profile, Ui_SessionProfileDlg::profileNameEdit, profiles, Ui_SessionProfileDlg::tomcatEdit, and Ui_SessionProfileDlg::tomcatRadBtn.

Referenced by SessionProfileDialog().

bool inspectorj::client::SessionProfileDialog::isPageValid ( int  pageNum  )  [private]

Validate the data on the given page.

Parameters:
pageNum The page number to validate

Definition at line 200 of file sessionprofiledialog.cpp.

References Ui_SessionProfileDlg::hostNameEdit, Ui_SessionProfileDlg::hostPortEdit, Ui_SessionProfileDlg::jarFileEdit, Ui_SessionProfileDlg::jarFileRadBtn, Ui_SessionProfileDlg::jreHomeEdit, Ui_SessionProfileDlg::mainClassEdit, Ui_SessionProfileDlg::mainClassRadBtn, Ui_SessionProfileDlg::profileNameEdit, Ui_SessionProfileDlg::tomcatEdit, and Ui_SessionProfileDlg::tomcatRadBtn.

Referenced by updateNavigationBtns().


Member Data Documentation

QMap<QString, SessionProfile>& inspectorj::client::SessionProfileDialog::profiles [private]

A map of SessionProfiles.

Definition at line 77 of file sessionprofiledialog.h.

Referenced by initDialog(), and saveProfile().

QList<QWidget*> inspectorj::client::SessionProfileDialog::pages [private]

List of dialog pages.

Definition at line 80 of file sessionprofiledialog.h.

Referenced by SessionProfileDialog().

WizardControl* inspectorj::client::SessionProfileDialog::wizard [private]

Wizard control for page navigation.

Definition at line 83 of file sessionprofiledialog.h.

Referenced by SessionProfileDialog(), updateNavigationBtns(), and ~SessionProfileDialog().

SessionProfile inspectorj::client::SessionProfileDialog::profile [private]

SessionProfile to be created or edited.

Definition at line 86 of file sessionprofiledialog.h.

Referenced by initDialog(), saveProfile(), and SessionProfileDialog().


The documentation for this class was generated from the following files:
Generated on Sun Aug 19 17:08:16 2007 for inspectorJ by  doxygen 1.5.1