Hi:
I want to use class ccOverlayDialog in own plugin, when I read the code, I found that cloudcompare use a function called registerMDIDialog which is a protected function to add overlay dialog onto main dialog. However, because the priviledge of this function is protected, I could not call it in my own plugin even I have obtained the pointer of mainWindow. So, if I want to add my own overlay dialog onto mainWindow, what should I do?
ps: I want to write a plugin just like segmentationTools.
If I want to use ccOverlayDialog in my own plugin, what should I do?
-
- Posts: 16
- Joined: Mon Sep 26, 2016 12:46 am
Re: If I want to use ccOverlayDialog in my own plugin, what should I do?
We need to add the mechanism to let plugins create and register their own 'ccOverlayDialog' instances. That's already in the pipe. I'll try to add this quickly.
Daniel, CloudCompare admin
Re: If I want to use ccOverlayDialog in my own plugin, what should I do?
Okay,
You can now create your own implementations of ccOverlayDialog (just inherit this class). And then you can 'register' them to the main window (with ccMainAppInterface::registerOverlayDialog).
See how this is done in mainwindow.cpp with other overlay dialogs (see MainWindow::activateSegmentationMode for instance).
You can now create your own implementations of ccOverlayDialog (just inherit this class). And then you can 'register' them to the main window (with ccMainAppInterface::registerOverlayDialog).
See how this is done in mainwindow.cpp with other overlay dialogs (see MainWindow::activateSegmentationMode for instance).
Daniel, CloudCompare admin
Re: If I want to use ccOverlayDialog in my own plugin, what should I do?
happy weekend!
I am so excited that I found this post.
My plug-in uses qt code to create a Qwidget form, with buttons, labels and other controls on it.
Your registerOverlayDialog() function needs ccOverlayDialog type, but I am qwidget, I don’t know what to do
Qwidget *widget = new Qwidget();
registerOverlayDialog(widget,Qt::TopRightCorner);
For example, I want to hang my form in the upper right corner.
I am so excited that I found this post.
My plug-in uses qt code to create a Qwidget form, with buttons, labels and other controls on it.
Your registerOverlayDialog() function needs ccOverlayDialog type, but I am qwidget, I don’t know what to do
Qwidget *widget = new Qwidget();
registerOverlayDialog(widget,Qt::TopRightCorner);
For example, I want to hang my form in the upper right corner.
Re: If I want to use ccOverlayDialog in my own plugin, what should I do?
Well, the whole purpose of ccOverlayDialog is to let CloudCompare manage it as an overlay widget, repositioning it whenever necessary, etc. ;)
I bet the only solution is to make your widget do the jog (registering to the all the useful signals the various components of CC involved in this process may emit).
I bet the only solution is to make your widget do the jog (registering to the all the useful signals the various components of CC involved in this process may emit).
Daniel, CloudCompare admin
Re: If I want to use ccOverlayDialog in my own plugin, what should I do?
I'm sorry, I can't understand what you mean. Could you explain it?
I bet the only solution is to make your widget do the jog (registering to the all the useful signals the various components of CC involved in this process may emit).
I bet the only solution is to make your widget do the jog (registering to the all the useful signals the various components of CC involved in this process may emit).
Re: If I want to use ccOverlayDialog in my own plugin, what should I do?
Sorry, instead of jog, it was 'job' ;)
Daniel, CloudCompare admin
Re: If I want to use ccOverlayDialog in my own plugin, what should I do?
Hahaha!
I need to fix my plug-in form in the upper right corner. Does cloudcompare currently have plug-ins that I can refer to? Do you have any suggestions? Thank you!
I need to fix my plug-in form in the upper right corner. Does cloudcompare currently have plug-ins that I can refer to? Do you have any suggestions? Thank you!
Re: If I want to use ccOverlayDialog in my own plugin, what should I do?
I'm sorry, I have so many questions.
I'm in the process of plug-in development, and I'm about to finish, but cc warned!
[Qt WARNING] [] QAbstractItemModel::endInsertRows: Invalid index ( 5 , 0 ) in model ccDBRoot(0x55b5ab379f50)
I can't find a reason for the error.
I'm in the process of plug-in development, and I'm about to finish, but cc warned!
[Qt WARNING] [] QAbstractItemModel::endInsertRows: Invalid index ( 5 , 0 ) in model ccDBRoot(0x55b5ab379f50)
I can't find a reason for the error.
Re: If I want to use ccOverlayDialog in my own plugin, what should I do?
Well, first it's just a warning (not an error). And then, it might mean that you inserted objects in the database that have disappeared afterwards (while still being referenced in the database). This may lead to a crash...
Daniel, CloudCompare admin