Itasca C++ Interface
ikernelinput.h
1 #pragma once
2 
3 #include "shared/interface/signal.h"
4 
5 namespace itasca {
6  class IGUIInput;
7  class ITextInput;
8 
17  class IKernelInput {
18  public:
19  using UndoConnect = std::tuple<shared::Signal<bool> *, shared::Signal<bool, double> *>;
20 
22  virtual ITextInput *getITextInput()=0;
23 
24  // Kernel specific more detailed input
26  virtual Qt::Key getKey()=0;
33  virtual uint prompt(const QString &message,const QString &options,const QString &keys,uint ok,uint cancel)=0;
35  virtual QString getUIName() const=0;
37  virtual bool autoTestMode() const=0;
39  virtual QString getHelpFileFrontPage() const=0;
41  virtual string getDocDirectory() const=0;
43  virtual QString getLatestRevisionAddress() const=0;
44 
45  // Interrupt functions
47  virtual void poll(bool suppressException=false,bool skipTimingTest=false)=0;
50  virtual bool hasBeenInterrupted()=0;
53  virtual bool hasBeenSafeInterrupted()=0;
54 
57  virtual IGUIInput *getIGUIInput()=0;
58 
59  // Undo support
62  virtual UndoConnect getUndoConnect() = 0;
64  //virtual bool getUndoStartMark()=0;
65 
67  virtual QString getProjectPath() const = 0;
68 
69  //virtual bool acceptRedirect() const=0;
70  //virtual void setRedirectInput(IKernelInput * ki)=0;
71  };
72 } // /namespace itasca
73 // EOF
The interface to graphics user interface input functionality.
Definition: iguiinput.h:8
Interface describing ALL input support the kernel needs to receive from whatever interface is driving...
Definition: ikernelinput.h:17
virtual QString getUIName() const =0
Returns the name of the UI input device, e.g. "FLAC3D Console". This functions does not throw excepti...
virtual QString getHelpFileFrontPage() const =0
Returns the name of the front page of the help file.
virtual bool hasBeenSafeInterrupted()=0
virtual bool autoTestMode() const =0
Returns true if system is in test mode. This functions does not throw exceptions.
virtual UndoConnect getUndoConnect()=0
virtual ITextInput * getITextInput()=0
Returns a pointer to ITextInput, the standard default text input.
virtual IGUIInput * getIGUIInput()=0
virtual uint prompt(const QString &message, const QString &options, const QString &keys, uint ok, uint cancel)=0
virtual void poll(bool suppressException=false, bool skipTimingTest=false)=0
Allows GUI to interrupt if necessary. Quit exception if suppressExeption is false.
virtual Qt::Key getKey()=0
Returns a key. This function blocks, and it may throw a 'quit' exception.
virtual QString getLatestRevisionAddress() const =0
Returns the name of the revision history page in the help file.
virtual bool hasBeenInterrupted()=0
virtual string getDocDirectory() const =0
Returns the name of the directory of the doc files which could be code dependent.
virtual QString getProjectPath() const =0
Returns TRUE if the last string input from ITextInput::getInput() was marked as the start of an undo ...
Definition: itextinput.h:40
namespace Itasca
Definition: basememory.cpp:10