Exemplo n.º 1
0
int main( int argc, char* argv[] )
{
   PMShell* shell = 0;

   KCmdLineArgs::init( argc, argv, PMFactory::aboutData( ) );
   KCmdLineArgs::addCmdLineOptions( options );

   KApplication app;

   KCmdLineArgs* args = KCmdLineArgs::parsedArgs( );

   if( !args->isSet( "-opengl" ) )
      PMRenderManager::disableOpenGL( );
   if( !args->isSet( "-dri" ) )
      PMGLView::enableDirectRendering( false );

   if( args->count( ) > 0 )
   {
      for( int i = 0 ; i < args->count( ) ; i++ )
      {
         shell = new PMShell( args->url( i ) );
         shell->show( );
      }
   }
   else
   {
      shell = new PMShell;
      shell->show( );
   }
   args->clear();   
   return app.exec( );
}
Exemplo n.º 2
0
void PMShell::slotFileNew( )
{
   if( !m_pPart->isModified( ) && m_pPart->url( ).isEmpty( ) )
   {
      m_pPart->newDocument( );
      setCaption( );
   }
   else
   {
      PMShell *shell = new PMShell( );
      shell->show( );
   }
}
Exemplo n.º 3
0
void PMShell::openURL( const KURL& url )
{
   m_pRecent->addURL( url );

   if( !m_pPart->isModified( ) && m_pPart->url( ).isEmpty( ) )
   {
      m_pPart->openURL( url );
      setCaption( m_pPart->url( ).prettyURL( ) );
   }
   else
   {
      PMShell *shell = new PMShell( );
      shell->show( );
      shell->openURL( url );
   }
}
Exemplo n.º 4
0
void PMShell::slotFileNewWindow( )
{
   PMShell* shell = new PMShell;
   shell->show( );
}