scidavis  2.3.0
About: SciDAVis is a free application for Scientific Data Analysis and Visualization (a fork off of QtiPlot).
  Fossies Dox: scidavis-2.3.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

Note Class Reference

Notes window class. More...

#include <Note.h>

Inheritance diagram for Note:
[legend]
Collaboration diagram for Note:
[legend]

Public Types

enum  CaptionPolicy { Name = 0, Label = 1, Both = 2 }
 Possible window captions. More...
 
enum  Status { Hidden = -1, Normal = 0, Minimized = 1, Maximized = 2 }
 

Public Slots

QString saveToString (const QString &info)
 
void restore (const QStringList &)
 
QTextEdit * textWidget ()
 

Signals

void closedWindow (MyWidget *)
 Emitted when the window was closed. More...
 
void hiddenWindow (MyWidget *)
 Emitted when the window was hidden. More...
 
void modifiedWindow (MyWidget *)
 
void resizedWindow (MyWidget *)
 
void statusChanged (MyWidget *)
 Emitted when the window status changed. More...
 
void showTitleBarMenu ()
 Emitted when the title bar recieves a QContextMenuEvent. More...
 

Public Member Functions

 Note (ScriptingEnv *env, const QString &label, QWidget *parent=0, const char *name=0, Qt::WindowFlags f=0)
 
 ~Note ()
 
void init (ScriptingEnv *env)
 
bool autoexec () const
 
void setAutoexec (bool)
 
void modifiedNote ()
 
QString text ()
 
void setText (const QString &s)
 
void print ()
 
void exportPDF (const QString &fileName)
 
QString exportASCII (const QString &file={})
 
QString importASCII (const QString &file={})
 
void execute ()
 
bool executeAll ()
 
void evaluate ()
 
void insert (const QString &s)
 
virtual QString windowLabel ()
 Return the window label. More...
 
virtual void setWindowLabel (const QString &s)
 Set the window label. More...
 
virtual QString name ()
 Return the window name. More...
 
virtual void setName (const QString &s)
 Set the window name. More...
 
virtual CaptionPolicy captionPolicy ()
 Return the caption policy. More...
 
virtual void setCaptionPolicy (CaptionPolicy policy)
 Set the caption policy. More...
 
virtual QString birthDate ()
 Return the creation date. More...
 
virtual void setBirthDate (const QString &s)
 Set the creation date. More...
 
QString aspect ()
 Return the window status as a string. More...
 
Status status ()
 Return the window status flag (hidden, normal, minimized or maximized) More...
 
void setStatus (Status s)
 Set the window status flag (hidden, normal, minimized or maximized) More...
 
virtual QString saveAsTemplate (const QString &)
 
virtual void setHidden ()
 Notifies that a window was hidden by a direct user action. More...
 
void closeEvent (QCloseEvent *)
 Close event handler. More...
 
void askOnCloseEvent (bool ask)
 Toggle the "ask on close" flag. More...
 
void contextMenuEvent (QContextMenuEvent *e)
 Customizes title bar's context menu) More...
 
Folderfolder ()
 Returns the pointer to the parent folder of the window. More...
 
void setFolder (Folder *f)
 Initializes the pointer to the parent folder of the window. More...
 
void notifyChanges ()
 Notifies the main application that the window has been modified. More...
 
void setNormal ()
 
void setMinimized ()
 
void setMaximized ()
 

Protected Slots

void updateCaption ()
 Set caption according to current CaptionPolicy, name and label. More...
 

Protected Member Functions

virtual void changeEvent (QEvent *event)
 

Protected Attributes

FolderparentFolder
 Pointer to the parent folder of the window. More...
 
QString w_label
 The window label. More...
 
QString birthdate
 The creation date. More...
 
Status w_status
 The window status. More...
 
CaptionPolicy caption_policy
 The caption policy. More...
 
bool askOnClose
 Toggle on/off: Ask the user "delete, hide, or cancel?" on a close event. More...
 

Private Attributes

ScriptEditte
 
bool autoExec
 

Detailed Description

Notes window class.

Future Plans

  • Search and replace

Definition at line 43 of file Note.h.

Member Enumeration Documentation

◆ CaptionPolicy

enum MyWidget::CaptionPolicy
inherited

Possible window captions.

Enumerator
Name 

caption determined by the window name

Label 

caption detemined by the window label

Both 

caption = "name - label"

Definition at line 68 of file MyWidget.h.

68  {
69  Name = 0,
70  Label = 1,
71  Both = 2
72  };

◆ Status

enum MyWidget::Status
inherited
Enumerator
Hidden 
Normal 
Minimized 
Maximized 

Definition at line 73 of file MyWidget.h.

73 {Hidden = -1, Normal = 0, Minimized = 1, Maximized = 2};

Constructor & Destructor Documentation

◆ Note()

Note::Note ( ScriptingEnv env,
const QString &  label,
QWidget *  parent = 0,
const char *  name = 0,
Qt::WindowFlags  f = 0 
)

File : Note.cpp

Project : SciDAVis

Copyright : (C) 2006 by Ion Vasilief, Tilman Benkert, Knut Franke Email (use @ for *) : ion_vasilief*yahoo.fr, thzs*gmx.net, knut.franke*gmx.de Description : Notes window class

  • This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. *
    • This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. *
    • You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA *

Definition at line 44 of file Note.cpp.

45  : MyWidget(label, parent, name, f)
46 {
47 init(env);
48 }

References init().

Here is the call graph for this function:

◆ ~Note()

Note::~Note ( )
inline

Definition at line 50 of file Note.h.

50 {};

Member Function Documentation

◆ askOnCloseEvent()

void MyWidget::askOnCloseEvent ( bool  ask)
inlineinherited

Toggle the "ask on close" flag.

Definition at line 123 of file MyWidget.h.

123 {askOnClose = ask;};

References MyWidget::askOnClose.

Referenced by ApplicationWindow::connectMultilayerPlot(), ApplicationWindow::connectSurfacePlot(), ApplicationWindow::connectTable(), ApplicationWindow::deleteFitTables(), ApplicationWindow::initMatrix(), and ApplicationWindow::initNote().

Here is the caller graph for this function:

◆ aspect()

QString MyWidget::aspect ( )
inherited

Return the window status as a string.

Definition at line 106 of file MyWidget.cpp.

107 {
108  QString s = tr("Normal");
109  switch (w_status)
110  {
111  case Hidden:
112  return tr("Hidden");
113  break;
114 
115  case Normal:
116  break;
117 
118  case Minimized:
119  return tr("Minimized");
120  break;
121 
122  case Maximized:
123  return tr("Maximized");
124  break;
125  }
126  return s;
127 }

References MyWidget::Hidden, MyWidget::Maximized, MyWidget::Minimized, MyWidget::Normal, and MyWidget::w_status.

Referenced by ApplicationWindow::addListViewItem(), TableView::handleAspectAdded(), Table::handleAspectDescriptionAboutToChange(), Matrix::handleAspectDescriptionChange(), Table::handleAspectDescriptionChange(), TableView::handleAspectDescriptionChanged(), MultiLayer::print(), and ApplicationWindow::updateWindowStatus().

Here is the caller graph for this function:

◆ autoexec()

bool Note::autoexec ( ) const
inline

Definition at line 60 of file Note.h.

60 { return autoExec; }

References autoExec.

Referenced by ScriptEdit::contextMenuEvent().

Here is the caller graph for this function:

◆ birthDate()

virtual QString MyWidget::birthDate ( )
inlinevirtualinherited

Return the creation date.

Reimplemented in Matrix.

Definition at line 91 of file MyWidget.h.

91 {return birthdate;};

References MyWidget::birthdate.

Referenced by ApplicationWindow::addListViewItem(), Graph3D::saveToString(), MultiLayer::saveToString(), TableStatistics::saveToString(), saveToString(), and ApplicationWindow::windowProperties().

Here is the caller graph for this function:

◆ captionPolicy()

virtual CaptionPolicy MyWidget::captionPolicy ( )
inlinevirtualinherited

Return the caption policy.

Definition at line 86 of file MyWidget.h.

86 {return caption_policy;};

References MyWidget::caption_policy.

Referenced by RenameWindowDialog::accept(), ApplicationWindow::clone(), ApplicationWindow::convertMatrixToTable(), ApplicationWindow::convertTableToMatrix(), ApplicationWindow::renameWindow(), Graph3D::saveToString(), MultiLayer::saveToString(), TableStatistics::saveToString(), Matrix::saveToString(), saveToString(), and RenameWindowDialog::setWidget().

Here is the caller graph for this function:

◆ changeEvent()

void MyWidget::changeEvent ( QEvent *  event)
protectedvirtualinherited

Reimplemented in TableView, and MatrixView.

Definition at line 129 of file MyWidget.cpp.

130 {
131  if (!isHidden() && event->type() == QEvent::WindowStateChange) {
132  if (((QWindowStateChangeEvent *)event)->oldState() == windowState())
133  return;
134  if( windowState() & Qt::WindowMinimized )
136  else if ( windowState() & Qt::WindowMaximized )
138  else
139  w_status = Normal;
140  emit statusChanged (this);
141  }
142  QMdiSubWindow::changeEvent(event);
143 }

References MyWidget::Maximized, MyWidget::Minimized, MyWidget::Normal, MyWidget::statusChanged(), and MyWidget::w_status.

Referenced by MatrixView::changeEvent(), and TableView::changeEvent().

Here is the caller graph for this function:

◆ closedWindow

void MyWidget::closedWindow ( MyWidget )
signalinherited

Emitted when the window was closed.

Referenced by MyWidget::closeEvent().

Here is the caller graph for this function:

◆ closeEvent()

void MyWidget::closeEvent ( QCloseEvent *  e)
inherited

Close event handler.

Ask the user "delete, hide, or cancel?" if the "ask on close" flag is set.

Definition at line 76 of file MyWidget.cpp.

77 {
78 if (askOnClose)
79  {
80  switch( QMessageBox::information(this,tr("SciDAVis"),
81  tr("Do you want to hide or delete") + "<p><b>'" + objectName() + "'</b> ?",
82  tr("Delete"), tr("Hide"), tr("Cancel"), 0,2))
83  {
84  case 0:
85  emit closedWindow(this);
86  e->accept();
87  break;
88 
89  case 1:
90  e->ignore();
91  emit hiddenWindow(this);
92  break;
93 
94  case 2:
95  e->ignore();
96  break;
97  }
98  }
99 else
100  {
101  emit closedWindow(this);
102  e->accept();
103  }
104 }

References MyWidget::askOnClose, MyWidget::closedWindow(), and MyWidget::hiddenWindow().

◆ contextMenuEvent()

void MyWidget::contextMenuEvent ( QContextMenuEvent *  e)
inherited

Customizes title bar's context menu)

Definition at line 145 of file MyWidget.cpp.

146 {
147  if (!this->widget()->geometry().contains(e->pos())) {
148  emit showTitleBarMenu();
149  e->accept();
150  }
151 }

References MyWidget::showTitleBarMenu().

◆ evaluate()

void Note::evaluate ( )
inline

Definition at line 73 of file Note.h.

73 { te->evaluate(); };

References ScriptEdit::evaluate(), and te.

Here is the call graph for this function:

◆ execute()

void Note::execute ( )
inline

Definition at line 71 of file Note.h.

71 { te->execute(); };

References ScriptEdit::execute(), and te.

Here is the call graph for this function:

◆ executeAll()

bool Note::executeAll ( )
inline

Definition at line 72 of file Note.h.

72 {return te->executeAll(); };

References ScriptEdit::executeAll(), and te.

Referenced by ApplicationWindow::loadScript().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ exportASCII()

QString Note::exportASCII ( const QString &  file = {})
inline

Definition at line 69 of file Note.h.

69 {}) { return te->exportASCII(file); };

Referenced by ApplicationWindow::saveNoteAs().

Here is the caller graph for this function:

◆ exportPDF()

void Note::exportPDF ( const QString &  fileName)
inlinevirtual

Reimplemented from MyWidget.

Definition at line 68 of file Note.h.

68 {te->exportPDF(fileName);};

References ScriptEdit::exportPDF(), and te.

Here is the call graph for this function:

◆ folder()

Folder* MyWidget::folder ( )
inlineinherited

Returns the pointer to the parent folder of the window.

Definition at line 128 of file MyWidget.h.

128 {return parentFolder;};

References MyWidget::parentFolder.

Referenced by ApplicationWindow::closeWindow(), MuParserScript::resolveColumnPath(), ApplicationWindow::restoreWindowGeometry(), MuParserScript::tableColumn__Function(), and ApplicationWindow::windowGeometryInfo().

Here is the caller graph for this function:

◆ hiddenWindow

void MyWidget::hiddenWindow ( MyWidget )
signalinherited

Emitted when the window was hidden.

Referenced by Matrix::closeEvent(), MyWidget::closeEvent(), and Table::closeEvent().

Here is the caller graph for this function:

◆ importASCII()

QString Note::importASCII ( const QString &  file = {})
inline

Definition at line 70 of file Note.h.

70 {}) { return te->importASCII(file); };

Referenced by ApplicationWindow::loadScript().

Here is the caller graph for this function:

◆ init()

void Note::init ( ScriptingEnv env)

Definition at line 50 of file Note.cpp.

51 {
52 autoExec = false;
53 QDateTime dt = QDateTime::currentDateTime ();
54 setBirthDate(dt.toString(Qt::LocalDate));
55 
56 te = new ScriptEdit(env, this, name());
57 te->setContext(this);
58 this->setWidget(te);
59 
60 setGeometry(0, 0, 500, 200);
61 connect(te, SIGNAL(textChanged()), this, SLOT(modifiedNote()));
62 }

References autoExec, modifiedNote(), MyWidget::name(), MyWidget::setBirthDate(), ScriptEdit::setContext(), and te.

Referenced by Note().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ insert()

void Note::insert ( const QString &  s)
inline

Definition at line 74 of file Note.h.

74 {te->insertPlainText(s);}

References te.

Referenced by ApplicationWindow::loadScript().

Here is the caller graph for this function:

◆ modifiedNote()

void Note::modifiedNote ( )

Definition at line 64 of file Note.cpp.

65 {
66 emit modifiedWindow(this);
67 }

References MyWidget::modifiedWindow().

Referenced by init().

Here is the caller graph for this function:

◆ modifiedWindow

void MyWidget::modifiedWindow ( MyWidget )
signalinherited

Referenced by Matrix::handleChange(), Table::handleChange(), Matrix::invert(), modifiedNote(), MyWidget::notifyChanges(), Matrix::recalculate(), and Matrix::setNumericFormat().

Here is the caller graph for this function:

◆ name()

virtual QString MyWidget::name ( )
inlinevirtualinherited

Return the window name.

Reimplemented in Table, and Matrix.

Definition at line 81 of file MyWidget.h.

81 {return objectName();};

Referenced by RenameWindowDialog::accept(), ApplicationWindow::addListViewItem(), ApplicationWindow::alreadyUsedName(), ApplicationWindow::appendProject(), ApplicationWindow::clone(), ApplicationWindow::closeWindow(), ApplicationWindow::depending3DPlots(), ApplicationWindow::dependingPlots(), MultiLayer::exportSVG(), MultiLayer::exportVector(), Folder::findWindow(), ApplicationWindow::generateUniqueName(), init(), ApplicationWindow::loadImage(), ApplicationWindow::loadProject(), MultiLayer::MultiLayer(), MyWidget::MyWidget(), ApplicationWindow::openNote(), ApplicationWindow::openSurfacePlot(), Graph3D::print(), ApplicationWindow::removeWindowFromLists(), ApplicationWindow::renameWindow(), ApplicationWindow::restoreWindowGeometry(), ApplicationWindow::saveAsTemplate(), Graph3D::saveToString(), MultiLayer::saveToString(), saveToString(), PlotDialog::setMultiLayer(), ApplicationWindow::setShowWindowsPolicy(), RenameWindowDialog::setWidget(), ApplicationWindow::showWindowMenuImpl(), MyWidget::updateCaption(), Graph3D::updateData(), Graph3D::updateScales(), ApplicationWindow::updateWindowStatus(), ApplicationWindow::window(), Folder::window(), ApplicationWindow::windowProperties(), ApplicationWindow::windowsMenuAboutToShow(), and ApplicationWindow::windowsMenuActivated().

Here is the caller graph for this function:

◆ notifyChanges()

void MyWidget::notifyChanges ( )
inlineinherited

Notifies the main application that the window has been modified.

Definition at line 134 of file MyWidget.h.

134 {emit modifiedWindow(this);};

References MyWidget::modifiedWindow().

Referenced by ApplicationWindow::importASCII(), PlotDialog::pickBorderColor(), and PlotDialog::updateBorder().

Here is the caller graph for this function:

◆ print()

void Note::print ( )
inlinevirtual

Reimplemented from MyWidget.

Definition at line 67 of file Note.h.

67 { te->print(); };

References ScriptEdit::print(), and te.

Here is the call graph for this function:

◆ resizedWindow

void MyWidget::resizedWindow ( MyWidget )
signalinherited

Referenced by Graph3D::resizeEvent(), and MultiLayer::resizeLayers().

Here is the caller graph for this function:

◆ restore

void Note::restore ( const QStringList &  data)
slot

Definition at line 81 of file Note.cpp.

82 {
83  QStringList::ConstIterator line = data.begin();
84  QStringList fields;
85 
86  fields = (*line).split("\t");
87  if (fields[0] == "AutoExec"){
88  setAutoexec(fields[1] == "1");
89  line++;
90  }
91 
92  if (*line == "<content>") line++;
93  while (line != data.end() && *line != "</content>")
94  te->insertPlainText((*line++)+"\n");
95 }

References setAutoexec(), and te.

Referenced by ApplicationWindow::appendProject(), and ApplicationWindow::loadProject().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ saveAsTemplate()

virtual QString MyWidget::saveAsTemplate ( const QString &  )
inlinevirtualinherited

Reimplemented in Matrix, MultiLayer, and Graph3D.

Definition at line 102 of file MyWidget.h.

102 {return QString();};

Referenced by ApplicationWindow::saveAsTemplate().

Here is the caller graph for this function:

◆ saveToString

QString Note::saveToString ( const QString &  info)
slot

Definition at line 69 of file Note.cpp.

70 {
71 QString s= "<note>\n";
72 s+= QString(name()) + "\t" + birthDate() + "\n";
73 s+= info;
74 s+= "WindowLabel\t" + windowLabel() + "\t" + QString::number(captionPolicy()) + "\n";
75 s+= "AutoExec\t" + QString(autoExec ? "1" : "0") + "\n";
76 s+= "<content>\n"+te->toPlainText().trimmed()+"\n</content>";
77 s+="\n</note>\n";
78 return s;
79 }

References autoExec, MyWidget::birthDate(), MyWidget::captionPolicy(), MyWidget::name(), te, and MyWidget::windowLabel().

Here is the call graph for this function:

◆ setAutoexec()

void Note::setAutoexec ( bool  exec)

Definition at line 97 of file Note.cpp.

98 {
99  autoExec = exec;
100  QPalette palette;
101  if (autoExec)
102  palette.setColor(te->backgroundRole(), QColor(255,239,185));
103  te->setPalette(palette);
104 }

References autoExec, and te.

Referenced by restore().

Here is the caller graph for this function:

◆ setBirthDate()

virtual void MyWidget::setBirthDate ( const QString &  s)
inlinevirtualinherited

Set the creation date.

Reimplemented in Table, and Matrix.

Definition at line 93 of file MyWidget.h.

93 {birthdate = s;};

References MyWidget::birthdate.

Referenced by ApplicationWindow::appendProject(), init(), Graph3D::initPlot(), ApplicationWindow::loadProject(), MultiLayer::MultiLayer(), ApplicationWindow::openNote(), and ApplicationWindow::openSurfacePlot().

Here is the caller graph for this function:

◆ setCaptionPolicy()

virtual void MyWidget::setCaptionPolicy ( CaptionPolicy  policy)
inlinevirtualinherited

Set the caption policy.

Reimplemented in Table, and Matrix.

Definition at line 88 of file MyWidget.h.

88 { caption_policy = policy; updateCaption(); }

References MyWidget::caption_policy, and MyWidget::updateCaption().

Referenced by RenameWindowDialog::accept(), ApplicationWindow::appendProject(), ApplicationWindow::clone(), ApplicationWindow::loadImage(), ApplicationWindow::loadProject(), ApplicationWindow::openNote(), ApplicationWindow::openSurfacePlot(), and ApplicationWindow::renameWindow().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setFolder()

void MyWidget::setFolder ( Folder f)
inlineinherited

Initializes the pointer to the parent folder of the window.

Definition at line 131 of file MyWidget.h.

131 {parentFolder = f;};

References MyWidget::parentFolder.

Referenced by Folder::addWindow(), ApplicationWindow::initBareMultilayerPlot(), ApplicationWindow::initMatrix(), ApplicationWindow::initNote(), ApplicationWindow::initPlot3D(), ApplicationWindow::initTable(), and Folder::removeWindow().

Here is the caller graph for this function:

◆ setHidden()

void MyWidget::setHidden ( )
virtualinherited

Notifies that a window was hidden by a direct user action.

Definition at line 162 of file MyWidget.cpp.

163 {
164  w_status = Hidden;
165  emit statusChanged (this);
166  hide();
167 }

References MyWidget::Hidden, MyWidget::statusChanged(), and MyWidget::w_status.

Referenced by ApplicationWindow::hideWindow(), and ApplicationWindow::openTemplate().

Here is the caller graph for this function:

◆ setMaximized()

void MyWidget::setMaximized ( )
inherited

Definition at line 183 of file MyWidget.cpp.

184 {
185  showMaximized();
187  emit statusChanged (this);
188 }

References MyWidget::Maximized, MyWidget::statusChanged(), and MyWidget::w_status.

Referenced by ApplicationWindow::folderItemDoubleClicked(), ApplicationWindow::maximizeWindow(), and ApplicationWindow::openTemplate().

Here is the caller graph for this function:

◆ setMinimized()

void MyWidget::setMinimized ( )
inherited

Definition at line 176 of file MyWidget.cpp.

177 {
178  showMinimized();
180  emit statusChanged (this);
181 }

References MyWidget::Minimized, MyWidget::statusChanged(), and MyWidget::w_status.

Referenced by ApplicationWindow::minimizeWindow(), and ApplicationWindow::openTemplate().

Here is the caller graph for this function:

◆ setName()

virtual void MyWidget::setName ( const QString &  s)
inlinevirtualinherited

Set the window name.

Reimplemented in Table, and Matrix.

Definition at line 83 of file MyWidget.h.

83 {setObjectName(s); updateCaption();};

References MyWidget::updateCaption().

Referenced by ApplicationWindow::dataPlot3D(), ApplicationWindow::dataPlotXYZ(), ApplicationWindow::initBareMultilayerPlot(), ApplicationWindow::initNote(), ApplicationWindow::newPlot3D(), ApplicationWindow::openMatrixPlot3D(), ApplicationWindow::plot3DMatrix(), and ApplicationWindow::renameWindow().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setNormal()

void MyWidget::setNormal ( )
inherited

Definition at line 169 of file MyWidget.cpp.

170 {
171  showNormal();
172  w_status = Normal;
173  emit statusChanged (this);
174 }

References MyWidget::Normal, MyWidget::statusChanged(), and MyWidget::w_status.

Referenced by ApplicationWindow::activateSubWindow(), ApplicationWindow::folderItemDoubleClicked(), and ApplicationWindow::openTemplate().

Here is the caller graph for this function:

◆ setStatus()

void MyWidget::setStatus ( Status  s)
inherited

Set the window status flag (hidden, normal, minimized or maximized)

Definition at line 153 of file MyWidget.cpp.

154 {
155  if (w_status == s)
156  return;
157 
158  w_status = s;
159  emit statusChanged (this);
160 }

References MyWidget::statusChanged(), and MyWidget::w_status.

Referenced by ApplicationWindow::changeFolder(), ApplicationWindow::restoreWindowGeometry(), and ApplicationWindow::updateWindowStatus().

Here is the caller graph for this function:

◆ setText()

void Note::setText ( const QString &  s)
inline

Definition at line 66 of file Note.h.

66 { te->setText(s); };

References te.

Referenced by ImportOPJ::importNotes().

Here is the caller graph for this function:

◆ setWindowLabel()

virtual void MyWidget::setWindowLabel ( const QString &  s)
inlinevirtualinherited

Set the window label.

Reimplemented in Table, and Matrix.

Definition at line 78 of file MyWidget.h.

78 { w_label = s; updateCaption();};

References MyWidget::updateCaption(), and MyWidget::w_label.

Referenced by RenameWindowDialog::accept(), ApplicationWindow::appendProject(), ApplicationWindow::clone(), ImportOPJ::importGraphs(), ImportOPJ::importNotes(), ApplicationWindow::loadImage(), ApplicationWindow::loadProject(), ApplicationWindow::openNote(), and ApplicationWindow::openSurfacePlot().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ showTitleBarMenu

void MyWidget::showTitleBarMenu ( )
signalinherited

Emitted when the title bar recieves a QContextMenuEvent.

Referenced by Graph3D::contextMenuEvent(), MyWidget::contextMenuEvent(), and MultiLayer::mousePressEvent().

Here is the caller graph for this function:

◆ status()

Status MyWidget::status ( )
inlineinherited

Return the window status flag (hidden, normal, minimized or maximized)

Definition at line 98 of file MyWidget.h.

98 {return w_status;};

References MyWidget::w_status.

Referenced by ApplicationWindow::changeFolder(), ApplicationWindow::clone(), ApplicationWindow::openTemplate(), ApplicationWindow::showAllFolderWindows(), ApplicationWindow::updateWindowStatus(), and ApplicationWindow::windowGeometryInfo().

Here is the caller graph for this function:

◆ statusChanged

void MyWidget::statusChanged ( MyWidget )
signalinherited

Emitted when the window status changed.

Referenced by MyWidget::changeEvent(), MyWidget::setHidden(), MyWidget::setMaximized(), MyWidget::setMinimized(), MyWidget::setNormal(), and MyWidget::setStatus().

Here is the caller graph for this function:

◆ text()

QString Note::text ( )
inline

Definition at line 65 of file Note.h.

65 { return te->toPlainText(); };

References te.

◆ textWidget

QTextEdit* Note::textWidget ( )
inlineslot

Definition at line 59 of file Note.h.

59 {return (QTextEdit*)te;};

References te.

◆ updateCaption

void MyWidget::updateCaption ( )
protectedslotinherited

Set caption according to current CaptionPolicy, name and label.

Definition at line 52 of file MyWidget.cpp.

53 {
54  switch (caption_policy)
55  {
56  case Name:
57  setWindowTitle(name());
58  break;
59 
60  case Label:
61  if (!windowLabel().isEmpty())
62  setWindowTitle(windowLabel());
63  else
64  setWindowTitle(name());
65  break;
66 
67  case Both:
68  if (!windowLabel().isEmpty())
69  setWindowTitle(name() + " - " + windowLabel());
70  else
71  setWindowTitle(name());
72  break;
73  }
74 };

References MyWidget::Both, MyWidget::caption_policy, MyWidget::Label, MyWidget::Name, MyWidget::name(), and MyWidget::windowLabel().

Referenced by Matrix::handleAspectDescriptionChange(), Table::handleAspectDescriptionChange(), Matrix::setCaptionPolicy(), MyWidget::setCaptionPolicy(), Table::setCaptionPolicy(), MyWidget::setName(), Matrix::setWindowLabel(), MyWidget::setWindowLabel(), and Table::setWindowLabel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ windowLabel()

virtual QString MyWidget::windowLabel ( )
inlinevirtualinherited

Return the window label.

Reimplemented in Table, and Matrix.

Definition at line 76 of file MyWidget.h.

76 {return QString(w_label);};

References MyWidget::w_label.

Referenced by RenameWindowDialog::accept(), ApplicationWindow::addListViewItem(), ApplicationWindow::clone(), Folder::findWindow(), Graph3D::saveToString(), MultiLayer::saveToString(), saveToString(), RenameWindowDialog::setWidget(), and MyWidget::updateCaption().

Here is the caller graph for this function:

Member Data Documentation

◆ askOnClose

bool MyWidget::askOnClose
protectedinherited

Toggle on/off: Ask the user "delete, hide, or cancel?" on a close event.

Definition at line 175 of file MyWidget.h.

Referenced by MyWidget::askOnCloseEvent(), Matrix::closeEvent(), MyWidget::closeEvent(), Table::closeEvent(), and MyWidget::MyWidget().

◆ autoExec

bool Note::autoExec
private

Definition at line 77 of file Note.h.

Referenced by autoexec(), init(), saveToString(), and setAutoexec().

◆ birthdate

QString MyWidget::birthdate
protectedinherited

◆ caption_policy

◆ parentFolder

Folder* MyWidget::parentFolder
protectedinherited

Pointer to the parent folder of the window.

Definition at line 159 of file MyWidget.h.

Referenced by MyWidget::folder(), and MyWidget::setFolder().

◆ te

◆ w_label

QString MyWidget::w_label
protectedinherited

The window label.

See also
setWindowLabel(), windowLabel(), setCaptionPolicy()

Definition at line 164 of file MyWidget.h.

Referenced by MyWidget::MyWidget(), MyWidget::setWindowLabel(), and MyWidget::windowLabel().

◆ w_status


The documentation for this class was generated from the following files:
MyWidget::Label
@ Label
caption detemined by the window label
Definition: MyWidget.h:70
MyWidget::caption_policy
CaptionPolicy caption_policy
The caption policy.
Definition: MyWidget.h:173
MyWidget::Maximized
@ Maximized
Definition: MyWidget.h:73
ScriptEdit
Editor widget with support for evaluating expressions and executing code.
Definition: ScriptEdit.h:50
MyWidget::MyWidget
MyWidget(const QString &label=QString(), QWidget *parent=0, const QString name=0, Qt::WindowFlags f=0)
Constructor.
Definition: MyWidget.cpp:42
MyWidget::parentFolder
Folder * parentFolder
Pointer to the parent folder of the window.
Definition: MyWidget.h:159
MyWidget::statusChanged
void statusChanged(MyWidget *)
Emitted when the window status changed.
ScriptEdit::importASCII
QString importASCII(const QString &file={})
Definition: ScriptEdit.cpp:320
data
Definition: exp_saturation.c:37
MyWidget::Normal
@ Normal
Definition: MyWidget.h:73
ScriptEdit::print
void print()
Definition: ScriptEdit.cpp:309
MyWidget::Minimized
@ Minimized
Definition: MyWidget.h:73
MyWidget::showTitleBarMenu
void showTitleBarMenu()
Emitted when the title bar recieves a QContextMenuEvent.
MyWidget::windowLabel
virtual QString windowLabel()
Return the window label.
Definition: MyWidget.h:76
MyWidget::captionPolicy
virtual CaptionPolicy captionPolicy()
Return the caption policy.
Definition: MyWidget.h:86
MyWidget::birthdate
QString birthdate
The creation date.
Definition: MyWidget.h:166
ScriptEdit::exportPDF
void exportPDF(const QString &fileName)
Definition: ScriptEdit.cpp:298
MyWidget::name
virtual QString name()
Return the window name.
Definition: MyWidget.h:81
MyWidget::birthDate
virtual QString birthDate()
Return the creation date.
Definition: MyWidget.h:91
ScriptEdit::evaluate
void evaluate()
Definition: ScriptEdit.cpp:259
MyWidget::modifiedWindow
void modifiedWindow(MyWidget *)
Note::init
void init(ScriptingEnv *env)
Definition: Note.cpp:50
Note::setAutoexec
void setAutoexec(bool)
Definition: Note.cpp:97
MyWidget::w_status
Status w_status
The window status.
Definition: MyWidget.h:168
MyWidget::Name
@ Name
caption determined by the window name
Definition: MyWidget.h:69
MyWidget::Hidden
@ Hidden
Definition: MyWidget.h:73
MyWidget::setBirthDate
virtual void setBirthDate(const QString &s)
Set the creation date.
Definition: MyWidget.h:93
MyWidget::closedWindow
void closedWindow(MyWidget *)
Emitted when the window was closed.
Note::autoExec
bool autoExec
Definition: Note.h:77
MyWidget::Both
@ Both
caption = "name - label"
Definition: MyWidget.h:71
Note::te
ScriptEdit * te
Definition: Note.h:76
ScriptEdit::execute
void execute()
Definition: ScriptEdit.cpp:222
MyWidget::hiddenWindow
void hiddenWindow(MyWidget *)
Emitted when the window was hidden.
MyWidget::askOnClose
bool askOnClose
Toggle on/off: Ask the user "delete, hide, or cancel?" on a close event.
Definition: MyWidget.h:175
ScriptEdit::executeAll
bool executeAll()
Definition: ScriptEdit.cpp:248
MyWidget::updateCaption
void updateCaption()
Set caption according to current CaptionPolicy, name and label.
Definition: MyWidget.cpp:52
ScriptEdit::setContext
void setContext(QObject *context)
Definition: ScriptEdit.h:72
MyWidget::w_label
QString w_label
The window label.
Definition: MyWidget.h:164
ScriptEdit::exportASCII
QString exportASCII(const QString &file={})
Definition: ScriptEdit.cpp:345
Note::modifiedNote
void modifiedNote()
Definition: Note.cpp:64