NoteInfoDialog::NoteInfoDialog(QWidget *parent, QString guid) : QDialog(parent) { if (guid.isEmpty()) { reject(); return; } note = Note::fromGUID(guid); if (note == NULL) { reject(); return; } setWindowTitle("Note Info"); QGridLayout* layout = new QGridLayout(this); QLabel* title = new QLabel(note->getTitle(), this); title->setAlignment(Qt::AlignCenter); QFont mainTitleFont, titleFont = title->font(); mainTitleFont.setBold(true); mainTitleFont.setPointSize(15); title->setFont(mainTitleFont); layout->addWidget(title, 0, 0, 1, 4); layout->addWidget(new QLabel("<b>Overview</b>", this), 2, 0, 1, 4); titleFont.setCapitalization(QFont::AllUppercase); titleFont.setFamily("gotham,helvetica,arial,sans-serif"); titleFont.setLetterSpacing(QFont::PercentageSpacing, 102); titleFont.setWeight(100); QLabel* createdTitle = new QLabel("Created:", this); createdTitle->setFont(titleFont); layout->addWidget(createdTitle, 3, 0); QLabel* updatedTitle = new QLabel("Updated:", this); updatedTitle->setFont(titleFont); layout->addWidget(updatedTitle, 4, 0); QLabel* sizeTitle = new QLabel("Size:", this); sizeTitle->setFont(titleFont); layout->addWidget(sizeTitle, 5, 0); QLabel* reminderTitle = new QLabel("Reminder:", this); reminderTitle->setFont(titleFont); layout->addWidget(reminderTitle, 6, 0); QLabel* created = new QLabel(this); created->setText(note->getCreated().toString("dddd, MMMM d yyyy, h:mm AP")); layout->addWidget(created, 3, 1, 1, 3); QLabel* updated = new QLabel(this); updated->setText(note->getUpdated().toString("dddd, MMMM d yyyy, h:mm AP")); layout->addWidget(updated, 4, 1, 1, 3); QLabel* size = new QLabel(this); size->setText(QString("%1 bytes").arg(note->getSize())); size->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Minimum); layout->addWidget(size, 5, 1, 1, 3); reminderEdit = new QDateTimeEdit(this); reminderEdit->setDisplayFormat("dddd, MMMM d yyyy, h:mm AP"); reminderEdit->setCalendarPopup(true); reminderEdit->setMinimumDateTime(QDateTime::currentDateTime()); reminderEdit->setHidden(true); layout->addWidget(reminderEdit, 6, 1); QPushButton *deleteReminder = new QPushButton(this); deleteReminder->setIcon(QIcon::fromTheme("edit-delete")); deleteReminder->setHidden(true); layout->addWidget(deleteReminder, 6, 2); connect(deleteReminder, SIGNAL(clicked()), reminderEdit, SLOT(hide())); connect(deleteReminder, SIGNAL(clicked()), deleteReminder, SLOT(hide())); QPushButton *setReminder = new QPushButton(this); setReminder->setIcon(QIcon(":/img/reminder.png")); layout->addWidget(setReminder, 6, 3); connect(setReminder, SIGNAL(clicked()), reminderEdit, SLOT(show())); connect(setReminder, SIGNAL(clicked()), deleteReminder, SLOT(show())); QDateTime reminderTime = note->getReminderOrder(); if (!reminderTime.isNull()) { reminderEdit->setHidden(false); reminderEdit->setDateTime(reminderTime); deleteReminder->setHidden(false); } url = new QLineEdit(this); url->setPlaceholderText("Set a URL..."); url->setText(note->getSourceURL()); url->setMaxLength(4096); layout->addWidget(url, 7, 0, 1, 4); author = new QLineEdit(this); author->setPlaceholderText("Set an Author..."); author->setText(note->getAuthor()); author->setMaxLength(4096); layout->addWidget(author, 8, 0, 1, 4); QDialogButtonBox* buttons = new QDialogButtonBox(QDialogButtonBox::Cancel | QDialogButtonBox::Save, Qt::Horizontal, this); connect(buttons, SIGNAL(accepted()), this, SLOT(save())); connect(buttons, SIGNAL(rejected()), this, SLOT(reject())); layout->addWidget(buttons, 9, 0, 1, 4); setLayout(layout); setMinimumWidth(400); }
Dialog::Dialog(QWidget *parent) : QDialog(parent, Qt::Tool | Qt::WindowStaysOnTopHint | Qt::CustomizeWindowHint), ui(new Ui::Dialog), mSettings(new LxQt::Settings("lxqt-runner", this)), mGlobalShortcut(0), mLockCascadeChanges(false), mConfigureDialog(0) { ui->setupUi(this); setWindowTitle("LXQt Runner"); setAttribute(Qt::WA_TranslucentBackground); connect(LxQt::Settings::globalSettings(), SIGNAL(iconThemeChanged()), this, SLOT(update())); connect(ui->closeButton, SIGNAL(clicked()), this, SLOT(hide())); connect(mSettings, SIGNAL(settingsChanged()), this, SLOT(applySettings())); ui->commandEd->installEventFilter(this); connect(ui->commandEd, SIGNAL(textChanged(QString)), this, SLOT(setFilter(QString))); connect(ui->commandEd, SIGNAL(returnPressed()), this, SLOT(runCommand())); mCommandItemModel = new CommandItemModel(this); ui->commandList->installEventFilter(this); ui->commandList->setModel(mCommandItemModel); ui->commandList->setEditTriggers(QAbstractItemView::NoEditTriggers); connect(ui->commandList, SIGNAL(clicked(QModelIndex)), this, SLOT(runCommand())); setFilter(""); dataChanged(); ui->commandList->setItemDelegate(new LxQt::HtmlDelegate(QSize(32, 32), ui->commandList)); // Popup menu ............................... QAction *a = new QAction(XdgIcon::fromTheme("configure"), tr("Configure"), this); connect(a, SIGNAL(triggered()), this, SLOT(showConfigDialog())); addAction(a); a = new QAction(XdgIcon::fromTheme("edit-clear-history"), tr("Clear History"), this); connect(a, SIGNAL(triggered()), mCommandItemModel, SLOT(clearHistory())); addAction(a); mPowerManager = new LxQt::PowerManager(this); addActions(mPowerManager->availableActions()); mScreenSaver = new LxQt::ScreenSaver(this); addActions(mScreenSaver->availableActions()); setContextMenuPolicy(Qt::ActionsContextMenu); QMenu *menu = new QMenu(this); menu->addActions(actions()); ui->actionButton->setMenu(menu); ui->actionButton->setIcon(XdgIcon::fromTheme("configure")); // End of popup menu ........................ applySettings(); connect(QApplication::desktop(), SIGNAL(screenCountChanged(int)), SLOT(realign())); connect(QApplication::desktop(), SIGNAL(workAreaResized(int)), SLOT(realign())); connect(mGlobalShortcut, SIGNAL(activated()), this, SLOT(showHide())); connect(mGlobalShortcut, SIGNAL(shortcutChanged(QString,QString)), this, SLOT(shortcutChanged(QString,QString))); resize(mSettings->value("dialog/width", 400).toInt(), size().height()); // TEST connect(mCommandItemModel, SIGNAL(layoutChanged()), this, SLOT(dataChanged())); }
void ScriptCreateDialog::ok_pressed() { if (class_name->is_editable() && !_validate(class_name->get_text())) { alert->set_text("Class Name is Invalid!"); alert->popup_centered(Size2(200,60)); return; } if (!_validate(parent_name->get_text())) { alert->set_text("Parent Class Name is Invalid!"); alert->popup_centered(Size2(200,60)); return; } String cname; if (class_name->is_editable()) cname=class_name->get_text(); String text = ScriptServer::get_language( language_menu->get_selected() )->get_template(cname,parent_name->get_text()); Script *script = ScriptServer::get_language( language_menu->get_selected() )->create_script(); script->set_source_code(text); if (cname!="") script->set_name(cname); Ref<Script> scr(script); if (!internal->is_pressed()) { String lpath = Globals::get_singleton()->localize_path(file_path->get_text()); script->set_path(lpath); if (!path_valid) { alert->set_text("Path is Invalid!"); alert->popup_centered(Size2(200,60)); return; } Error err = ResourceSaver::save(lpath,scr,ResourceSaver::FLAG_CHANGE_PATH); if (err!=OK) { alert->set_text("Could not create script in filesystem: "+String("")); alert->popup_centered(Size2(200,60)); return; } scr->set_path(lpath); //EditorFileSystem::get_singleton()->update_file(lpath,scr->get_type()); } hide(); emit_signal("script_created",scr); }
void XsldbgConfigImpl::slotCancel() { hide(); }
void SweetDisplayStandby::closeEvent(QCloseEvent * e) { hide(); e->ignore(); }
void hideAndRestore() { hide(); m_timer->start(10000); }
void ChatLobbyToaster::chatButtonSlot() { ChatDialog::chatFriend(ChatId(mLobbyId)); hide(); }
SymbolListWidget :: SymbolListWidget(QWidget *parent, int page) : QTableWidget(parent) { hide(); setAutoFillBackground( true ); QPalette pal( palette() ); pal.setColor( QPalette::Active, QPalette::HighlightedText, QColor("#FAFAFA") ); pal.setColor( QPalette::Inactive, QPalette::HighlightedText, QColor("#FAFAFA") ); pal.setColor( QPalette::Disabled, QPalette::HighlightedText, QColor("#FAFAFA") ); pal.setColor( QPalette::Active, QPalette::Base, QColor("#FAFAFA") ); pal.setColor( QPalette::Inactive, QPalette::Base, QColor("#FAFAFA") ); pal.setColor( QPalette::Disabled, QPalette::Base, QColor("#FAFAFA") ); setPalette( pal ); setItemDelegate(new IconDelegate(this)); QString icon_name; setShowGrid(true); verticalHeader()->hide(); horizontalHeader()->hide(); setIconSize ( QSize(32,32 )); setSelectionMode (QAbstractItemView::SingleSelection); setContextMenuPolicy(Qt::CustomContextMenu); menu = new QMenu( this ); addAct=new QAction(tr("Add to favorites"), this); remAct=new QAction(tr("Remove from favorites"), this); connect( this, SIGNAL( customContextMenuRequested( const QPoint & )), this, SLOT( customContentsMenu( const QPoint & ))); switch (page) { case 0: { setUpdatesEnabled(false); setColumnCount(4); setRowCount(57); for ( uint j = 0; j < 57; ++j ) setRowHeight(j,36); setColumnWidth(0,36); setColumnWidth(1,36); setColumnWidth(2,36); setColumnWidth(3,36); for ( uint i = 0; i <= 225; ++i ) { icon_name=":/symbols/img"+QString::number(i+1)+".png"; QTableWidgetItem* item= new QTableWidgetItem(); item->setIcon(QIcon(icon_name)); item->setText(code[i]+";"+QString::number(i)); item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); item->setToolTip(code[i]); setItem(i/4,i%4,item); } setUpdatesEnabled(true); menu->addAction(addAct); } break; case 1: { setColumnCount(4); setRowCount(17); for ( uint j = 0; j < 17; ++j ) setRowHeight(j,36); setColumnWidth(0,36); setColumnWidth(1,36); setColumnWidth(2,36); setColumnWidth(3,36); for ( uint i = 247; i <= 313; ++i ) { icon_name=":/symbols/img"+QString::number(i+1)+".png"; QTableWidgetItem* item= new QTableWidgetItem(); item->setIcon(QIcon(icon_name)); item->setText(code[i]+";"+QString::number(i)); item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); item->setToolTip(code[i]); setItem((i-247)/4,(i-247)%4,item); } menu->addAction(addAct); } break; case 2: { setColumnCount(4); setRowCount(15); for ( uint j = 0; j < 15; ++j ) setRowHeight(j,36); setColumnWidth(0,36); setColumnWidth(1,36); setColumnWidth(2,36); setColumnWidth(3,36); for ( uint i = 314; i <= 371; ++i ) { icon_name=":/symbols/img"+QString::number(i+1)+".png"; QTableWidgetItem* item= new QTableWidgetItem(); item->setIcon(QIcon(icon_name)); item->setText(code[i]+";"+QString::number(i)); item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); item->setToolTip(code[i]); setItem((i-314)/4,(i-314)%4,item); } menu->addAction(addAct); } break; case 3: { setColumnCount(4); setRowCount(6); for ( uint j = 0; j < 6; ++j ) setRowHeight(j,36); setColumnWidth(0,36); setColumnWidth(1,36); setColumnWidth(2,36); setColumnWidth(3,36); for ( uint i = 226; i <= 246; ++i ) { icon_name=":/symbols/img"+QString::number(i+1)+".png"; QTableWidgetItem* item= new QTableWidgetItem(); item->setIcon(QIcon(icon_name)); item->setText(code[i]+";"+QString::number(i)); item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); item->setToolTip(code[i]); setItem((i-226)/4,(i-226)%4,item); } menu->addAction(addAct); } break; case 4: { setColumnCount(4); setRowCount(10); for ( uint j = 0; j < 10; ++j ) setRowHeight(j,36); setColumnWidth(0,36); setColumnWidth(1,36); setColumnWidth(2,36); setColumnWidth(3,36); for ( uint i = 0; i <= 39; ++i ) { icon_name=":/symbols/img"+QString::number(i+1)+"greek.png"; QTableWidgetItem* item= new QTableWidgetItem(); item->setIcon(QIcon(icon_name)); item->setText(code[i+372]+";"+QString::number(i+372)); item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); item->setToolTip(code[i+372]); setItem(i/4,i%4,item); } menu->addAction(addAct); } break; case 5: { setColumnCount(4); setRowCount(3); for ( uint j = 0; j < 3; ++j ) setRowHeight(j,36); setColumnWidth(0,36); setColumnWidth(1,36); setColumnWidth(2,36); setColumnWidth(3,36); } break; case 6: { setColumnCount(4); setColumnWidth(0,36); setColumnWidth(1,36); setColumnWidth(2,36); setColumnWidth(3,36); menu->addAction(remAct); } break; show(); } }
void QwtPicker::PickerWidget::updateMask() { QRegion mask; if ( d_type == RubberBand ) { QBitmap bm( width(), height() ); bm.fill( Qt::color0 ); QPainter painter( &bm ); QPen pen = d_picker->rubberBandPen(); pen.setColor( Qt::color1 ); painter.setPen( pen ); d_picker->drawRubberBand( &painter ); mask = QRegion( bm ); } if ( d_type == Text ) { d_hasTextMask = parentWidget()->testAttribute( Qt::WA_PaintOnScreen ); if ( d_hasTextMask ) { const QwtText label = d_picker->trackerText( d_picker->trackerPosition() ); if ( label.testPaintAttribute( QwtText::PaintBackground ) && label.backgroundBrush().style() != Qt::NoBrush ) { if ( label.backgroundBrush().color().alpha() > 0 ) { // We don't need a text mask, when we have a background d_hasTextMask = false; } } } if ( d_hasTextMask ) { QBitmap bm( width(), height() ); bm.fill( Qt::color0 ); QPainter painter( &bm ); painter.setFont( font() ); QPen pen = d_picker->trackerPen(); pen.setColor( Qt::color1 ); painter.setPen( pen ); d_picker->drawTracker( &painter ); mask = QRegion( bm ); } else { mask = d_picker->trackerRect( font() ); } } QWidget *w = parentWidget(); if ( w && !w->testAttribute( Qt::WA_PaintOnScreen ) ) { // The parent widget gets an update for its complete rectangle // when the mask is changed in visible state. // With this hide/show we only get an update for the // previous mask. hide(); } setMask( mask ); setVisible( !mask.isEmpty() ); }
/*int siva() { int a; while(1) { if(kbhit()) { a=getch(); return; } } } */ int m2() { int a=6,k,g=150,w=0,h=200; char *menu[]={"No Maze","Maze 1","Maze 2","Maze 3","Maze 4"}; hide(); viewport(); status("Please Wait Loading..."); setpos(0,0); settextstyle(7,0,5); setcolor(14); outtextxy(250,50,"Mazes"); setfillstyle(0,0); bar(100,100,280,440); settextstyle(3,0,3); setcolor(8); for(k=0;k<5;k++) { outtextxy(g,h,menu[k]); h+=textheight(menu[k])+10; } pos(&button,&n,&m); w=option(n,m); settextstyle(0,0,0); setcolor(13); outtextxy(300,138,"Preview"); setcolor(4); rectangle(300,150,500,350); g=150; h=200; while(1) { g=150; h=200; pos(&button,&n,&m); w=option(n,m); for(k=0;k<5;k++) { settextstyle(3,0,3); if(w==k+1) { setcolor(11); outtextxy(g,h,menu[k]); h+=textheight(menu[k])+10; if(a!=w) a=disp(w); if(button==1) return w; } else { setcolor(8); outtextxy(g,h,menu[k]); h+=textheight(menu[k])+10; } if(w>5) disp(8); setfillstyle(SOLID_FILL,0); status("Select any One using mouse pointer"); show(); } } }
void SceneTreeDialog::_cancel() { hide(); }
void main() { int sss,q,ll,gd=DETECT,p,gm,area,a=(450-(50*5)),d,cat=77,ch,dh,eh,t1,t2,t12,t22,len,cc,hh; char *str,*str1,*tim; initgraph(&gd,&gm,""); p=1; front(); dr: viewport(); q=menu(); if(q==3) { arun: hh=help(); if(hh==1) { how(); goto arun; } if(hh==2) { select(); goto arun; } if(hh==3) { credit(); goto arun; } if(hh==4) { design(); goto arun; } if(hh==5) goto dr; } if(q==2) { rr: ll=sivakumar(); if(ll==1) { p=m2(); goto rr; } if(ll==2) { a=speed(); viewport(); goto rr; } if(ll==3) { topscore(); goto rr; } if(ll==4) goto dr; } if(q==4) exit(0); if(q==1) { names(); hide(); viewport(); x[0]=85; x[1]=70; x[2]=55; x[3]=40; y[0]=y[1]=y[2]=y[3]=35; setcolor(4); rectangle(24,19,626,396); ra(); setcolor(15); setfillstyle(1,10); bar(32,32,43,43); area=imagesize(30,30,45,45); buff=malloc(area); getimage(30,30,45,45,buff); putimage(30,30,buff,XOR_PUT); setpos(0,0); setfillstyle(1,0); bar(100,100,500,350); prakash(p); level=p; putimage(40,35,buff,XOR_PUT); putimage(55,35,buff,XOR_PUT); putimage(70,35,buff,XOR_PUT); putimage(85,35,buff,XOR_PUT); textcolor(GREEN+BLINK); len=0; status("Game Play: Arrow keys Menu: Esc Pause (or) Play: Others key"); while(1) { sss=getpixel(5,5); if(sss!=0); { setfillstyle(SOLID_FILL,0); bar(0,0,15,15); } if(((i-4)%11==0)&&(bon==0)&&(len!=(i-4))) { len=(i-4); gettime(&t); bonous(); bon=1; t1=t.ti_sec; cc=10; } gettime(&t); if((t1!=t.ti_sec)&&(bon==1)) { cc--; t1=t.ti_sec; itoa(cc,tim,10); setfillstyle(SOLID_FILL,0); bar(470,0,530,18); outtextxy(500,0,tim); } if((cc==0)&&(bon==1)) { putimage(xc1,yc1,f2,XOR_PUT); bar(470,0,530,18); bon=0; } gotoxy(68,1); setcolor(6); itoa(score,str,10); setfillstyle(1,0); settextstyle(3,0,1); if(strcmp(str,str1)!=0) { bar(80,400,350,450); outtextxy(100,420,"Score : "); outtextxy(180,420,str); strcpy(str1,str); } if(kbhit()) { // ch=getch(); dh=getch(); cat=dh; } else { arrange(x,y,i); if(set==0) food(); if(cat!=dupli) cat=lock(cat,dupli); switch(cat) { case 72: if(y[1]==20) y[0]=380; else y[0]=y[1]-15; x[0]=x[1]; d=getpixel(x[0]+8,y[0]+8); if((d==10)||(d==14)) doctor(); if((d==4)&&(bon==1)) { i++; sound(1000); delay(90); nosound(); bon=0; score+=(cc*10); putimage(xc1,yc1,f2,XOR_PUT); putimage(x[0],y[0],buff,XOR_PUT); putimage(x[i],y[i],buff,XOR_PUT); setfillstyle(SOLID_FILL,0); bar(470,0,530,18); } else if(d==15) { i++; set=0; sound(800); delay(40); score+=bb; nosound(); putimage(x[0],y[0],buff,XOR_PUT); } else { putimage(x[0],y[0],buff,XOR_PUT); putimage(x[i-1],y[i-1],buff,XOR_PUT); } delay(a); break; case 80: if(y[1]==380) y[0]=20; else y[0]=y[1]+15; x[0]=x[1]; d=getpixel(x[0]+8,y[0]+8); if((d==10)||(d==14)) doctor(); if((d==4)&&(bon==1)) { i++; sound(1000); delay(90); nosound(); bon=0; score+=(cc*10); putimage(xc1,yc1,f2,XOR_PUT); putimage(x[0],y[0],buff,XOR_PUT); putimage(x[i],y[i],buff,XOR_PUT); setfillstyle(SOLID_FILL,0); bar(470,0,530,18); } else if(d==15) { i++; score+=bb; sound(800); delay(40); set=0; nosound(); putimage(x[0],y[0],buff,XOR_PUT); } else { putimage(x[0],y[0],buff,XOR_PUT); putimage(x[i-1],y[i-1],buff,XOR_PUT); } delay(a); break; case 75: if(x[1]==25) x[0]=610; else x[0]=x[1]-15; y[0]=y[1]; d=getpixel(x[0]+8,y[0]+8); if((d==10)||(d==14)) doctor(); if((d==4)&&(bon==1)) { i++; sound(1000); delay(90); nosound(); bon=0; score+=(cc*10); putimage(xc1,yc1,f2,XOR_PUT); putimage(x[0],y[0],buff,XOR_PUT); putimage(x[i],y[i],buff,XOR_PUT); setfillstyle(SOLID_FILL,0); bar(470,0,530,18); } else if(d==15) { i++; sound(800); delay(40); set=0; nosound(); score+=bb; putimage(x[0],y[0],buff,XOR_PUT); } else { putimage(x[0],y[0],buff,XOR_PUT); putimage(x[i-1],y[i-1],buff,XOR_PUT); } delay(a); break; case 77: if(x[1]==610) x[0]=25; else x[0]=x[1]+15; y[0]=y[1]; d=getpixel(x[0]+8,y[0]+8); if((d==10)||(d==14)) doctor(); if((d==4)&&(bon==1)) { i++; sound(1000); delay(90); nosound(); bon=0; score+=(cc*10); putimage(xc1,yc1,f2,XOR_PUT); putimage(x[0],y[0],buff,XOR_PUT); putimage(x[i],y[i],buff,XOR_PUT); setfillstyle(SOLID_FILL,0); bar(470,0,530,18); } else if(d==15) { i++; set=0; sound(800); delay(40); score+=bb; nosound(); putimage(x[0],y[0],buff,XOR_PUT); } else { putimage(x[0],y[0],buff,XOR_PUT); putimage(x[i-1],y[i-1],buff,XOR_PUT); } delay(a); break; case 27: goto dx; // break; } dupli=cat; } } } dx: call(); }
void StoryView::animateOff(){ tweenOpacity(0.0f, mGlobals.getSettingsLayout().getFloat("story_view:anim_time", 0, 0.35f), 0.0f, ci::EaseNone(), [this]{hide(); }); }
void Dialog::on_hide_button_clicked() { hide(); }
void BgBulmaGes::on_mui_cerrar_clicked() { hide(); }
DisplayControls::DisplayControls(HockeyGame* game, StandingsGraphic* graphic, CommercialGraphic* comGraphic, NchcScoreboardGraphic* sbGraphic, ScheduleGraphic *schedGraphic, ComparisonGraphic *comparisonGraphic, Ticker* ticker, IdentifierL3rd *idL3rd, PastGamesGraphic* pastGamesGraphic) { sponsorText = game->getSponsor(); customtext.setReadOnly(false); customtext.setText(""); hideLT.setText("Hide Lower Graphic"); QVBoxLayout* myLayout = new QVBoxLayout(); QHBoxLayout* fr = new QHBoxLayout(); fr->addWidget(&customtext, 1); customButton.setText("Custom Text"); fr->addWidget(&customButton); sponsorButton.setText("Sponsor"); fr->addWidget(&sponsorButton); announcersButton.setText("Announcers"); fr->addWidget(&announcersButton); myLayout->addLayout(fr); QHBoxLayout* sr = new QHBoxLayout(); commericalButton.setText("Commercial"); sbButton.setText("Scoreboard"); hideButton.setText("Hide All"); sr->addWidget(&commericalButton); sr->addWidget(&sbButton); sr->addWidget(&hideLT); sr->addWidget(&hideButton); myLayout->addLayout(sr); setLayout(myLayout); connect(&sponsorButton, SIGNAL(clicked()), game->getSb(), SLOT(displaySponsor())); connect(&announcersButton, SIGNAL(clicked()), game, SLOT(showAnnouncers())); connect(&customButton, SIGNAL(clicked()), this, SLOT(prepareCustomText())); connect(this, SIGNAL(showCustomText(QString)), game->getSb(), SLOT(changeTopBarText(QString))); connect(&commericalButton, SIGNAL(clicked()), comGraphic, SLOT(prepareAndShow())); connect(&commericalButton, SIGNAL(clicked()), game->getLt(), SLOT(hideLt())); connect(&commericalButton, SIGNAL(clicked()), game->getSb(), SLOT(hideBoard())); connect(&sbButton, SIGNAL(clicked()), game->getSb(), SLOT(toggleShowBoard())); connect(&sbButton, SIGNAL(clicked()), comGraphic, SLOT(hide())); connect(&hideLT, SIGNAL(clicked()), game->getLt(), SLOT(hideLt())); connect(&hideLT, SIGNAL(clicked()), schedGraphic, SLOT(hide())); connect(&hideLT, SIGNAL(clicked()), comparisonGraphic, SLOT(hideComparison())); connect(&hideLT, SIGNAL(clicked()), pastGamesGraphic, SLOT(hide())); connect(&hideLT, SIGNAL(clicked()), comparisonGraphic, SLOT(hideComparison())); //hide connect(&hideButton, SIGNAL(clicked()), game->getSb(), SLOT(hideBoard())); connect(&hideButton, SIGNAL(clicked()), game->getLt(), SLOT(hideLt())); connect(&hideButton, SIGNAL(clicked()), graphic, SLOT(hide())); connect(&hideButton, SIGNAL(clicked()), comGraphic, SLOT(hide())); connect(&hideButton, SIGNAL(clicked()), sbGraphic, SLOT(hide())); connect(&hideButton, SIGNAL(clicked()), schedGraphic, SLOT(hide())); connect(&hideButton, SIGNAL(clicked()), comparisonGraphic, SLOT(hideComparison())); connect(&hideButton, SIGNAL(clicked()), pastGamesGraphic, SLOT(hide())); connect(&hideButton, SIGNAL(clicked()), ticker, SLOT(hideTicker())); connect(&hideButton, SIGNAL(clicked()), idL3rd, SLOT(hideId())); connect(game, SIGNAL(automatedCommercial()), &commericalButton, SLOT(click())); connect(game, SIGNAL(automatedHide()), &hideButton, SLOT(click())); connect(game, SIGNAL(automatedScoreboard()), &sbButton, SLOT(click())); }
void QgsGrassTools::close( void ) { saveWindowLocation(); hide(); }
void QmitkExtWorkbenchWindowAdvisor::PostWindowCreate() { // very bad hack... berry::IWorkbenchWindow::Pointer window = this->GetWindowConfigurer()->GetWindow(); QMainWindow* mainWindow = qobject_cast<QMainWindow*> (window->GetShell()->GetControl()); if (!windowIcon.isEmpty()) { mainWindow->setWindowIcon(QIcon(windowIcon)); } mainWindow->setContextMenuPolicy(Qt::PreventContextMenu); /*mainWindow->setStyleSheet("color: white;" "background-color: #808080;" "selection-color: #659EC7;" "selection-background-color: #808080;" " QMenuBar {" "background-color: #808080; }");*/ // Load selected icon theme QStringList searchPaths = QIcon::themeSearchPaths(); searchPaths.push_front( QString(":/org_mitk_icons/icons/") ); QIcon::setThemeSearchPaths( searchPaths ); berry::IPreferencesService* prefService = berry::Platform::GetPreferencesService(); berry::IPreferences::Pointer stylePref = prefService->GetSystemPreferences()->Node(berry::QtPreferences::QT_STYLES_NODE); QString iconTheme = stylePref->Get(berry::QtPreferences::QT_ICON_THEME, "<<default>>"); if( iconTheme == QString( "<<default>>" ) ) { iconTheme = QString( "tango" ); } QIcon::setThemeName( iconTheme ); // ==== Application menu ============================ QMenuBar* menuBar = mainWindow->menuBar(); menuBar->setContextMenuPolicy(Qt::PreventContextMenu); #ifdef __APPLE__ menuBar->setNativeMenuBar(true); #else menuBar->setNativeMenuBar(false); #endif QAction* fileOpenAction = new QmitkFileOpenAction(QIcon::fromTheme("document-open",QIcon(":/org_mitk_icons/icons/tango/scalable/actions/document-open.svg")), window); fileOpenAction->setShortcut(QKeySequence::Open); QAction* fileSaveAction = new QmitkFileSaveAction(QIcon(":/org.mitk.gui.qt.ext/Save_48.png"), window); fileSaveAction->setShortcut(QKeySequence::Save); fileSaveProjectAction = new QmitkExtFileSaveProjectAction(window); fileSaveProjectAction->setIcon(QIcon::fromTheme("document-save",QIcon(":/org_mitk_icons/icons/tango/scalable/actions/document-save.svg"))); closeProjectAction = new QmitkCloseProjectAction(window); closeProjectAction->setIcon(QIcon::fromTheme("edit-delete",QIcon(":/org_mitk_icons/icons/tango/scalable/actions/edit-delete.svg"))); auto perspGroup = new QActionGroup(menuBar); std::map<QString, berry::IViewDescriptor::Pointer> VDMap; // sort elements (converting vector to map...) QList<berry::IViewDescriptor::Pointer>::const_iterator iter; berry::IViewRegistry* viewRegistry = berry::PlatformUI::GetWorkbench()->GetViewRegistry(); const QList<berry::IViewDescriptor::Pointer> viewDescriptors = viewRegistry->GetViews(); bool skip = false; for (iter = viewDescriptors.begin(); iter != viewDescriptors.end(); ++iter) { // if viewExcludeList is set, it contains the id-strings of view, which // should not appear as an menu-entry in the menu if (viewExcludeList.size() > 0) { for (int i=0; i<viewExcludeList.size(); i++) { if (viewExcludeList.at(i) == (*iter)->GetId()) { skip = true; break; } } if (skip) { skip = false; continue; } } if ((*iter)->GetId() == "org.blueberry.ui.internal.introview") continue; if ((*iter)->GetId() == "org.mitk.views.imagenavigator") continue; if ((*iter)->GetId() == "org.mitk.views.viewnavigatorview") continue; std::pair<QString, berry::IViewDescriptor::Pointer> p( (*iter)->GetLabel(), (*iter)); VDMap.insert(p); } std::map<QString, berry::IViewDescriptor::Pointer>::const_iterator MapIter; for (MapIter = VDMap.begin(); MapIter != VDMap.end(); ++MapIter) { berry::QtShowViewAction* viewAction = new berry::QtShowViewAction(window, (*MapIter).second); viewActions.push_back(viewAction); } if (!USE_EXPERIMENTAL_COMMAND_CONTRIBUTIONS) { QMenu* fileMenu = menuBar->addMenu("&File"); fileMenu->setObjectName("FileMenu"); fileMenu->addAction(fileOpenAction); fileMenu->addAction(fileSaveAction); fileMenu->addAction(fileSaveProjectAction); fileMenu->addAction(closeProjectAction); fileMenu->addSeparator(); QAction* fileExitAction = new QmitkFileExitAction(window); fileExitAction->setIcon(QIcon::fromTheme("system-log-out",QIcon(":/org_mitk_icons/icons/tango/scalable/actions/system-log-out.svg"))); fileExitAction->setShortcut(QKeySequence::Quit); fileExitAction->setObjectName("QmitkFileExitAction"); fileMenu->addAction(fileExitAction); // another bad hack to get an edit/undo menu... QMenu* editMenu = menuBar->addMenu("&Edit"); undoAction = editMenu->addAction(QIcon::fromTheme("edit-undo",QIcon(":/org_mitk_icons/icons/tango/scalable/actions/edit-undo.svg")), "&Undo", QmitkExtWorkbenchWindowAdvisorHack::undohack, SLOT(onUndo()), QKeySequence("CTRL+Z")); undoAction->setToolTip("Undo the last action (not supported by all modules)"); redoAction = editMenu->addAction(QIcon::fromTheme("edit-redo",QIcon(":/org_mitk_icons/icons/tango/scalable/actions/edit-redo.svg")) , "&Redo", QmitkExtWorkbenchWindowAdvisorHack::undohack, SLOT(onRedo()), QKeySequence("CTRL+Y")); redoAction->setToolTip("execute the last action that was undone again (not supported by all modules)"); // ==== Window Menu ========================== QMenu* windowMenu = menuBar->addMenu("Window"); if (showNewWindowMenuItem) { windowMenu->addAction("&New Window", QmitkExtWorkbenchWindowAdvisorHack::undohack, SLOT(onNewWindow())); windowMenu->addSeparator(); } QMenu* perspMenu = windowMenu->addMenu("&Open Perspective"); QMenu* viewMenu; if (showViewMenuItem) { viewMenu = windowMenu->addMenu("Show &View"); viewMenu->setObjectName("Show View"); } windowMenu->addSeparator(); resetPerspAction = windowMenu->addAction("&Reset Perspective", QmitkExtWorkbenchWindowAdvisorHack::undohack, SLOT(onResetPerspective())); if(showClosePerspectiveMenuItem) closePerspAction = windowMenu->addAction("&Close Perspective", QmitkExtWorkbenchWindowAdvisorHack::undohack, SLOT(onClosePerspective())); windowMenu->addSeparator(); windowMenu->addAction("&Preferences...", QmitkExtWorkbenchWindowAdvisorHack::undohack, SLOT(onEditPreferences()), QKeySequence("CTRL+P")); // fill perspective menu berry::IPerspectiveRegistry* perspRegistry = window->GetWorkbench()->GetPerspectiveRegistry(); QList<berry::IPerspectiveDescriptor::Pointer> perspectives( perspRegistry->GetPerspectives()); skip = false; for (QList<berry::IPerspectiveDescriptor::Pointer>::iterator perspIt = perspectives.begin(); perspIt != perspectives.end(); ++perspIt) { // if perspectiveExcludeList is set, it contains the id-strings of perspectives, which // should not appear as an menu-entry in the perspective menu if (perspectiveExcludeList.size() > 0) { for (int i=0; i<perspectiveExcludeList.size(); i++) { if (perspectiveExcludeList.at(i) == (*perspIt)->GetId()) { skip = true; break; } } if (skip) { skip = false; continue; } } QAction* perspAction = new berry::QtOpenPerspectiveAction(window, *perspIt, perspGroup); mapPerspIdToAction.insert((*perspIt)->GetId(), perspAction); } perspMenu->addActions(perspGroup->actions()); if (showViewMenuItem) { for (auto viewAction : viewActions) { viewMenu->addAction(viewAction); } } // ===== Help menu ==================================== QMenu* helpMenu = menuBar->addMenu("&Help"); helpMenu->addAction("&Welcome",this, SLOT(onIntro())); helpMenu->addAction("&Open Help Perspective", this, SLOT(onHelpOpenHelpPerspective())); helpMenu->addAction("&Context Help",this, SLOT(onHelp()), QKeySequence("F1")); helpMenu->addAction("&About",this, SLOT(onAbout())); // ===================================================== } else { undoAction = new QAction(QIcon::fromTheme("edit-undo",QIcon(":/org_mitk_icons/icons/tango/scalable/actions/edit-undo.svg")), "&Undo", nullptr); undoAction->setToolTip("Undo the last action (not supported by all modules)"); redoAction = new QAction(QIcon::fromTheme("edit-redo",QIcon(":/org_mitk_icons/icons/tango/scalable/actions/edit-redo.svg")) , "&Redo", nullptr); redoAction->setToolTip("execute the last action that was undone again (not supported by all modules)"); } // toolbar for showing file open, undo, redo and other main actions auto mainActionsToolBar = new QToolBar; mainActionsToolBar->setObjectName("mainActionsToolBar"); mainActionsToolBar->setContextMenuPolicy(Qt::PreventContextMenu); #ifdef __APPLE__ mainActionsToolBar->setToolButtonStyle ( Qt::ToolButtonTextUnderIcon ); #else mainActionsToolBar->setToolButtonStyle ( Qt::ToolButtonTextBesideIcon ); #endif imageNavigatorAction = new QAction(QIcon(":/org.mitk.gui.qt.ext/Slider.png"), "&Image Navigator", nullptr); bool imageNavigatorViewFound = window->GetWorkbench()->GetViewRegistry()->Find("org.mitk.views.imagenavigator"); if(this->GetWindowConfigurer()->GetWindow()->GetWorkbench()->GetEditorRegistry()->FindEditor("org.mitk.editors.dicomeditor")) { openDicomEditorAction = new QmitkOpenDicomEditorAction(QIcon(":/org.mitk.gui.qt.ext/dcm-icon.png"),window); } if(this->GetWindowConfigurer()->GetWindow()->GetWorkbench()->GetEditorRegistry()->FindEditor("org.mitk.editors.xnat.browser")) { openXnatEditorAction = new QmitkOpenXnatEditorAction(QIcon(":/org.mitk.gui.qt.ext/xnat-icon.png"),window); } if (imageNavigatorViewFound) { QObject::connect(imageNavigatorAction, SIGNAL(triggered(bool)), QmitkExtWorkbenchWindowAdvisorHack::undohack, SLOT(onImageNavigator())); imageNavigatorAction->setCheckable(true); // add part listener for image navigator imageNavigatorPartListener.reset(new PartListenerForImageNavigator(imageNavigatorAction)); window->GetPartService()->AddPartListener(imageNavigatorPartListener.data()); berry::IViewPart::Pointer imageNavigatorView = window->GetActivePage()->FindView("org.mitk.views.imagenavigator"); imageNavigatorAction->setChecked(false); if (imageNavigatorView) { bool isImageNavigatorVisible = window->GetActivePage()->IsPartVisible(imageNavigatorView); if (isImageNavigatorVisible) imageNavigatorAction->setChecked(true); } imageNavigatorAction->setToolTip("Toggle image navigator for navigating through image"); } viewNavigatorAction = new QAction(QIcon(":/org.mitk.gui.qt.ext/view-manager_48.png"),"&View Navigator", nullptr); viewNavigatorFound = window->GetWorkbench()->GetViewRegistry()->Find("org.mitk.views.viewnavigatorview"); if (viewNavigatorFound) { QObject::connect(viewNavigatorAction, SIGNAL(triggered(bool)), QmitkExtWorkbenchWindowAdvisorHack::undohack, SLOT(onViewNavigator())); viewNavigatorAction->setCheckable(true); // add part listener for view navigator viewNavigatorPartListener.reset(new PartListenerForViewNavigator(viewNavigatorAction)); window->GetPartService()->AddPartListener(viewNavigatorPartListener.data()); berry::IViewPart::Pointer viewnavigatorview = window->GetActivePage()->FindView("org.mitk.views.viewnavigatorview"); viewNavigatorAction->setChecked(false); if (viewnavigatorview) { bool isViewNavigatorVisible = window->GetActivePage()->IsPartVisible(viewnavigatorview); if (isViewNavigatorVisible) viewNavigatorAction->setChecked(true); } viewNavigatorAction->setToolTip("Toggle View Navigator"); } mainActionsToolBar->addAction(fileOpenAction); mainActionsToolBar->addAction(fileSaveProjectAction); mainActionsToolBar->addAction(closeProjectAction); mainActionsToolBar->addAction(undoAction); mainActionsToolBar->addAction(redoAction); if(this->GetWindowConfigurer()->GetWindow()->GetWorkbench()->GetEditorRegistry()->FindEditor("org.mitk.editors.dicomeditor")) { mainActionsToolBar->addAction(openDicomEditorAction); } if(this->GetWindowConfigurer()->GetWindow()->GetWorkbench()->GetEditorRegistry()->FindEditor("org.mitk.editors.xnat.browser")) { mainActionsToolBar->addAction(openXnatEditorAction); } if (imageNavigatorViewFound) { mainActionsToolBar->addAction(imageNavigatorAction); } if (viewNavigatorFound) { mainActionsToolBar->addAction(viewNavigatorAction); } mainWindow->addToolBar(mainActionsToolBar); // ==== Perspective Toolbar ================================== auto qPerspectiveToolbar = new QToolBar; qPerspectiveToolbar->setObjectName("perspectiveToolBar"); if (showPerspectiveToolbar) { qPerspectiveToolbar->addActions(perspGroup->actions()); mainWindow->addToolBar(qPerspectiveToolbar); } else delete qPerspectiveToolbar; // ==== View Toolbar ================================== auto qToolbar = new QToolBar; qToolbar->setObjectName("viewToolBar"); if (showViewToolbar) { mainWindow->addToolBar(qToolbar); for (auto viewAction : viewActions) { qToolbar->addAction(viewAction); } } else delete qToolbar; QSettings settings(GetQSettingsFile(), QSettings::IniFormat); mainWindow->restoreState(settings.value("ToolbarPosition").toByteArray()); auto qStatusBar = new QStatusBar(); //creating a QmitkStatusBar for Output on the QStatusBar and connecting it with the MainStatusBar auto statusBar = new QmitkStatusBar(qStatusBar); //disabling the SizeGrip in the lower right corner statusBar->SetSizeGripEnabled(false); auto progBar = new QmitkProgressBar(); qStatusBar->addPermanentWidget(progBar, 0); progBar->hide(); // progBar->AddStepsToDo(2); // progBar->Progress(1); mainWindow->setStatusBar(qStatusBar); if (showMemoryIndicator) { auto memoryIndicator = new QmitkMemoryUsageIndicatorView(); qStatusBar->addPermanentWidget(memoryIndicator, 0); } }
WDialog::~WDialog() { hide(); }
void IntroCode::deactivate() { callTimer.stop(); hide(); code.clearFocus(); }
/*we previously said that isValid() == true so we must commit our changes */ void XsldbgConfigImpl::update() { QString msg; if (debugger == 0L) return; /* update source, data, output file name if needed */ slotSourceFile(xslSourceEdit->text()); slotDataFile(xmlDataEdit->text()); slotOutputFile(outputFileEdit->text()); /* ensure entered param are updated */ slotAddParam(); if (debugger->start() == false) return ; /* User has killed xsldbg and we can't restart it */ /* always update the libxslt parameters */ debugger->fakeInput("delparam", true); LibxsltParam *param; for (param = paramList.first(); param != 0L; param = paramList.next()) { if (debugger->start() == false) return ; /* User has killed xsldbg and we can't restart it */ if (param->isValid()){ msg = "addparam "; msg.append(param->getName()).append(" ").append(param->getValue()); debugger->fakeInput(msg, true); } } /* now set the xsldbg options*/ if (catalogsChkBox->isChecked() != catalogs){ catalogs = catalogsChkBox->isChecked(); debugger->setOption("catalogs", catalogs); } if (debugChkBox->isChecked() != debug){ debug= debugChkBox->isChecked(); debugger->setOption("debug", debug); } if (htmlChkBox->isChecked() != html){ html = htmlChkBox->isChecked(); debugger->setOption("html", html); } if (docbookChkBox->isChecked() != docbook){ docbook = docbookChkBox->isChecked(); debugger->setOption("docbook", docbook); } if (nonetChkBox->isChecked() != nonet){ nonet = nonetChkBox->isChecked(); debugger->setOption("nonet", nonet); } if (novalidChkBox->isChecked() != novalid){ novalid = novalidChkBox->isChecked(); debugger->setOption("novalid", novalid); } if (nooutChkBox->isChecked() != noout){ noout = nooutChkBox->isChecked(); debugger->setOption("noout", noout); } if (timingChkBox->isChecked() != timing){ timing = timingChkBox->isChecked(); debugger->setOption("timing", timing); } if (profileChkBox->isChecked() != profile){ profile = profileChkBox->isChecked(); debugger->setOption("profile", profile); } debugger->setOption("preferhtml", true); debugger->setOption("utf8input", true); debugger->slotRunCmd(); hide(); }
void Simple_window::next() { button_pushed = true; hide(); }
SharedDialog::SharedDialog(QWidget *parent) : m_parent(parent) { //设置窗口基本属性 this->resize(420, 280);//设置窗体大小 this->setMinimumSize(420, 280); this->setMaximumSize(420, 280); this->setWindowTitle(tr("分享歌曲")); //专辑图片 albumLabel = new QLabel(this); albumLabel->setToolTip(tr("专辑图片")); //分享文本输入框 textEdit = new QTextEdit(this); textEdit->setObjectName(tr("textEdit")); //分享到 sharedLabel = new QLabel(this); sharedLabel->setObjectName(tr("sharedLabel")); sharedLabel->setText(tr("分享到")); //新浪微博 xinlangweiboCheckBox = new QCheckBox(this); xinlangweiboCheckBox->setToolTip(tr("分享到新浪微博")); xinlangweiboCheckBox->setStyleSheet("QCheckBox{color:black;}" "QCheckBox::indicator{width:10px;height:10px;border: 1px solid black;border-radius:2px}" "QCheckBox::indicator:checked {image: url(:/images/checked2.png);}"); xinlangweiboLabel = new QLabel(this); xinlangweiboLabel->setToolTip(tr("分享到新浪微博")); xinlangweiboLabel->setObjectName(tr("xinlangweiboLabel")); //腾讯微博 tengxunweiboCheckBox = new QCheckBox(this); tengxunweiboCheckBox->setToolTip(tr("分享到腾讯微博")); tengxunweiboCheckBox->setStyleSheet("QCheckBox{color:black;}" "QCheckBox::indicator{width:10px;height:10px;border: 1px solid black;border-radius:2px}" "QCheckBox::indicator:checked {image: url(:/images/checked2.png);}"); tengxunweiboLabel = new QLabel(this); tengxunweiboLabel->setToolTip(tr("分享到腾讯微博")); tengxunweiboLabel->setObjectName(tr("tengxunweiboLabel")); //QQ空间 qqkongjianCheckBox = new QCheckBox(this); qqkongjianCheckBox->setToolTip(tr("分享到QQ空间")); qqkongjianCheckBox->setStyleSheet("QCheckBox{color:black;}" "QCheckBox::indicator{width:10px;height:10px;border: 1px solid black;border-radius:2px}" "QCheckBox::indicator:checked {image: url(:/images/checked2.png);}"); qqkongjianLabel = new QLabel(this); qqkongjianLabel->setToolTip(tr("分享到QQ空间")); qqkongjianLabel->setObjectName(tr("qqkongjianLabel")); //人人网 renrenCheckBox = new QCheckBox(this); renrenCheckBox->setToolTip(tr("分享到人人网")); renrenCheckBox->setStyleSheet("QCheckBox{color:black;}" "QCheckBox::indicator{width:10px;height:10px;border: 1px solid black;border-radius:2px}" "QCheckBox::indicator:checked {image: url(:/images/checked2.png);}"); renrenLabel = new QLabel(this); renrenLabel->setToolTip(tr("分享到人人网")); renrenLabel->setObjectName(tr("renrenLabel")); //开心网 kaixinCheckBox = new QCheckBox(this); kaixinCheckBox->setToolTip(tr("分享到开心网")); kaixinCheckBox->setStyleSheet("QCheckBox{color:black;}" "QCheckBox::indicator{width:10px;height:10px;border: 1px solid black;border-radius:2px}" "QCheckBox::indicator:checked {image: url(:/images/checked2.png);}"); kaixinLabel = new QLabel(this); kaixinLabel->setToolTip(tr("分享到开心网")); kaixinLabel->setObjectName(tr("kaixinLabel")); //豆瓣网 doubanCheckBox = new QCheckBox(this); doubanCheckBox->setToolTip(tr("分享到豆瓣网")); doubanCheckBox->setStyleSheet("QCheckBox{color:black;}" "QCheckBox::indicator{width:10px;height:10px;border: 1px solid black;border-radius:2px}" "QCheckBox::indicator:checked {image: url(:/images/checked2.png);}"); doubanLabel = new QLabel(this); doubanLabel->setToolTip(tr("分享到豆瓣网")); doubanLabel->setObjectName(tr("doubanLabel")); //搜狐微博 souhuweiboCheckBox = new QCheckBox(this); souhuweiboCheckBox->setToolTip(tr("分享到搜狐微博")); souhuweiboCheckBox->setStyleSheet("QCheckBox{color:black;}" "QCheckBox::indicator{width:10px;height:10px;border: 1px solid black;border-radius:2px}" "QCheckBox::indicator:checked {image: url(:/images/checked2.png);}"); souhuweiboLabel = new QLabel(this); souhuweiboLabel->setToolTip(tr("分享到搜狐微博")); souhuweiboLabel->setObjectName(tr("souhuweiboLabel")); //QQ好友 qqhaoyouCheckBox = new QCheckBox(this); qqhaoyouCheckBox->setToolTip(tr("分享到QQ好友")); qqhaoyouCheckBox->setStyleSheet("QCheckBox{color:black;}" "QCheckBox::indicator{width:10px;height:10px;border: 1px solid black;border-radius:2px}" "QCheckBox::indicator:checked {image: url(:/images/checked2.png);}"); qqhaoyouLabel = new QLabel(this); qqhaoyouLabel->setToolTip(tr("分享到QQ好友")); qqhaoyouLabel->setObjectName(tr("qqhaoyouLabel")); //分享按钮 shareButton = new QPushButton(this); shareButton->setText(tr("分享")); //取消按钮 cancelButton = new QPushButton(this); cancelButton->setText(tr("取消")); albumLabel->setGeometry(25, 20, 110, 103); textEdit->setGeometry(150, 20, 250, 103); sharedLabel->setGeometry(25, 150, 100, 20); xinlangweiboCheckBox->setGeometry(80, 150, 20, 20); xinlangweiboLabel->setGeometry(95, 143, 30, 30); tengxunweiboCheckBox->setGeometry(145, 150, 20, 20); tengxunweiboLabel->setGeometry(160, 143, 30, 30); qqkongjianCheckBox->setGeometry(210, 150, 20, 20); qqkongjianLabel->setGeometry(225, 143, 30, 30); renrenCheckBox->setGeometry(275, 150, 20, 20); renrenLabel->setGeometry(290, 143, 30, 30); kaixinCheckBox->setGeometry(340, 150, 20, 20); kaixinLabel->setGeometry(355, 143, 30, 30); doubanCheckBox->setGeometry(80, 200, 20, 20); doubanLabel->setGeometry(95, 193, 30, 30); souhuweiboCheckBox->setGeometry(145, 200, 20, 20); souhuweiboLabel->setGeometry(160, 193, 30, 30); qqhaoyouCheckBox->setGeometry(210, 200, 20, 20); qqhaoyouLabel->setGeometry(225, 193, 30, 30); shareButton->setGeometry(240, 240, 80, 25); cancelButton->setGeometry(330, 240, 80, 25); //复选框状态改变 connect(xinlangweiboCheckBox, SIGNAL(stateChanged(int)), this, SLOT(slot_CheckBoxStateChanged(int))); connect(tengxunweiboCheckBox, SIGNAL(stateChanged(int)), this, SLOT(slot_CheckBoxStateChanged(int))); connect(qqkongjianCheckBox, SIGNAL(stateChanged(int)), this, SLOT(slot_CheckBoxStateChanged(int))); connect(renrenCheckBox, SIGNAL(stateChanged(int)), this, SLOT(slot_CheckBoxStateChanged(int))); connect(kaixinCheckBox, SIGNAL(stateChanged(int)), this, SLOT(slot_CheckBoxStateChanged(int))); connect(doubanCheckBox, SIGNAL(stateChanged(int)), this, SLOT(slot_CheckBoxStateChanged(int))); connect(souhuweiboCheckBox, SIGNAL(stateChanged(int)), this, SLOT(slot_CheckBoxStateChanged(int))); connect(qqhaoyouCheckBox, SIGNAL(stateChanged(int)), this, SLOT(slot_CheckBoxStateChanged(int))); connect(shareButton, SIGNAL(clicked()), this, SLOT(slot_SharedMusic())); connect(cancelButton, SIGNAL(clicked()), this, SLOT(hide())); }
void BgBulmaGes::launchBulmaCont() { hide(); runCommand ( "bulmacont" ); }
void Dialog::closeEvent(QCloseEvent *event) { hide(); event->ignore(); }
void BgBulmaGes::launchBulmaFact() { hide(); runCommand ( "bulmafact" ); }
int CListBox::exec(CMenuTarget* parent, const std::string &) { neutrino_msg_t msg; neutrino_msg_data_t data; int res = menu_return::RETURN_REPAINT; selected=0; if (parent) { parent->hide(); } paintHead(); paint(); paintFoot(); bool loop=true; modified = false; while (loop) { g_RCInput->getMsg(&msg, &data, g_settings.timing[SNeutrinoSettings::TIMING_EPG]); neutrino_msg_t msg_repeatok = msg & ~CRCInput::RC_Repeat; if (msg == g_settings.key_channelList_cancel || msg == CRCInput::RC_home) { loop = false; } else if (msg_repeatok == CRCInput::RC_up || msg_repeatok == g_settings.key_channelList_pageup) { int itemCount = getItemCount(); if (itemCount > 0) { int step = (msg_repeatok == g_settings.key_channelList_pageup) ? listmaxshow : 1; // browse or step 1 int new_selected = selected - step; if (new_selected < 0) new_selected = itemCount - 1; updateSelection(new_selected); } } else if (msg_repeatok == CRCInput::RC_down || msg_repeatok == g_settings.key_channelList_pagedown) { unsigned int itemCount = getItemCount(); if (itemCount > 0) { unsigned int step = (msg_repeatok == g_settings.key_channelList_pagedown) ? listmaxshow : 1; // browse or step 1 unsigned int new_selected = selected + step; if (new_selected >= itemCount) { if ((itemCount / listmaxshow + 1) * listmaxshow == itemCount + listmaxshow) // last page has full entries new_selected = 0; else new_selected = ((step == listmaxshow) && (new_selected < ((itemCount / listmaxshow + 1) * listmaxshow))) ? (itemCount - 1) : 0; } updateSelection(new_selected); } } else if( msg ==CRCInput::RC_ok) { onOkKeyPressed(); } else if ( msg ==CRCInput::RC_red) { onRedKeyPressed(); } else if ( msg ==CRCInput::RC_green) { onGreenKeyPressed(); } else if ( msg ==CRCInput::RC_yellow) { onYellowKeyPressed(); } else if ( msg ==CRCInput::RC_blue) { onBlueKeyPressed(); } else { CNeutrinoApp::getInstance()->handleMsg( msg, data ); // kein canceling... } } hide(); return res; }
void BgBulmaGes::launchBulmaTPV() { hide(); runCommand ( "bulmatpv" ); }
// main int CSysInfoWidget::exec(CMenuTarget *parent, const std::string &/*actionKey*/) { int res = menu_return::RETURN_REPAINT; if(mode == SYSINFO) { sysinfo(); } else if(mode == DMESGINFO) { dmesg(); } else if(mode == CPUINFO) { cpuinfo(); } else if(mode == PSINFO) { ps(); } if (parent) parent->hide(); paintHead(); paint(); paintFoot(); frameBuffer->blit(); neutrino_msg_t msg; neutrino_msg_data_t data; int timercount = 0; unsigned long long timeoutEnd = g_RCInput->calcTimeoutEnd(5); while (msg != (neutrino_msg_t) g_settings.key_channelList_cancel) { g_RCInput->getMsgAbsoluteTimeout( &msg, &data, &timeoutEnd ); if (msg <= CRCInput::RC_MaxRC ) timeoutEnd = g_RCInput->calcTimeoutEnd(5); if (msg == CRCInput::RC_timeout) { if (mode == SYSINFO) { timercount = 0; sysinfo(); selected = 0; paintHead(); paint(); paintFoot(); } if ((mode == DMESGINFO) && (++timercount>11)) { timercount = 0; dmesg(); paintHead(); paint(); paintFoot(); } if ((mode == PSINFO)&&(refreshIt == true)) { timercount = 0; ps(); paintHead(); paint(); paintFoot(); } timeoutEnd = g_RCInput->calcTimeoutEnd(5); g_RCInput->getMsgAbsoluteTimeout( &msg, &data, &timeoutEnd ); } if ( ((int) msg == g_settings.key_channelList_pageup) && (mode != SYSINFO)) { int step = 0; int prev_selected = selected; step = ((int) msg == g_settings.key_channelList_pageup) ? listmaxshow : 1; // browse or step 1 selected -= step; if((prev_selected - step) < 0) selected = syscount - 1; if(state == beDefault) { paintItem(prev_selected - liststart); unsigned int oldliststart = liststart; liststart = (selected/listmaxshow)*listmaxshow; if(oldliststart!=liststart) paint(); else paintItem(selected - liststart); } } else if (((int) msg == g_settings.key_channelList_pagedown) && (mode != SYSINFO)) { int step = 0; int prev_selected = selected; step = ((int) msg == g_settings.key_channelList_pagedown) ? listmaxshow : 1; // browse or step 1 selected += step; if((int)selected >= syscount) selected = 0; if(state == beDefault) { paintItem(prev_selected - liststart); unsigned int oldliststart = liststart; liststart = (selected/listmaxshow)*listmaxshow; if(oldliststart != liststart) paint(); else paintItem(selected - liststart); } } else if ((msg == CRCInput::RC_red) && (mode != SYSINFO)) { mode = SYSINFO; sysinfo(); selected = 0; paintHead(); paint(); paintFoot(); } else if ((msg == CRCInput::RC_green) && (mode != DMESGINFO)) { mode = DMESGINFO; timercount = 0; dmesg(); selected = 0; paintHead(); paint(); paintFoot(); } else if ((msg == CRCInput::RC_yellow) && (mode != CPUINFO)) { mode = CPUINFO; cpuinfo(); selected = 0; paintHead(); paint(); paintFoot(); } else if (msg == CRCInput::RC_blue) { mode = PSINFO; ps(); selected = 0; paintHead(); paint(); paintFoot(); } else { CNeutrinoApp::getInstance()->handleMsg( msg, data ); // kein canceling... } frameBuffer->blit(); } hide(); return res; }
void K3b::InteractionDialog::hideTemporarily() { hide(); }