CPDetectorDialog::CPDetectorDialog(wxWindow* parent) { wxXmlResource::Get()->LoadDialog(this, parent, wxT("cpdetector_dialog")); #ifdef __WXMSW__ wxIcon myIcon(huginApp::Get()->GetXRCPath() + wxT("data/hugin.ico"),wxBITMAP_TYPE_ICO); #else wxIcon myIcon(huginApp::Get()->GetXRCPath() + wxT("data/hugin.png"),wxBITMAP_TYPE_PNG); #endif SetIcon(myIcon); //restore frame position and size RestoreFramePosition(this,wxT("CPDetectorDialog")); m_edit_desc = XRCCTRL(*this, "prefs_cpdetector_desc", wxTextCtrl); m_edit_prog = XRCCTRL(*this, "prefs_cpdetector_program", wxTextCtrl); m_edit_args = XRCCTRL(*this, "prefs_cpdetector_args", wxTextCtrl); m_label_args_cleanup = XRCCTRL(*this, "prefs_cpdetector_args_label_cleanup", wxStaticText); m_edit_args_cleanup = XRCCTRL(*this, "prefs_cpdetector_args_cleanup", wxTextCtrl); m_edit_prog_descriptor = XRCCTRL(*this, "prefs_cpdetector_program_descriptor", wxTextCtrl); m_edit_args_descriptor = XRCCTRL(*this, "prefs_cpdetector_args_descriptor", wxTextCtrl); m_edit_prog_matcher = XRCCTRL(*this, "prefs_cpdetector_program_matcher", wxTextCtrl); m_edit_args_matcher = XRCCTRL(*this, "prefs_cpdetector_args_matcher", wxTextCtrl); m_edit_prog_stack = XRCCTRL(*this, "prefs_cpdetector_program_stack", wxTextCtrl); m_edit_args_stack = XRCCTRL(*this, "prefs_cpdetector_args_stack", wxTextCtrl); m_check_option = XRCCTRL(*this, "prefs_cpdetector_option", wxCheckBox); m_cpdetector_type = XRCCTRL(*this, "prefs_cpdetector_type", wxChoice); m_choice_step = XRCCTRL(*this, "choicebook_steps", wxChoicebook); m_cpdetector_type->SetSelection(1); ChangeType(); };
ResetDialog::ResetDialog(wxWindow *parent, GuiLevel guiLevel) { // load our children. some children might need special // initialization. this will be done later. wxXmlResource::Get()->LoadDialog(this, parent, wxT("reset_dialog")); #ifdef __WXMSW__ wxIcon myIcon(huginApp::Get()->GetXRCPath() + wxT("data/hugin.ico"),wxBITMAP_TYPE_ICO); #else wxIcon myIcon(huginApp::Get()->GetXRCPath() + wxT("data/hugin.png"),wxBITMAP_TYPE_PNG); #endif SetIcon(myIcon); //set parameters wxConfigBase * cfg = wxConfigBase::Get(); bool check; cfg->Read(wxT("/ResetDialog/ResetPosition"),&check,true); XRCCTRL(*this,"reset_pos",wxCheckBox)->SetValue(check); cfg->Read(wxT("/ResetDialog/ResetTranslation"), &check, true); wxCheckBox* reset_translation=XRCCTRL(*this,"reset_translation",wxCheckBox); reset_translation->SetValue(check); if(guiLevel<GUI_EXPERT) { reset_translation->Hide(); }; cfg->Read(wxT("/ResetDialog/ResetFOV"),&check,true); XRCCTRL(*this,"reset_fov",wxCheckBox)->SetValue(check); cfg->Read(wxT("/ResetDialog/ResetLens"),&check,true); XRCCTRL(*this,"reset_lens",wxCheckBox)->SetValue(check); cfg->Read(wxT("/ResetDialog/ResetExposure"),&check,true); XRCCTRL(*this,"reset_exposure",wxCheckBox)->SetValue(check); int exp_param; cfg->Read(wxT("/ResetDialog/ResetExposureParam"),&exp_param,0); XRCCTRL(*this,"combo_exposure",wxComboBox)->Select(exp_param); wxCommandEvent dummy; OnSelectExposure(dummy); cfg->Read(wxT("/ResetDialog/ResetColor"),&check,true); XRCCTRL(*this,"reset_color",wxCheckBox)->SetValue(check); cfg->Read(wxT("/ResetDialog/ResetColorParam"),&exp_param,0); OnSelectColor(dummy); XRCCTRL(*this,"combo_color",wxComboBox)->Select(exp_param); cfg->Read(wxT("/ResetDialog/ResetVignetting"),&check,true); XRCCTRL(*this,"reset_vignetting",wxCheckBox)->SetValue(check); cfg->Read(wxT("/ResetDialog/ResetResponse"),&check,true); XRCCTRL(*this,"reset_response",wxCheckBox)->SetValue(check); GetSizer()->Fit(this); //position int x = cfg->Read(wxT("/ResetDialog/positionX"),-1l); int y = cfg->Read(wxT("/ResetDialog/positionY"),-1l); if ( y >= 0 && x >= 0) { this->Move(x, y); } else { this->Move(0, 44); }; };
int main(int argc, char *argv[]) { QApplication a(argc, argv); a.setWindowIcon(myIcon(Qt::red)); Dialog d; d.setWindowIcon(myIcon(Qt::blue)); d.show(); return a.exec(); }
QgsLegendPropertyItem::QgsLegendPropertyItem( QTreeWidgetItem * theItem, QString theString ) : QgsLegendItem( theItem, theString ) { mType = LEGEND_PROPERTY_ITEM; QIcon myIcon( QgsApplication::pkgDataPath() + QString( "/images/icons/property_item.png" ) ); setIcon( 0, myIcon ); }
void MainWindow::addIconToBufferView(QString nameOfImageInBuffer) { QIcon myIcon((QPixmap::fromImage(myBufor->getImageByPath(nameOfImageInBuffer)))); QListWidgetItem *newItem = new QListWidgetItem(); newItem->setIcon(myIcon); newItem->setText(nameOfImageInBuffer); newItem->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsSelectable); listImage->addItem(newItem); }
HDRMergeOptionsDialog::HDRMergeOptionsDialog(wxWindow *parent) { wxXmlResource::Get()->LoadDialog(this, parent, wxT("hdrmerge_options_dialog")); #ifdef __WXMSW__ wxIcon myIcon(huginApp::Get()->GetXRCPath() + wxT("data/hugin.ico"),wxBITMAP_TYPE_ICO); #else wxIcon myIcon(huginApp::Get()->GetXRCPath() + wxT("data/hugin.png"),wxBITMAP_TYPE_PNG); #endif SetIcon(myIcon); m_mode=XRCCTRL(*this,"hdrmerge_option_mode",wxChoice); m_panel_avg=XRCCTRL(*this,"hdrmerge_option_panel_avg",wxPanel); m_panel_avgslow=XRCCTRL(*this,"hdrmerge_option_panel_avgslow",wxPanel); m_panel_khan=XRCCTRL(*this,"hdrmerge_option_panel_khan",wxPanel); m_option_c=XRCCTRL(*this,"hdrmerge_option_c",wxCheckBox); m_khan_iter=XRCCTRL(*this,"hdrmerge_option_khan_iter",wxSpinCtrl); m_khan_iter->SetRange(1,100); m_khan_sigma=XRCCTRL(*this,"hdrmerge_option_khan_sigma",wxTextCtrl); m_option_khan_af=XRCCTRL(*this,"hdrmerge_option_khan_af",wxCheckBox); m_option_khan_ag=XRCCTRL(*this,"hdrmerge_option_khan_ag",wxCheckBox); m_option_khan_am=XRCCTRL(*this,"hdrmerge_option_khan_am",wxCheckBox); this->CenterOnParent(); };
void MainWindow::replyFinished(QNetworkReply *qnr){ QXmlStreamReader *qxsr = new QXmlStreamReader(); qxsr->addData(qnr->readAll()); if(qxsr->readNextStartElement()){ if(qxsr->name() == "clients"){ while (qxsr->readNextStartElement()) { if (qxsr->name() == "client") { ktClient *myclient=new ktClient(qxsr); QStandardItem *item = new QStandardItem(myclient->name); item->setData(myclient->ID); QIcon myIcon("icons/stock_person.svg"); item->setIcon(myIcon); clientParentItem->appendRow(item); qxsr->skipCurrentElement(); } else qxsr->skipCurrentElement(); } } } }
PanoOutputDialog::PanoOutputDialog(wxWindow *parent, PT::Panorama& pano, GuiLevel guiLevel) : m_pano(pano), m_aspect(0) { // load our children. some children might need special // initialization. this will be done later. wxXmlResource::Get()->LoadDialog(this, parent, wxT("pano_output_dialog")); #ifdef __WXMSW__ wxIcon myIcon(huginApp::Get()->GetXRCPath() + wxT("data/hugin.ico"),wxBITMAP_TYPE_ICO); #else wxIcon myIcon(huginApp::Get()->GetXRCPath() + wxT("data/hugin.png"),wxBITMAP_TYPE_PNG); #endif SetIcon(myIcon); //set parameters wxConfigBase * cfg = wxConfigBase::Get(); //position int x = cfg->Read(wxT("/PanoOutputDialog/positionX"),-1l); int y = cfg->Read(wxT("/PanoOutputDialog/positionY"),-1l); if ( y >= 0 && x >= 0) { this->Move(x, y); } else { this->Move(0, 44); }; // get number of stacks and exposure layers m_guiLevel=guiLevel; m_stacks=getHDRStacks(m_pano, m_pano.getActiveImages(), m_pano.getOptions()); m_exposureLayers=getExposureLayers(m_pano, m_pano.getActiveImages(), m_pano.getOptions()); // set initial width long opt_width=m_pano.calcOptimalWidth(); m_newOpt=m_pano.getOptions(); double sizeFactor = HUGIN_ASS_PANO_DOWNSIZE_FACTOR; wxConfigBase* config = wxConfigBase::Get(); config->Read(wxT("/Assistant/panoDownsizeFactor"), &sizeFactor, HUGIN_ASS_PANO_DOWNSIZE_FACTOR); m_newOpt.setWidth(hugin_utils::floori(sizeFactor*opt_width), true); m_initalWidth=m_newOpt.getWidth(); m_initalROIWidth=m_newOpt.getROI().width(); m_aspect=(double)m_newOpt.getROI().height()/m_newOpt.getROI().width(); m_edit_width=XRCCTRL(*this, "output_width", wxSpinCtrl); m_edit_height=XRCCTRL(*this, "output_height", wxSpinCtrl); m_edit_width->SetValue(m_newOpt.getROI().width()); m_edit_height->SetValue(m_newOpt.getROI().height()); //LDR output format, as in preferences set int i = config->Read(wxT("/output/jpeg_quality"),HUGIN_JPEG_QUALITY); XRCCTRL(*this, "output_jpeg_quality", wxSpinCtrl)->SetValue(i); i=config->Read(wxT("/output/tiff_compression"), HUGIN_TIFF_COMPRESSION); XRCCTRL(*this, "output_tiff_compression", wxChoice)->SetSelection(i); i=config->Read(wxT("/output/ldr_format"), HUGIN_LDR_OUTPUT_FORMAT); XRCCTRL(*this, "output_ldr_format", wxChoice)->SetSelection(i); //HDR output format, as in project given if (m_newOpt.outputImageTypeHDR == "exr") { XRCCTRL(*this, "output_hdr_format", wxChoice)->SetSelection(0); XRCCTRL(*this, "output_hdr_tiff_compression", wxChoice)->SetSelection(2); } else { XRCCTRL(*this, "output_hdr_format", wxChoice)->SetSelection(1); if (m_newOpt.outputImageTypeHDRCompression == "PACKBITS") { XRCCTRL(*this, "output_hdr_tiff_compression", wxChoice)->SetSelection(1); } else { if (m_newOpt.outputImageTypeHDRCompression == "LZW") { XRCCTRL(*this, "output_hdr_tiff_compression", wxChoice)->SetSelection(2); } else { if (m_newOpt.outputImageTypeHDRCompression == "DEFLATE") { XRCCTRL(*this, "output_hdr_tiff_compression", wxChoice)->SetSelection(3); } else { XRCCTRL(*this, "output_hdr_tiff_compression", wxChoice)->SetSelection(0); }; }; }; }; EnableOutputOptions(); wxCommandEvent dummy; OnOutputChanged(dummy); OnLDRFormatChanged(dummy); OnHDRFormatChanged(dummy); };