util/s60pixelmetrics/pm_mapperview.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
   127             TInt width = screenRect.Width();
   127             TInt width = screenRect.Width();
   128             fileName.AppendNum(height);
   128             fileName.AppendNum(height);
   129             fileName.Append('_');
   129             fileName.Append('_');
   130             fileName.AppendNum(width);
   130             fileName.AppendNum(width);
   131 
   131 
   132             if (AknLayoutUtils::LayoutMirrored())
       
   133                 fileName.Append(_L("_mirrored"));
       
   134             fileName.Append(_L(".txt"));
   132             fileName.Append(_L(".txt"));
   135 
   133 
   136             TInt err=file.Open(fs,fileName,EFileStreamText|EFileWrite|EFileShareAny);
   134             TInt err=file.Open(fs,fileName,EFileStreamText|EFileWrite|EFileShareAny);
   137             if (err==KErrNotFound) // file does not exist - create it
   135             if (err==KErrNotFound) // file does not exist - create it
   138                 err=file.Create(fs,fileName,EFileStreamText|EFileWrite|EFileShareAny);
   136                 err=file.Create(fs,fileName,EFileStreamText|EFileWrite|EFileShareAny);
   261          AknLayoutUtils::LayoutMetricsRect(
   259          AknLayoutUtils::LayoutMetricsRect(
   262              AknLayoutUtils::EMainPane,
   260              AknLayoutUtils::EMainPane,
   263              mainPaneRect );
   261              mainPaneRect );
   264          SetRect( mainPaneRect );
   262          SetRect( mainPaneRect );
   265 
   263 
   266          CPixelMetricsMapperAppUi* myApp = static_cast<CPixelMetricsMapperAppUi*> (ControlEnv()->AppUi());
       
   267          if (myApp->ReadyForAutoOp())
       
   268         	 myApp->DoAutoOperationL();
       
   269          }
   264          }
   270     if (iListbox) iListbox->HandleResourceChange(aType);
   265     if (iListbox)
       
   266         iListbox->HandleResourceChange(aType);
   271     }
   267     }
   272 
   268 
   273 
   269 
   274 // -----------------------------------------------------------------------------
   270 // -----------------------------------------------------------------------------
   275 //
   271 //
   326 //
   322 //
   327 void CPixelMetricsMapperView::HandleCommandL( TInt aCommand )
   323 void CPixelMetricsMapperView::HandleCommandL( TInt aCommand )
   328     {
   324     {
   329     AppUi()->HandleCommandL( aCommand );
   325     AppUi()->HandleCommandL( aCommand );
   330     }
   326     }
       
   327 
   331 
   328 
   332 // -----------------------------------------------------------------------------
   329 // -----------------------------------------------------------------------------
   333 //
   330 //
   334 // -----------------------------------------------------------------------------
   331 // -----------------------------------------------------------------------------
   335 //
   332 //
   339         {
   336         {
   340         TRect cr = ClientRect();
   337         TRect cr = ClientRect();
   341         iView->SetRect( cr );
   338         iView->SetRect( cr );
   342         }
   339         }
   343     }
   340     }
       
   341 
   344 
   342 
   345 // -----------------------------------------------------------------------------
   343 // -----------------------------------------------------------------------------
   346 //
   344 //
   347 // -----------------------------------------------------------------------------
   345 // -----------------------------------------------------------------------------
   348 //
   346 //
   356     TRect cr = ClientRect();
   354     TRect cr = ClientRect();
   357     iView->ConstructL( cr );
   355     iView->ConstructL( cr );
   358     AppUi()->AddToViewStackL( *this, iView );
   356     AppUi()->AddToViewStackL( *this, iView );
   359     }
   357     }
   360 
   358 
       
   359 
   361 // -----------------------------------------------------------------------------
   360 // -----------------------------------------------------------------------------
   362 //
   361 //
   363 // -----------------------------------------------------------------------------
   362 // -----------------------------------------------------------------------------
   364 //
   363 //
   365 void CPixelMetricsMapperView::DoDeactivate()
   364 void CPixelMetricsMapperView::DoDeactivate()
   370         }
   369         }
   371     delete iView;
   370     delete iView;
   372     iView = NULL;
   371     iView = NULL;
   373     }
   372     }
   374 
   373 
       
   374 
   375 // End of File
   375 // End of File