ACF $AcfVersion:0$
Classes
iqtdoc Namespace Reference

This package contains Qt implementations related to Document/View concept. More...

Classes

class  CDocumentImportExportCommandComp
 Component used for triggering of the document import/export command from the file menu of a document based application. More...
 
class  CDocumentMetaInfoEditorComp
 
class  CDoxygenHelpFileProviderComp
 
class  CExtendedDocumentTemplateComp
 Extension of idoc::CSingleDocumentTemplateComp providing additional Qt-specified functionality. More...
 
class  CExternalOpenDocumentCommandComp
 
class  CHtmlHelpGuiComp
 HTML-based help viewer component. More...
 
class  CHtmlHelpViewerComp
 
class  CMainWindowGuiComp
 Standard main window component for any document-based application. More...
 
class  CMainWindowGuiCompBase
 
class  CMultiDocumentWorkspaceGuiComp
 This class is a Qt-based workspace implementation of a multi-document manager. More...
 
class  CSingleDocumentWorkspaceGuiComp
 Qt-based workspace implementation of a single document manager. More...
 
class  CSingletonDocApplicationComp
 Singleton application component. More...
 
class  CStaticHelpFileProviderComp
 
class  CUndoManagerCommandsProviderComp
 
class  TQtDocumentManagerWrap
 Wrapper for general functionality of a Qt based document workspace. More...
 

Detailed Description

This package contains Qt implementations related to Document/View concept.

The iqtdoc namespace builds on the idoc framework to provide Qt-specific implementations for creating document-based GUI applications. It includes ready-to-use components for main windows, workspaces, help systems, and document management.

This package uses the following ACF packages:

Key Components
Main Window and Workspace
Help System
Document Management
Commands and UI
Building a Qt Document Application

The typical structure of a Qt document-based application using iqtdoc:

Application
|
+-- CMainWindowGuiComp (main window)
|
| |
| +-- Document views
|
+-- IDocumentManager
|
+-- IDocumentTemplate
|
+-- Documents
Standard main window component for any document-based application.
Qt-based workspace implementation of a single document manager.
Example: Single Document Application
// Configuration for a simple text editor
// Main window with standard menus and toolbars
MainWindow = CMainWindowGuiComp {
ApplicationInfo = ApplicationInfo
DocumentManager = DocumentManager
// Single document workspace
DocumentManager = DocumentManager
}
}
// Document manager
DocumentManager = CSingleDocumentManagerBase {
Template = TextDocumentTemplate
}
// Document template
TextDocumentTemplate = CSingleDocumentTemplateComp {
DocumentTypeId = "TextDocument"
DocumentTypeName = "Text Document"
DocumentFactory = CTextDocumentComp
ViewFactory = CTextEditorGuiComp
DocumentLoader = CTextFileLoaderComp
UndoManager = CSerializedUndoManagerComp
}
// Optional: Help system
HelpViewer = CHtmlHelpGuiComp {
HelpFileProvider = CDoxygenHelpFileProviderComp {
HelpDirectory = "doc/html"
}
}
}
Example: Multi-Document Application (MDI)
// Configuration for MDI application
DocumentManager = DocumentManager
// MDI-specific settings
ViewMode = "Tabbed" // or "Windowed"
IsViewCloseEnabled = true
}
// Use multi-document manager
CMultiDocumentManagerBase {
Template = CompositeTemplate
}
// Support multiple document types
CompositeTemplate = CCompositeDocumentTemplateComp {
Templates = [
TextDocumentTemplate,
ImageDocumentTemplate,
// ... more templates
]
}
This class is a Qt-based workspace implementation of a multi-document manager.
Help System Integration
// Get help viewer
idoc::IHelpViewer* helpViewer = GetHelpViewer();
// Show help for a specific context
QString contextText = "MainWindow";
helpViewer->ShowHelp(contextText, nullptr);
// Show help for an object
istd::IPolymorphic* obj = GetCurrentObject();
helpViewer->ShowHelp("", obj);
// Check help quality before showing
double quality = helpViewer->GetHelpQuality(contextText, obj);
if (quality > 0.5) {
// Good help available
helpViewer->ShowHelp(contextText, obj);
}
virtual double GetHelpQuality(const QString &contextText, const istd::IPolymorphic *contextObjectPtr) const =0
Get quality of help information for specified context and/or object.
Allow to show help document to specified object or text.
Definition IHelpViewer.h:45
virtual void ShowHelp(const QString &contextText, const istd::IPolymorphic *contextObjectPtr)=0
Show some help information for specified context.
Base interface for all used interfaces and implementations.
Recent Files
The main window automatically maintains a list of recently opened files:
// Recent files are automatically managed by CMainWindowGuiComp
// Configuration:
MaxRecentFiles = 10 // Maximum number of recent files to remember
}
// Recent files appear in File menu automatically
Undo/Redo UI Integration
// Undo/redo commands are automatically integrated
// into the Edit menu by CMainWindowGuiComp
// Provide undo manager commands to UI
DocumentManager = DocumentManager
}
// Commands will show descriptions from undo manager
See also
idoc namespace for core document/view interfaces