PDA

View Full Version : Com objects and Events



rosch
11th October 2010, 19:29
Hello,

I have a Question about the QEvent class. I'm trying to catch a powerpoint event, like SlideShowNextSlide Event (http://msdn.microsoft.com/en-us/library/bb839450%28v=office.12%29.aspx). On the Qt Reference (ActiveQt) it says that it works!

Is it possible? and when yes, how can i do it?
I searched all the way in the Internet but i didn't found something that helps me out.

i appreciate your help!

greets Rosch

tbscope
11th October 2010, 19:41
Take a look at this example:
http://doc.qt.nokia.com/4.7/activeqt-qutlook.html

rosch
8th November 2010, 11:34
Hi all,
Thanks for the reply!
I tried to do so like it says in the Example. All worked fine except for the Event connection with Signals & Slots. After looking into to the generated MSPPT.ccp (dumpcpp) i find out that all Event from the Application Object are simply not there!
I've got some snippet here.
First the generate File from the outlook example:

static const char *qt_meta_stringdata_Outlook__MailItem() {
static const char stringdata0[] = {
"Outlook::MailItem\0"
"Event Interface 1\0ItemEvents\0Event Interface 2\0ItemEvents_10\0Interface 0\0_MailItem\0"
"AttachmentAdd(Attachment*)\0Attachment\0\0\0Attach mentRead(Attachment*)\0Attachment\0\0\0AttachmentR emove(Attachment*)\0Attachment\0"
"\0\0BeforeAttachmentAdd(Attachment*,bool&)\0Attachment,Cancel\0\0\0BeforeAttachmentPreview( Attachment*,bool&)\0Attachment,Cancel


As we can see, the event like AttachmentAdd(..) are inside this class but

static const char *qt_meta_stringdata_PowerPoint__Application() {
static const char stringdata0[] = {
"PowerPoint::Application\0"
"Event Interface 1\0EApplication\0Interface 0\0_Application\0"
"exception(int,QString,QString,QString)\0code,sourc e,disc,help\0\0\0propertyChanged(QString)\0name\0\ 0\0signal(QString,int,void*)\0name,argc,argv\0\0\0"
"Activate()\0"
"\0\0\0FileDialog(Office::MsoFileDialogType)\0Type\ 0Office::FileDialog*\0\0GetOptionFlag(int)\0Option \0bool\0\0GetOptionFlag(int,bool)\0Option,Persist\ 0bool\0\0Help()\0\0\0\0Help(QString)\0HelpFile\0\0 \0Help(QString,int)\0HelpFile,ContextID\0"
"\0\0LaunchPubliog(QString)\0SlideLibraryUrl\0\0\0L aunchSendToPPTDialog(QVariant&)\0SlideUrls\0\0\0LaunchSpelling(DocumentWindow*)\ 0pWindow\0\0\0PPFileDialog(PpFileDialogType)\0Type \0IUnknown*\0\0Quit()\0\0\0\0Run(QString,QVariantL ist&)\0"
"MacroName,safeArrayOfParams\0QVariant\0\0SetAutoma tionSecurity(Office::MsoAutomationSecurity)\0Autom ationSecurity\0\0\0SetCaption(QString)\0Caption\0\ 0\0SetDisplayAlerts(PpAlertLevel)\0DisplayAlerts\0 \0\0SetDisplayDocumentInformationPanel(bool)\0"
"DisplayDocumentInformationPanel\0\0\0SetDisplayGri dLines(Office::MsoTriState)\0DisplayGridLines\0\0\ 0SetFeatureInstall(Office::MsoFeatureInstall)\0Fea tureInstall\0\0\0SetHeight(double)\0Height\0\0\0Se tLeft(double)\0Left\0"
"\0\0SetOptionFlag(int,bool)\0Option,State\0\0\0Set OptionFlag(int,bool,bool)\0Option,State,Persist\0\ 0\0SetPerfMarker(int)\0Marker\0\0\0SetShowStartupD ialog(Office::MsoTriState)\0ShowStartupDialog\0\0\ 0SetShowWindowsInTaskbar(Office::MsoTriState)\0"
"ShowWindowsInTaskbar\0\0\0SetTop(double)\0Top\0\0\ 0SetVisible(Office::MsoTriState)\0Visible\0\0\0Set Width(double)\0Width\0\0\0SetWindowState(PpWindowS tate)\0WindowState\0\0\0"
"Active\0Office::MsoTriState\0ActiveEncryptionSessi on\0"
"int\0ActivePresentation\0Presentation*\0ActivePrin ter\0QString\0ActiveWindow\0DocumentWindow*\0AddIn s\0AddIns*\0AnswerWizard\0Office::AnswerWizard*\0A ssistance\0Office::IAssistance*\0Assistant\0Office ::Assistant*\0AutoCorrect\0"
"AutoCorrect*\0AutomationSecurity\0Office::MsoAutom ationSecurity\0Build\0QString\0COMAddIns\0Office:: COMAddIns*\0Caption\0QString\0CommandBars\0Office: :CommandBars*\0Creator\0int\0DefaultWebOptions\0De faultWebOptions*\0"
"Dialogs\0IUnknown*\0DisplayAlerts\0PpAlertLevel\0D isplayDocumentInformationPanel\0bool\0DisplayGridL ines\0Office::MsoTriState\0FeatureInstall\0Office: :MsoFeatureInstall\0FileConverters\0FileConverters *\0FileFind\0Office::IFind*\0"
"FileSearch\0Office::FileSearch*\0HWND\0int\0Height \0double\0LanguageSettings\0Office::LanguageSettin gs*\0Left\0double\0Marker\0IUnknown*\0MsoDebugOpti ons\0Office::MsoDebugOptions*\0Name\0QString\0NewP resentation\0Office::NewFile*\0"
"OperatingSystem\0QString\0Options\0Options*\0Path\ 0QString\0Presentations\0Presentations*\0ProductCo de\0QString\0ShowStartupDialog\0Office::MsoTriStat e\0ShowWindowsInTaskbar\0Office::MsoTriState\0Slid eShowWindows\0SlideShowWindows*\0"
"Top\0double\0VBE\0VBIDE::VBE*\0Version\0QString\0V isible\0Office::MsoTriState\0Width\0double\0Window State\0PpWindowState\0Windows\0DocumentWindows*\0"

there is no Event like it should be!

Maybe someone can tell me how i can handle this problem. Maybe i generated the Class wrong


TARGET = pptSync
TEMPLATE = app
CONFIG += console qaxContainer
TYPELIBS = $$system(dumpcpp -getfile = {91493440-5A91-11CF-8700-00AA0060263B}

i really would be pleased for a little help in here