void TimelineSideBarWidget::slotInit() { // Date Maps are loaded from AlbumManager to TimeLineWidget after than GUI is initialized. // AlbumManager query Date KIO slave to stats items from database and it can take a while. // We waiting than TimeLineWidget is ready before to set last config from users. loadState(); disconnect(d->timeLineWidget, SIGNAL(signalDateMapChanged()), this, SLOT(slotInit())); connect(d->timeLineWidget, SIGNAL(signalDateMapChanged()), this, SLOT(slotCursorPositionChanged())); }
PowerlineDeviceName::PowerlineDeviceName(QWidget *parent) : QDialog(parent) ,ui(new Ui::PowerlineDeviceName) ,m_bMove(false) { ui->setupUi(this); Init(); slotInit(); initLanguage(); retranslateUi(); }
int show_mask1(PARAM *p) { DATA d; char event[MAX_EVENT_LENGTH]; char text[MAX_EVENT_LENGTH]; char str1[MAX_EVENT_LENGTH]; int i,w,h,val,x,y,button,ret; float xval, yval; defineMask(p); //rlSetDebugPrintf(1); if((ret=slotInit(p,&d)) != 0) return ret; readData(&d); // from shared memory, database or something else showData(p,&d); pvClearMessageQueue(p); while(1) { pvPollEvent(p,event); switch(pvParseEvent(event, &i, text)) { case NULL_EVENT: readData(&d); // from shared memory, database or something else showData(p,&d); if((ret=slotNullEvent(p,&d)) != 0) return ret; break; case BUTTON_EVENT: if(trace) printf("BUTTON_EVENT id=%d\n",i); if((ret=slotButtonEvent(p,i,&d)) != 0) return ret; break; case BUTTON_PRESSED_EVENT: if(trace) printf("BUTTON_PRESSED_EVENT id=%d\n",i); if((ret=slotButtonPressedEvent(p,i,&d)) != 0) return ret; break; case BUTTON_RELEASED_EVENT: if(trace) printf("BUTTON_RELEASED_EVENT id=%d\n",i); if((ret=slotButtonReleasedEvent(p,i,&d)) != 0) return ret; break; case TEXT_EVENT: if(trace) printf("TEXT_EVENT id=%d %s\n",i,text); if((ret=slotTextEvent(p,i,&d,text)) != 0) return ret; break; case SLIDER_EVENT: sscanf(text,"(%d)",&val); if(trace) printf("SLIDER_EVENT val=%d\n",val); if((ret=slotSliderEvent(p,i,&d,val)) != 0) return ret; break; case CHECKBOX_EVENT: if(trace) printf("CHECKBOX_EVENT id=%d %s\n",i,text); if((ret=slotCheckboxEvent(p,i,&d,text)) != 0) return ret; break; case RADIOBUTTON_EVENT: if(trace) printf("RADIOBUTTON_EVENT id=%d %s\n",i,text); if((ret=slotRadioButtonEvent(p,i,&d,text)) != 0) return ret; break; case GL_INITIALIZE_EVENT: if(trace) printf("you have to call initializeGL()\n"); if((ret=slotGlInitializeEvent(p,i,&d)) != 0) return ret; break; case GL_PAINT_EVENT: if(trace) printf("you have to call paintGL()\n"); if((ret=slotGlPaintEvent(p,i,&d)) != 0) return ret; break; case GL_RESIZE_EVENT: sscanf(text,"(%d,%d)",&w,&h); if(trace) printf("you have to call resizeGL(w,h)\n"); if((ret=slotGlResizeEvent(p,i,&d,w,h)) != 0) return ret; break; case GL_IDLE_EVENT: if((ret=slotGlIdleEvent(p,i,&d)) != 0) return ret; break; case TAB_EVENT: sscanf(text,"(%d)",&val); if(trace) printf("TAB_EVENT(%d,page=%d)\n",i,val); if((ret=slotTabEvent(p,i,&d,val)) != 0) return ret; break; case TABLE_TEXT_EVENT: sscanf(text,"(%d,%d,",&x,&y); pvGetText(text,str1); if(trace) printf("TABLE_TEXT_EVENT(%d,%d,\"%s\")\n",x,y,str1); if((ret=slotTableTextEvent(p,i,&d,x,y,str1)) != 0) return ret; break; case TABLE_CLICKED_EVENT: sscanf(text,"(%d,%d,%d)",&x,&y,&button); if(trace) printf("TABLE_CLICKED_EVENT(%d,%d,button=%d)\n",x,y,button); if((ret=slotTableClickedEvent(p,i,&d,x,y,button)) != 0) return ret; break; case SELECTION_EVENT: sscanf(text,"(%d,",&val); pvGetText(text,str1); if(trace) printf("SELECTION_EVENT(column=%d,\"%s\")\n",val,str1); if((ret=slotSelectionEvent(p,i,&d,val,str1)) != 0) return ret; break; case CLIPBOARD_EVENT: sscanf(text,"(%d",&val); if(trace) printf("CLIPBOARD_EVENT(id=%d)\n",val); if(trace) printf("clipboard = \n%s\n",p->clipboard); if((ret=slotClipboardEvent(p,i,&d,val)) != 0) return ret; break; case RIGHT_MOUSE_EVENT: if(trace) printf("RIGHT_MOUSE_EVENT id=%d text=%s\n",i,text); if((ret=slotRightMouseEvent(p,i,&d,text)) != 0) return ret; break; case KEYBOARD_EVENT: sscanf(text,"(%d",&val); if(trace) printf("KEYBOARD_EVENT modifier=%d key=%d\n",i,val); if((ret=slotKeyboardEvent(p,i,&d,val,i)) != 0) return ret; break; case PLOT_MOUSE_MOVED_EVENT: sscanf(text,"(%f,%f)",&xval,&yval); if(trace) printf("PLOT_MOUSE_MOVE %f %f\n",xval,yval); if((ret=slotMouseMovedEvent(p,i,&d,xval,yval)) != 0) return ret; break; case PLOT_MOUSE_PRESSED_EVENT: sscanf(text,"(%f,%f)",&xval,&yval); if(trace) printf("PLOT_MOUSE_PRESSED %f %f\n",xval,yval); if((ret=slotMousePressedEvent(p,i,&d,xval,yval)) != 0) return ret; break; case PLOT_MOUSE_RELEASED_EVENT: sscanf(text,"(%f,%f)",&xval,&yval); if(trace) printf("PLOT_MOUSE_RELEASED %f %f\n",xval,yval); if((ret=slotMouseReleasedEvent(p,i,&d,xval,yval)) != 0) return ret; break; case MOUSE_OVER_EVENT: sscanf(text,"%d",&val); if(trace) printf("MOUSE_OVER_EVENT %d\n",val); if((ret=slotMouseOverEvent(p,i,&d,val)) != 0) return ret; break; case USER_EVENT: if(trace) printf("USER_EVENT id=%d %s\n",i,text); if((ret=slotUserEvent(p,i,&d,text)) != 0) return ret; break; default: if(trace) printf("UNKNOWN_EVENT id=%d %s\n",i,text); break; } } }
void KMMainView::initActions() { KIconSelectAction *vact = new KIconSelectAction(i18n("&View"), 0, m_actions, "view_change"); QStringList iconlst; iconlst << "view_icon" << "view_detailed" << "view_tree"; vact->setItems(QStringList::split(',', i18n("&Icons,&List,&Tree"), false), iconlst); vact->setCurrentItem(0); connect(vact, SIGNAL(activated(int)), SLOT(slotChangeView(int))); KActionMenu *stateAct = new KActionMenu(i18n("Start/Stop Printer"), "kdeprint_printstate", m_actions, "printer_state_change"); stateAct->setDelayed(false); stateAct->insert( new KAction(i18n("&Start Printer"), "kdeprint_enableprinter", 0, this, SLOT(slotChangePrinterState()), m_actions, "printer_start")); stateAct->insert(new KAction(i18n("Sto&p Printer"), "kdeprint_stopprinter", 0, this, SLOT(slotChangePrinterState()), m_actions, "printer_stop")); stateAct = new KActionMenu(i18n("Enable/Disable Job Spooling"), "kdeprint_queuestate", m_actions, "printer_spool_change"); stateAct->setDelayed(false); stateAct->insert( new KAction(i18n("&Enable Job Spooling"), "kdeprint_enableprinter", 0, this, SLOT(slotChangePrinterState()), m_actions, "printer_enable")); stateAct->insert( new KAction(i18n("&Disable Job Spooling"), "kdeprint_stopprinter", 0, this, SLOT(slotChangePrinterState()), m_actions, "printer_disable")); new KAction(i18n("&Remove"), "edittrash", 0, this, SLOT(slotRemove()), m_actions, "printer_remove"); new KAction(i18n("&Configure..."), "configure", 0, this, SLOT(slotConfigure()), m_actions, "printer_configure"); new KAction(i18n("Add &Printer/Class..."), "kdeprint_addprinter", 0, this, SLOT(slotAdd()), m_actions, "printer_add"); new KAction(i18n("Add &Special (pseudo) Printer..."), "kdeprint_addpseudo", 0, this, SLOT(slotAddSpecial()), m_actions, "printer_add_special"); new KAction(i18n("Set as &Local Default"), "kdeprint_defaulthard", 0, this, SLOT(slotHardDefault()), m_actions, "printer_hard_default"); new KAction(i18n("Set as &User Default"), "kdeprint_defaultsoft", 0, this, SLOT(slotSoftDefault()), m_actions, "printer_soft_default"); new KAction(i18n("&Test Printer..."), "kdeprint_testprinter", 0, this, SLOT(slotTest()), m_actions, "printer_test"); new KAction(i18n("Configure &Manager..."), "kdeprint_configmgr", 0, this, SLOT(slotManagerConfigure()), m_actions, "manager_configure"); new KAction(i18n("Initialize Manager/&View"), "reload", 0, this, SLOT(slotInit()), m_actions, "view_refresh"); KIconSelectAction *dact = new KIconSelectAction(i18n("&Orientation"), 0, m_actions, "orientation_change"); iconlst.clear(); iconlst << "view_top_bottom" << "view_left_right"; dact->setItems(QStringList::split(',', i18n("&Vertical,&Horizontal"), false), iconlst); dact->setCurrentItem(0); connect(dact, SIGNAL(activated(int)), SLOT(slotChangeDirection(int))); new KAction(i18n("R&estart Server"), "kdeprint_restartsrv", 0, this, SLOT(slotServerRestart()), m_actions, "server_restart"); new KAction(i18n("Configure &Server..."), "kdeprint_configsrv", 0, this, SLOT(slotServerConfigure()), m_actions, "server_configure"); KToggleAction *tact = new KToggleAction(i18n("Show &Toolbar"), 0, m_actions, "view_toolbar"); tact->setCheckedState(i18n("Hide &Toolbar")); connect(tact, SIGNAL(toggled(bool)), SLOT(slotToggleToolBar(bool))); tact = new KToggleAction(i18n("Show Me&nu Toolbar"), 0, m_actions, "view_menubar"); tact->setCheckedState(i18n("Hide Me&nu Toolbar")); connect(tact, SIGNAL(toggled(bool)), SLOT(slotToggleMenuBar(bool))); tact = new KToggleAction(i18n("Show Pr&inter Details"), "kdeprint_printer_infos", 0, m_actions, "view_printerinfos"); tact->setCheckedState(KGuiItem(i18n("Hide Pr&inter Details"), "kdeprint_printer_infos")); tact->setChecked(true); connect(tact, SIGNAL(toggled(bool)), SLOT(slotShowPrinterInfos(bool))); tact = new KToggleAction(i18n("Toggle Printer &Filtering"), "filter", 0, m_actions, "view_pfilter"); tact->setChecked(KMManager::self()->isFilterEnabled()); connect(tact, SIGNAL(toggled(bool)), SLOT(slotToggleFilter(bool))); new KAction(i18n("%1 &Handbook").arg("KDEPrint"), "contents", 0, this, SLOT(slotHelp()), m_actions, "invoke_help"); new KAction(i18n("%1 &Web Site").arg("KDEPrint"), "network", 0, this, SLOT(slotHelp()), m_actions, "invoke_web"); KActionMenu *mact = new KActionMenu(i18n("Pri&nter Tools"), "package_utilities", m_actions, "printer_tool"); mact->setDelayed(false); connect(mact->popupMenu(), SIGNAL(activated(int)), SLOT(slotToolSelected(int))); QStringList files = KGlobal::dirs()->findAllResources("data", "kdeprint/tools/*.desktop"); for(QStringList::ConstIterator it = files.begin(); it != files.end(); ++it) { KSimpleConfig conf(*it); conf.setGroup("Desktop Entry"); mact->popupMenu()->insertItem(conf.readEntry("Name", "Unnamed"), mact->popupMenu()->count()); m_toollist << conf.readEntry("X-KDE-Library"); } // add actions to the toolbar m_actions->action("printer_add")->plug(m_toolbar); m_actions->action("printer_add_special")->plug(m_toolbar); m_toolbar->insertLineSeparator(); m_actions->action("printer_state_change")->plug(m_toolbar); m_actions->action("printer_spool_change")->plug(m_toolbar); m_toolbar->insertSeparator(); m_actions->action("printer_hard_default")->plug(m_toolbar); m_actions->action("printer_soft_default")->plug(m_toolbar); m_actions->action("printer_remove")->plug(m_toolbar); m_toolbar->insertSeparator(); m_actions->action("printer_configure")->plug(m_toolbar); m_actions->action("printer_test")->plug(m_toolbar); m_actions->action("printer_tool")->plug(m_toolbar); m_pactionsindex = m_toolbar->insertSeparator(); m_toolbar->insertLineSeparator(); m_actions->action("server_restart")->plug(m_toolbar); m_actions->action("server_configure")->plug(m_toolbar); m_toolbar->insertLineSeparator(); m_actions->action("manager_configure")->plug(m_toolbar); m_actions->action("view_refresh")->plug(m_toolbar); m_toolbar->insertLineSeparator(); m_actions->action("view_printerinfos")->plug(m_toolbar); m_actions->action("view_change")->plug(m_toolbar); m_actions->action("orientation_change")->plug(m_toolbar); m_actions->action("view_pfilter")->plug(m_toolbar); // add actions to the menu bar QPopupMenu *menu = new QPopupMenu(this); m_actions->action("printer_add")->plug(menu); m_actions->action("printer_add_special")->plug(menu); // m_menubar->insertItem( i18n( "Add" ), menu ); m_menubar->insertButton("wizard", 0, true, i18n("Add")); m_menubar->getButton(0)->setPopup(menu, true); menu = new QPopupMenu(this); m_actions->action("printer_state_change")->plug(menu); m_actions->action("printer_spool_change")->plug(menu); menu->insertSeparator(); m_actions->action("printer_hard_default")->plug(menu); m_actions->action("printer_soft_default")->plug(menu); m_actions->action("printer_remove")->plug(menu); menu->insertSeparator(); m_actions->action("printer_configure")->plug(menu); m_actions->action("printer_test")->plug(menu); m_actions->action("printer_tool")->plug(menu); menu->insertSeparator(); // m_menubar->insertItem( i18n( "Printer" ), menu ); m_menubar->insertButton("printer1", 1, true, i18n("Printer")); m_menubar->getButton(1)->setPopup(menu, true); menu = new QPopupMenu(this); m_actions->action("server_restart")->plug(menu); m_actions->action("server_configure")->plug(menu); // m_menubar->insertItem( i18n( "Server" ), menu ); m_menubar->insertButton("misc", 2, true, i18n("Print Server")); m_menubar->getButton(2)->setPopup(menu, true); menu = new QPopupMenu(this); m_actions->action("manager_configure")->plug(menu); m_actions->action("view_refresh")->plug(menu); // m_menubar->insertItem( i18n( "Manager" ), menu ); m_menubar->insertButton("kdeprint_configmgr", 3, true, i18n("Print Manager")); m_menubar->getButton(3)->setPopup(menu, true); menu = new QPopupMenu(this); m_actions->action("view_printerinfos")->plug(menu); m_actions->action("view_change")->plug(menu); m_actions->action("orientation_change")->plug(menu); m_actions->action("view_toolbar")->plug(menu); m_actions->action("view_menubar")->plug(menu); menu->insertSeparator(); m_actions->action("view_pfilter")->plug(menu); // m_menubar->insertItem( i18n( "View" ), menu ); m_menubar->insertButton("view_remove", 4, true, i18n("View")); m_menubar->getButton(4)->setPopup(menu, true); // m_menubar->setMinimumHeight( m_menubar->heightForWidth( 1000 ) ); menu = new QPopupMenu(this); m_actions->action("invoke_help")->plug(menu); m_actions->action("invoke_web")->plug(menu); m_menubar->insertButton("help", 5, true, i18n("Documentation")); m_menubar->getButton(5)->setPopup(menu, true); loadPluginActions(); slotPrinterSelected(QString::null); }
TimelineSideBarWidget::TimelineSideBarWidget(QWidget* parent, SearchModel* searchModel, SearchModificationHelper* searchModificationHelper) : SidebarWidget(parent), d(new TimelineSideBarWidgetPriv) { setObjectName("TimeLine Sidebar"); d->searchModificationHelper = searchModificationHelper; d->timer = new QTimer(this); setAttribute(Qt::WA_DeleteOnClose); QVBoxLayout* vlay = new QVBoxLayout(this); QFrame* panel = new QFrame(this); panel->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); panel->setLineWidth(1); QGridLayout* grid = new QGridLayout(panel); // --------------------------------------------------------------- QWidget* hbox1 = new QWidget(panel); QHBoxLayout* hlay = new QHBoxLayout(hbox1); QLabel* label1 = new QLabel(i18n("Time Unit:"), hbox1); d->timeUnitCB = new KComboBox(hbox1); d->timeUnitCB->addItem(i18n("Day"), TimeLineWidget::Day); d->timeUnitCB->addItem(i18n("Week"), TimeLineWidget::Week); d->timeUnitCB->addItem(i18n("Month"), TimeLineWidget::Month); d->timeUnitCB->addItem(i18n("Year"), TimeLineWidget::Year); d->timeUnitCB->setCurrentIndex((int)TimeLineWidget::Month); d->timeUnitCB->setFocusPolicy(Qt::NoFocus); d->timeUnitCB->setWhatsThis(i18n("<p>Select the histogram time unit.</p>" "<p>You can change the graph decade to zoom in or zoom out over time.</p>")); QWidget* scaleBox = new QWidget(hbox1); QHBoxLayout* hlay2 = new QHBoxLayout(scaleBox); d->scaleBG = new QButtonGroup(scaleBox); d->scaleBG->setExclusive(true); scaleBox->setWhatsThis( i18n("<p>Select the histogram scale.</p>" "<p>If the date's maximal counts are small, you can use the linear scale.</p>" "<p>Logarithmic scale can be used when the maximal counts are big; " "if it is used, all values (small and large) will be visible on the " "graph.</p>")); QToolButton* linHistoButton = new QToolButton(scaleBox); linHistoButton->setToolTip( i18n( "Linear" ) ); linHistoButton->setIcon(KIcon("view-object-histogram-linear")); linHistoButton->setCheckable(true); d->scaleBG->addButton(linHistoButton, TimeLineWidget::LinScale); QToolButton* logHistoButton = new QToolButton(scaleBox); logHistoButton->setToolTip( i18n( "Logarithmic" ) ); logHistoButton->setIcon(KIcon("view-object-histogram-logarithmic")); logHistoButton->setCheckable(true); d->scaleBG->addButton(logHistoButton, TimeLineWidget::LogScale); hlay2->setMargin(0); hlay2->setSpacing(0); hlay2->addWidget(linHistoButton); hlay2->addWidget(logHistoButton); hlay->setMargin(0); hlay->setSpacing(KDialog::spacingHint()); hlay->addWidget(label1); hlay->addWidget(d->timeUnitCB); hlay->addItem(new QSpacerItem(10, 10, QSizePolicy::Expanding, QSizePolicy::Minimum)); hlay->addWidget(scaleBox); // --------------------------------------------------------------- d->timeLineWidget = new TimeLineWidget(panel); d->scrollBar = new QScrollBar(panel); d->scrollBar->setOrientation(Qt::Horizontal); d->scrollBar->setMinimum(0); d->scrollBar->setSingleStep(1); d->cursorDateLabel = new KSqueezedTextLabel(0, panel); d->cursorCountLabel = new QLabel(panel); d->cursorCountLabel->setAlignment(Qt::AlignRight); // --------------------------------------------------------------- KHBox* hbox2 = new KHBox(panel); hbox2->setMargin(0); hbox2->setSpacing(KDialog::spacingHint()); d->resetButton = new QToolButton(hbox2); d->resetButton->setIcon(SmallIcon("document-revert")); d->resetButton->setToolTip(i18n("Clear current selection")); d->resetButton->setWhatsThis(i18n("If you press this button, the current date selection on the time-line will be cleared.")); d->nameEdit = new KLineEdit(hbox2); d->nameEdit->setClearButtonShown(true); d->nameEdit->setWhatsThis(i18n("Enter the name of the current dates search to save in the " "\"My Date Searches\" view")); d->saveButton = new QToolButton(hbox2); d->saveButton->setIcon(SmallIcon("document-save")); d->saveButton->setEnabled(false); d->saveButton->setToolTip(i18n("Save current selection to a new virtual Album")); d->saveButton->setWhatsThis(i18n("If you press this button, the dates selected on the time-line will be " "saved to a new search virtual Album using the name set on the left.")); // --------------------------------------------------------------- grid->addWidget(hbox1, 0, 0, 1, 4); grid->addWidget(d->cursorDateLabel, 1, 0, 1, 3); grid->addWidget(d->cursorCountLabel, 1, 3, 1, 1); grid->addWidget(d->timeLineWidget, 2, 0, 1, 4); grid->addWidget(d->scrollBar, 3, 0, 1, 4); grid->addWidget(hbox2, 4, 0, 1, 4); grid->setColumnStretch(2, 10); grid->setMargin(KDialog::spacingHint()); grid->setSpacing(KDialog::spacingHint()); // --------------------------------------------------------------- d->timeLineFolderView = new EditableSearchTreeView(this, searchModel, searchModificationHelper); d->timeLineFolderView->setConfigGroup(getConfigGroup()); d->timeLineFolderView->filteredModel()->listTimelineSearches(); d->timeLineFolderView->filteredModel()->setListTemporarySearches(false); d->timeLineFolderView->setAlbumManagerCurrentAlbum(true); d->searchDateBar = new SearchTextBar(this, "TimeLineViewSearchDateBar"); d->searchDateBar->setModel(d->timeLineFolderView->filteredModel(), AbstractAlbumModel::AlbumIdRole, AbstractAlbumModel::AlbumTitleRole); d->searchDateBar->setFilterModel(d->timeLineFolderView->albumFilterModel()); vlay->addWidget(panel); vlay->addWidget(d->timeLineFolderView); vlay->addItem(new QSpacerItem(KDialog::spacingHint(), KDialog::spacingHint(), QSizePolicy::Minimum, QSizePolicy::Minimum)); vlay->addWidget(d->searchDateBar); vlay->setMargin(0); vlay->setSpacing(0); // --------------------------------------------------------------- connect(AlbumManager::instance(), SIGNAL(signalDatesMapDirty(const QMap<QDateTime, int>&)), d->timeLineWidget, SLOT(slotDatesMap(const QMap<QDateTime, int>&))); connect(d->timeLineFolderView, SIGNAL(currentAlbumChanged(Album*)), this, SLOT(slotAlbumSelected(Album*))); connect(d->timeUnitCB, SIGNAL(activated(int)), this, SLOT(slotTimeUnitChanged(int))); connect(d->scaleBG, SIGNAL(buttonReleased(int)), this, SLOT(slotScaleChanged(int))); connect(d->timeLineWidget, SIGNAL(signalDateMapChanged()), this, SLOT(slotInit())); connect(d->timeLineWidget, SIGNAL(signalCursorPositionChanged()), this, SLOT(slotCursorPositionChanged())); connect(d->timeLineWidget, SIGNAL(signalSelectionChanged()), this, SLOT(slotSelectionChanged())); connect(d->timeLineWidget, SIGNAL(signalRefDateTimeChanged()), this, SLOT(slotRefDateTimeChanged())); connect(d->timer, SIGNAL(timeout()), this, SLOT(slotUpdateCurrentDateSearchAlbum())); connect(d->resetButton, SIGNAL(clicked()), this, SLOT(slotResetSelection())); connect(d->saveButton, SIGNAL(clicked()), this, SLOT(slotSaveSelection())); connect(d->scrollBar, SIGNAL(valueChanged(int)), this, SLOT(slotScrollBarValueChanged(int))); connect(d->nameEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotCheckAboutSelection())); connect(d->nameEdit, SIGNAL(returnPressed(const QString&)), d->saveButton, SLOT(animateClick())); }
void EditorTool::init() { QTimer::singleShot(0, this, SLOT(slotInit())); }