void Application::start() { std::string boardSubdirectory("boards"); boardLoader.loadBoards(utility::Environment::getGlobalResourcePath() + boardSubdirectory); boardLoader.loadBoards(utility::Environment::getPreferencesPath() + boardSubdirectory); std::string armySubdirectory("armies"); armyLoader.loadArmies(utility::Environment::getGlobalResourcePath() + armySubdirectory); armyLoader.loadArmies(utility::Environment::getPreferencesPath() + armySubdirectory); sigModified(*this); server.beginConfiguration(); sigModified(*this); }
MdiEditor::MdiEditor(QApplication* app,QWidget *parent) : QMainWindow(parent) { _app=app; readyLabel=NULL; new_pro=save_pro=mod_para=NULL; imageEditorL = new ImageEditor('L'); imageEditorR = new ImageEditor('R'); imageEditorM = new HalfwayImage('M'); widgetA = new QWidget(); imageEditorA = new RenderWidget(); ctrbar=new CCtrBar(); for(int i=0;i<MAX_LAYER;i++) { match_thread[i]=NULL; match_thread_GPU[i]=NULL; poison_thread[i]=NULL; qpath_thread[i]=NULL; } createDockWidget(); createMenuBar(); createStatusBar(); gpu_flag=FALSE; gpu_cap=CudaInit(); connect(imageEditorL,SIGNAL(sigUpdate()),this,SLOT(updateALL())); connect(imageEditorR,SIGNAL(sigUpdate()),this,SLOT(updateALL())); connect(imageEditorM,SIGNAL(sigUpdate()),this,SLOT(updateALL())); connect(ctrbar,SIGNAL(sigUpdate()),this,SLOT(updateALL())); connect(imageEditorL,SIGNAL(sigModified()),this,SLOT(PtModified())); connect(imageEditorR,SIGNAL(sigModified()),this,SLOT(PtModified())); connect(imageEditorM,SIGNAL(sigModified()),this,SLOT(PtModified())); connect(imageEditorL,SIGNAL(sigLayerReorder(char, bool,float, float)),this,SLOT(ReorderLayer(char, bool,float, float))); connect(imageEditorR,SIGNAL(sigLayerReorder(char, bool,float, float)),this,SLOT(ReorderLayer(char, bool,float, float))); connect(ctrbar,SIGNAL(sigStatusChange(int)),imageEditorA,SLOT(StatusChange(int))); connect(ctrbar,SIGNAL(sigRangeChange(int)),imageEditorA,SLOT(RangeChange(int))); connect(imageEditorA,SIGNAL(sigRecordFinished()),ctrbar,SLOT(record_finished())); connect(imageEditorA,SIGNAL(sigRecordFinished()),this,SLOT(AutoQuit())); layer_num=0; layer_index=0; clear(); setWindowTitle(tr("Pixel Morph")); showMaximized(); }
void MdiEditor::ModifyPara() { CDlgPara dlg(parameters[layer_index]); connect(&dlg,SIGNAL(sigModified()),this,SLOT(PtModified())); dlg.exec(); }
void FromToEntryPage::slotNever() { m_practiceDateChanged = true; queryDateEdit->setDate(queryDateEdit->minimumDate()); queryDateEdit->setTime(queryDateEdit->minimumTime()); emit sigModified(); }
void ImageEditor::mouseReleaseEvent(QMouseEvent *event) { if (!_image_loaded||event->pos().x()>_real_size.width()-1||event->pos().y()>=_real_size.height()-1) return; if (!_scissor&&!_flag_multilayer) { emit sigModified(); } }
void VariableArrayElementEditor::openEditor( MetaClass * mc, card32 index ) { delete m_ActEditor; m_ActPropertyEditor = (PropertyEditor *)mc->newInstance(); pointer_diff offset = getOffset() + m_Property->getDiff( m_Object, index ); m_ActPropertyEditor->setup( m_Object, offset, m_Property->getElementClassProperty() ); m_ActEditor = m_ActPropertyEditor->makeEditor( m_EditorParent, m_ReadOnly ); m_EditorParent->layout()->addWidget( m_ActEditor ); connect( m_ActEditor, SIGNAL( destroyed(QObject*)), SLOT(sltEditorDestroyed(QObject *))); connect( m_ActEditor, SIGNAL( sigModified()), SLOT(sltModified())); }
void HalfwayImage::mouseReleaseEvent(QMouseEvent *event) { if (_scissor||_flag_error||_flag_multilayer||!_image_loaded) return; if (_pressed) { _pressed=false; _mouse_pos=_mouse_pos=QPointF(((float)event->pos().x()+0.5)/(float)_real_size.width(),((float)event->pos().y()+0.5)/(float)_real_size.height()); emit sigModified(); } }
EntryDlg::EntryDlg( KMainWindow *main, kvoctrainDoc *doc, bool multi_sel, bool origin, grade_t f_grd, grade_t t_grd, count_t f_qcount, count_t t_qcount, count_t f_bcount, count_t t_bcount, time_t f_qdate, time_t t_qdate, QString f_faux_ami, QString t_faux_ami, QString expr, int lesson, QComboBox *lessonbox, QString lang, LangSet &langset, QString rem, QString type, QString pronunce, QString synonym, QString antonym, QString example, QString usagelabel, QString paraphrase, const Conjugation &con_prefix, const Conjugation &conjugations, const Article &/*article*/, const Comparison &comp, const MultipleChoice &mc, QueryManager &querymanager, const QString &title, bool active, const QFont& ipafont, QWidget *parent, const char *name, bool modal) : KDialogBase(Tabbed, title, User1|User2|User3|Apply|Close, Apply, parent, name, modal, false, KGuiItem(i18n("&Reset")), KGuiItem(QString::null, "view_left_right"), KGuiItem(QString::null, "view_top_bottom")) { mainwin = main; docked = false; edit_row = -1; edit_col = -1; from_page = 0; to_page = 0; QString s; if (langset.findLongId(lang).isEmpty() ) s = lang; else s = langset.findLongId(lang); QFrame *page; QVBoxLayout *topLayout; if (origin) { page = addPage( i18n("Co&mmon") ); topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() ); comm_page = new CommonEntryPage (this, doc, multi_sel, expr, lesson, lessonbox, lang, type, pronunce, usagelabel, i18n("Original &expression in %1:").arg(s), querymanager, active, ipafont, page, name); topLayout->addWidget(comm_page); page = addPage( i18n("A&dditional") ); topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() ); aux_page = new AuxInfoEntryPage (this, multi_sel, synonym, antonym, example, rem, paraphrase, page, name); topLayout->addWidget(aux_page); page = addPage( i18n("&Multiple Choice") ); topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() ); mc_page = new MCEntryPage (this, multi_sel, mc, page, "MultipleChoice"); topLayout->addWidget(mc_page); page = addPage( i18n("Con&jugation") ); topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() ); tense_page = new TenseEntryPage (this, multi_sel, con_prefix, conjugations, page, "Conjugation"); topLayout->addWidget(tense_page); page = addPage( i18n("Compar&ison") ); topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() ); adj_page = new AdjEntryPage (this, multi_sel, comp, page, "Comparison"); topLayout->addWidget(adj_page); } else { page = addPage( i18n("Co&mmon") ); topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() ); comm_page = new CommonEntryPage (this, doc, multi_sel, expr, lesson, lessonbox, lang, type, pronunce, usagelabel, i18n("Translated &expression in %1:").arg(s), querymanager, active, ipafont, page, name); topLayout->addWidget(comm_page); page = addPage( i18n("A&dditional") ); topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() ); aux_page = new AuxInfoEntryPage (this, multi_sel, synonym, antonym, example, rem, paraphrase, page, name); topLayout->addWidget(aux_page); page = addPage( i18n("&Multiple Choice") ); topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() ); mc_page = new MCEntryPage (this, multi_sel, mc, page, "MultipleChoice"); topLayout->addWidget(mc_page); page = addPage( i18n("Con&jugation") ); topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() ); tense_page = new TenseEntryPage (this, multi_sel, con_prefix, conjugations, page, "Conjugation"); topLayout->addWidget(tense_page); page = addPage( i18n("Compar&ison") ); topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() ); adj_page = new AdjEntryPage (this, multi_sel, comp, page, "Comparison"); topLayout->addWidget(adj_page); } page = addPage( i18n("&From Original") ); topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() ); from_page = new FromToEntryPage (this, multi_sel, f_grd, f_qdate, f_qcount, f_bcount, f_faux_ami, i18n("Properties From Original"), page, name); topLayout->addWidget(from_page); page = addPage( i18n("&To Original") ); topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() ); to_page = new FromToEntryPage (this, multi_sel, t_grd, t_qdate, t_qcount, t_bcount, t_faux_ami, i18n("Properties to Original"), page, name); topLayout->addWidget(to_page); updatePages (type); connect(comm_page, SIGNAL(typeSelected(const QString&)), SLOT(updatePages(const QString&)) ); connect( this, SIGNAL(user1Clicked()), this, SLOT(slotUndo()) ); connect( this, SIGNAL(applyClicked()), this, SLOT(slotApply()) ); connect( this, SIGNAL(user2Clicked()), this, SLOT(slotDockVertical()) ); connect( this, SIGNAL(user3Clicked()), this, SLOT(slotDockHorizontal()) ); connect (comm_page, SIGNAL(sigModified()), this, SLOT(slotDisplayModified() )); connect (aux_page, SIGNAL(sigModified()), this, SLOT(slotDisplayModified() )); connect (adj_page, SIGNAL(sigModified()), this, SLOT(slotDisplayModified() )); connect (mc_page, SIGNAL(sigModified()), this, SLOT(slotDisplayModified() )); connect (tense_page, SIGNAL(sigModified()), this, SLOT(slotDisplayModified() )); if (from_page != 0) connect (from_page, SIGNAL(sigModified()), this, SLOT(slotDisplayModified() )); if (to_page != 0) connect (to_page, SIGNAL(sigModified()), this, SLOT(slotDisplayModified() )); enableButtonApply(false); enableButton(User1, false); comm_page->expr_line->setFocus(); }
void FromToEntryPage::badCountChanged(int count) { m_wrongCountChanged = true; Q_UNUSED(count) emit sigModified(); }
void FromToEntryPage::totalCountChanged(int count) { m_totalCountChanged = true; Q_UNUSED(count) emit sigModified(); }
void FromToEntryPage::slotDateChanged(const QDate & d) { m_practiceDateChanged = true; Q_UNUSED(d) emit sigModified(); }
void FromToEntryPage::slotToday() { m_practiceDateChanged = true; queryDateEdit->setDateTime(QDateTime::currentDateTime()); emit sigModified(); }
void FromToEntryPage::slotGradeSelected(int g) { m_gradeChanged = true; Q_UNUSED(g) emit sigModified(); }
void FromToEntryPage::slotFalseFriendChanged(const QString& s) { Q_UNUSED(s) emit sigModified(); }
void MCEntryPage::setModified(bool mod) { modified = mod; if (mod) emit sigModified(); }