// первоначальная инициализация bool ddMainWindow::initializing() { getMemoryFolderNames(); mobileCopyInfo = NULL; stopMobileCopy = false; auto_mounting(); // автоматическое монтирование slotFillTable(); // заполнение таблицы дисков showInfo = new TShowInfo(); mythread = new TMyThread(); mnt = new TMount(); QObject::connect(showInfo, SIGNAL(changeVal(int, const QString &)), SLOT(funcShowInfo(int, const QString &)), Qt::QueuedConnection); QObject::connect(showInfo, SIGNAL(sigShowMsgBox(QString)), SLOT(ShowMsgBox(QString)), Qt::QueuedConnection); QObject::connect(mythread, SIGNAL(sigShowMsgBox2(const QString &)), SLOT(ShowMsgBox2(const QString &)), Qt::QueuedConnection); QObject::connect(mythread, SIGNAL(sigChangeButton()), SLOT(ChangeButton()), Qt::QueuedConnection); QObject::connect(ui->tableWidget, SIGNAL(cellClicked(int,int)), SLOT(showDiskInCombobox(int, int))); connect (&timer, SIGNAL (timeout()), &loop, SLOT(quit())); prevCol = -1; prevRow = -1; return true; }
void CWindow::DeleteAllControl() { ResetLeftButton(); ResetRightButton(); ChangeButton(); iControlArray.ResetAndDestroy(); }
void CSearchLocalResultView::ConstructL(const TDesC& aTitle) { iMainEngine.ControlFactory().SetParentWindow(this); ChangeButton(); iTitle=HBufC::NewL(aTitle.Length()); iTitle->Des().Copy(aTitle); iLocalSearch=CHandleLocalSearch::NewL(*this,iMainEngine,iIndex); }
void CSearchResultView::ConstructL(const TDesC8& aURL,const TDesC& aTitle) { iMainEngine.ControlFactory().SetParentWindow(this); ChangeButton(); iTitle=HBufC::NewL(aTitle.Length()); iTitle->Des().Copy(aTitle); iInSearch=CHandleInSearch::NewL(*this,iMainEngine); iInSearch->SetSendUrl(aURL); }
/* CheckSelectAll() * ==================================================================== */ void CheckSelectAll( int draw ) { int ocount; int unselected; /* Count Number of Selected Fonts */ ocount = CountSelectedFonts( available_list, SPD_FONT ); unselected = available_count - ocount; /* If we have some unselected available fonts, then enable button */ if( unselected ) { if( IsDisabled( ISELECT ) ) { if( draw ) ChangeButton( ad_inactive, ISELECT, TRUE ); else { Enable( ISELECT ); MakeExit( ISELECT ); } } } else { /* No more fonts to select, shut it off */ if( !IsDisabled( ISELECT ) ) { if( draw ) ChangeButton( ad_inactive, ISELECT, FALSE ); else { Disable( ISELECT ); NoExit( ISELECT ); } } } }
/* DoSelectAll() * ==================================================================== */ void DoSelectAll( void ) { int index; int ocount; int unselected; /* Count Number of Selected Fonts */ ocount = CountSelectedFonts( available_list, SPD_FONT ); unselected = available_count - ocount; if( !unselected ) { form_alert( 1, nosel ); ChangeButton( ad_inactive, ISELECT, FALSE ); return; } if( form_alert( 1, selall ) == 1 ) { SelectAllUnusedFonts(); index = Get_Findex( available_list, Active_Slit[0] ); mover_setup( available_list, available_count, IBASE, ISLIDER, IUP, IDOWN, ILINE0, ILINE13, ILINE, index, INACTIVE_HEIGHT ); RedrawObject( tree, IBASE ); Objc_draw( tree, ILINE, MAX_DEPTH, NULL ); if( IsDisabled( IINSTALL ) ) ChangeButton( ad_inactive, IINSTALL, TRUE ); if( IsDisabled( ICONFIG ) ) ChangeButton( ad_inactive, ICONFIG, TRUE ); } CheckSelectAll( TRUE ); }
void CFriendLink::ConstructL() { iMainEngine.ControlFactory().SetParentWindow(this); ChangeButton();//add by hesanyuan iSyschr.SetObserver(this); if (this->UpData()) { return; } else { this->CreateTileAndList(); } }
void CBrowserPicWindow::ConstructL() { ChangeButton(); ((CControlFactory&)iMainEngine.ControlFactory()).SetParentWindow(this); iTitleBar=iMainEngine.ControlFactory().CreateDefaultTitleBarL(_L("")); iShowControlText=EFalse; //不允许弹出0*#界面 iCanPopUpWindow=EFalse; SetShowRect(iMainEngine.ScreenLayout().WhiteBackgroundRect()); }
void CDownloadHistorySettingWindow::ConstructL() { ChangeButton(); TFileName path; path.Append(iMainEngine.GetAppPath()); path.Append(_L("systemManage.txt")); iRes=CFileReadByRow::NewL(); iRes->LoadItem(path); iMainEngine.ControlFactory().SetParentWindow(this); iMainEngine.ControlFactory().CreateDefaultTitleBarL((*iRes->iItem)[ESystemManageRes_DownloadHistory_Setting]); InitSelectGroup(); }
BOOL CFileTransDlg::OnCommand(WPARAM wParam, LPARAM lParam) { switch (LOWORD(wParam)) { case IDCANCEL: ::PostMessage(fv->HMainWin,WM_USER_FTCANCEL,fv->OpId,0); return TRUE; case IDC_TRANSPAUSESTART: ChangeButton(! Pause); return TRUE; case IDC_TRANSHELP: ::PostMessage(fv->HMainWin,WM_USER_DLGHELP2,0,0); return TRUE; default: return (CDialog::OnCommand(wParam,lParam)); } }
void CTraficStatisticWindow::ConstructL() { ChangeButton(); iTimer=CNotifyTimer::NewL(*this); i=0; TFileName path; path.Append(iMainEngine.GetAppPath()); path.Append(_L("systemManage.txt")); iRes=CFileReadByRow::NewL(); iRes->LoadItem(path); iMainEngine.ControlFactory().SetParentWindow(this); iMainEngine.ControlFactory().CreateDefaultTitleBarL((*iRes->iItem)[ESystemManageRes_Connecttion_Traffic]); InitSelectGroup(); }
void CBrowserMusicWindow::ConstructL() { ChangeButton(); ((CControlFactory&)iMainEngine.ControlFactory()).SetParentWindow(this); iFileNameArray=iMainEngine.MusicPlayManageEngine().GetFileName(); InitImage(); iMainEngine.MusicPlayManageEngine().SetAudioPlayNoticeWindow(this); //不允许弹出0*#界面 iCanPopUpWindow=EFalse; iCurrentTime.Zero(); iCurrentTime.Append(_L("00:00")); iTotalTime.Zero(); iTotalTime.Append(_L("00:00")); InitListBox(); }
/* MoveToInstalled() * ==================================================================== * Move any Available fonts to the Installed List. * type -> 0 -> USE Available list CALLS * -> 1 -> Skip available list calls */ void MoveToInstalled( int flag ) { FON_PTR curptr; FON_PTR xcurptr; int index; curptr = available_list; /* Try to maintain the top node displayed to remain that way if * at all possible. */ xcurptr = Active_Slit[ 0 ]; if( curptr && xcurptr ) index = Get_Findex( curptr, xcurptr ); /* Go through the list looking for selected nodes ( AFLAG == TRUE ) * and set their SEL() to FALSE. * Where SEL == TRUE means installed. and SEL == FALSE means * available. * Set MakeWidth Tables flag if moving Outline Fonts TO INSTALLED! */ while( curptr ) { if( AFLAG( curptr ) ) { if( FTYPE( curptr ) == SPD_FONT ) MakeWidthFlag = TRUE; SEL( curptr ) = TRUE; } curptr = FNEXT( curptr ); } /* Now, fix up the linked list for both the * available and installed fonts. */ free_arena_links(); installed_count = build_list( &installed_list, &installed_last, ACTIVE ); available_count = build_list( &available_list, &available_last, INACTIVE ); /* Prompt to save SYS files */ SetChangeFlag(); if( !flag ) { mover_setup( available_list, available_count, IBASE, ISLIDER, IUP, IDOWN, ILINE0, ILINE13, ILINE, index, INACTIVE_HEIGHT ); RedrawObject( tree, IBASE ); Objc_draw( tree, ILINE, MAX_DEPTH, NULL ); if( !IsDisabled( IINSTALL ) ) ChangeButton( ad_inactive, IINSTALL, FALSE ); if( !IsDisabled( ICONFIG ) ) ChangeButton( ad_inactive, ICONFIG, FALSE ); CheckSelectAll( TRUE ); } }
void CMenuSubscribeDlg::OnClickEnabledIf3() { ChangeButton( IDC_MENU3_ENABLED_IF ); }
void CMenuSubscribeDlg::OnClickVisibleIf3() { ChangeButton( IDC_MENU3_VISIBLE_IF ); }
/* mover_button() *========================================================================== * Handles the button events for the CPX Mover/Rename Function * IN: int obj: The RCS Object clicked on. * OUT: BOOLEAN: TRUE - Exit the CPX Mover Config * FALSE - Remain in the CPX Mover Config * */ void mover_button( int obj ) { MRETS mk; int ox,oy; HDEVICE_PTR curptr; DEV_PTR temp_device; Old_Slit = Cur_Slit; if( obj == Mup ) { sl_arrow( tree, Mbase, Mslider, Mup, -1, max( Total - MAX_SLITS, 0 ), 0, &Cur_Slit, VERTICAL, Draw_Slit ); return; } if( obj == Mdown ) { sl_arrow( tree, Mbase, Mslider, Mdown, 1, max( Total - MAX_SLITS, 0 ), 0, &Cur_Slit, VERTICAL, Draw_Slit ); return; } if( obj == Mslider ) { MF_Save(); if( AES_Version >= 0x0320 ) graf_mouse( FLAT_HAND, 0L ); if(( AES_Version >= 0x0330 ) && ( gl_ncolors > LWHITE ) ) XSelect( tree, Mslider ); graf_mkstate( ( int *)&mk.x, &oy, (int *)&mk.buttons, ( int *)&mk.kstate ); do { graf_mkstate( (int *)&mk.x, (int *)&mk.y, (int *)&mk.buttons, ( int *)&mk.kstate ); }while( mk.buttons && ( mk.y == oy )); if( mk.buttons && ( mk.y != oy )) { sl_dragy( tree, Mbase, Mslider, max( Total - MAX_SLITS, 0 ), 0, &Cur_Slit, Draw_Slit ); } if(( AES_Version >= 0x0330 ) && ( gl_ncolors > LWHITE ) ) XDeselect( tree, Mslider ); MF_Restore(); return; } if( obj == Mbase ) { Graf_mkstate( &mk ); objc_offset( tree, Mslider, &ox, &oy ); ox = (( mk.y < oy ) ? ( -MAX_SLITS ) : ( MAX_SLITS ) ); sl_arrow( tree, Mbase, Mslider, -1, ox, max( Total - MAX_SLITS, 0 ), 0, &Cur_Slit, VERTICAL, Draw_Slit ); return; } if(( obj >= Obj_Beg ) && ( obj <= Obj_End )) { if( !IsSelected( obj ) ) { curptr = Active_Slit[ obj - First_Obj ]; if( !curptr ) return; /* SetChangeFlag();*/ Undo_Fnodes( hdriver_head ); HFLAG( curptr ) = TRUE; XSelect( tree, obj ); cur_cdriver = HNAME( curptr ); strcpy( driver_text, cdrivers[ HNAME( curptr )] ); TedText( FPRINTER ) = &driver_text[0]; Objc_draw( tree, FPRINTER, MAX_DEPTH, NULL ); temp_device = find_device( 21 ); /* find the printer device */ if( !temp_device ) { /* Add the Device if necessary */ temp_device = AddNewDevice( 21 ); if( temp_device ) { /* found a slot and added it to the device linked list array. */ DNAME( temp_device ) = cdriver_array[ cur_cdriver ]; } } else /* Else, just change the device name */ DNAME( temp_device ) = cdriver_array[ cur_cdriver ]; if( IsDisabled( FREMOVE ) ) ChangeButton( tree, FREMOVE, TRUE ); if( strstr( cdrivers[ cur_cdriver ], NonSpeedo ) ) { if( !IsDisabled( FCONFIG ) ) ChangeButton( tree, FCONFIG, FALSE ); } else { if( IsDisabled( FCONFIG ) ) ChangeButton( tree, FCONFIG, TRUE ); } /* WRITE THE ASSIGN.SYS IMMEDIATELY */ write_assign(); } } }