Esempio n. 1
0
 void chooseDocument()
 {
     const auto res = showOpenFile();
     if( !res.urls.isEmpty() ) {
         QString encoding = res.encoding;
         foreach( const QUrl& u, res.urls ) {
             openDocumentInternal(u, QString(), KTextEditor::Range::invalid(), encoding  );
         }
     }
Esempio n. 2
0
void ImageProcessor::createActions() {
  /// open
  openFileAction = new QAction(QIcon(":/images/open.png"), tr("Open"), this);
  openFileAction->setShortcut(tr("Ctrl+O"));
  openFileAction->setStatusTip(tr("Open a file"));
  connect(openFileAction, SIGNAL(triggered()), this, SLOT(showOpenFile()));

  /// new
  newFileAction = new QAction(QIcon(":/images/new.png"), tr("New"), this);
  newFileAction->setShortcut(tr("Ctrl+N"));
  newFileAction->setStatusTip(tr("New"));
  connect(newFileAction, SIGNAL(triggered()), this, SLOT(showNewFile()));
}