void DataViewWindow::saveSequence()
{
    QString file = QFileDialog::getSaveFileName(this, "Enregistrer un fichier", QString(), "Text files (*.txt)");

    //ouvre le fichier en eciture
    std::ofstream fileSave(file.toStdString().c_str(), std::ios::out | std::ios::trunc);

    for(unsigned int i=1; i<dataEnregistre.size()+1; ++i)
    {
        fileSave<<"Clique : "+ QString::number(i).toStdString()<<std::endl;
        fileSave<<"Distance : "+QString::number(dataEnregistre[i-1].getDistance()).toStdString()<<std::endl;
        fileSave<<"Largeur bouton : "+QString::number(dataEnregistre[i-1].getWidthBtn()).toStdString()<<std::endl;
        fileSave<<"Temps Fitts : "+QString::number(dataEnregistre[i-1].getTpsFitts()).toStdString()<<std::endl;
        fileSave<<"Temps réel : "+QString::number((double)dataEnregistre[i-1].getTpsReal()/1000).toStdString()<<std::endl;
        fileSave<<"----------------------------------"<<std::endl;

    }
    fileSave<<"#############################"<<std::endl;
    fileSave<<"Moyenne Fitts : "+ QString::number(tpsFittTot/dataEnregistre.size()).toStdString()<<std::endl;
    fileSave<<"Moyenne temps réel : "+ QString::number(tpsRealTot/dataEnregistre.size()).toStdString()<<std::endl;
    fileSave<<"Equation de Fitts :" +  QString::number(dataEnregistre[1].getParaFitts1()).toStdString()
            +" + "+QString::number(dataEnregistre[1].getParaFitts2()).toStdString()+"*log(D/L + 0.5)"<<std::endl;
    fileSave<<"#############################"<<std::endl;

    //std::cout<<dataEnregistre[1].getParaFitts2()<<std::endl;
    fileSave.close();
}
Пример #2
0
void LogWindow :: setConnection(){
  	connect( calculateAction, SIGNAL( triggered() ), this, SLOT( showCalc() ) );
	connect( openAction, SIGNAL( triggered() ), this, SLOT( fileOpen() ) );
  	connect( saveAction, SIGNAL( triggered() ), this, SLOT( fileSave() ) );
  	connect( revertAction, SIGNAL( triggered() ), this, SLOT( fileRevert() ) );
	connect( myCalcDialog, SIGNAL( newExpr( QString, double ) ),this, SLOT( outputCalculation( QString, double ) ) );  	
}
Пример #3
0
void TextEdit::setupFileActions()
{
    QToolBar *tb = new QToolBar( this );
    QPopupMenu *menu = new QPopupMenu( this );
    menuBar()->insertItem( tr( "&File" ), menu );

    QAction *a;
    a = new QAction( tr( "New" ), QPixmap( "textdrawing/filenew.png" ), tr( "&New..." ), CTRL + Key_N, this, "fileNew" );
    connect( a, SIGNAL( activated() ), this, SLOT( fileNew() ) );
    a->addTo( tb );
    a->addTo( menu );
    a = new QAction( tr( "Open" ), QPixmap( "textdrawing/fileopen.png" ), tr( "&Open..." ), CTRL + Key_O, this, "fileOpen" );
    connect( a, SIGNAL( activated() ), this, SLOT( fileOpen() ) );
    a->addTo( tb );
    a->addTo( menu );
    menu->insertSeparator();
    a = new QAction( tr( "Save" ), QPixmap( "textdrawing/filesave.png" ), tr( "&Save..." ), CTRL + Key_S, this, "fileSave" );
    connect( a, SIGNAL( activated() ), this, SLOT( fileSave() ) );
    a->addTo( tb );
    a->addTo( menu );
    a = new QAction( tr( "Save As" ), QPixmap(), tr( "Save &As..." ), 0, this, "fileSaveAs" );
    connect( a, SIGNAL( activated() ), this, SLOT( fileSaveAs() ) );
    a->addTo( menu );
    menu->insertSeparator();
    a = new QAction( tr( "Print" ), QPixmap( "textdrawing/print.png" ), tr( "&Print..." ), CTRL + Key_P, this, "filePrint" );
    connect( a, SIGNAL( activated() ), this, SLOT( filePrint() ) );
    a->addTo( tb );
    a->addTo( menu );
    a = new QAction( tr( "Close" ), QPixmap(), tr( "&Close" ), 0, this, "fileClose" );
    connect( a, SIGNAL( activated() ), this, SLOT( fileClose() ) );
    a->addTo( menu );
}
Пример #4
0
void compile(){
	fileSave();
	SendMessage(hNotifs, WM_SETTEXT, 0, (LPARAM) "");	
	FILE *fp; // file input
	FILE *fo; // file output
	TokenList * tokenList;

	fp = fopen(openedFileName, "r");
	fo = fopen("SYMBOL TABLE.txt", "w");
	tokenList = createTokenList();
	initLexer(fp, fo);
	
	initToken(tokenList);
	readToken();
	generateCode(tokenList);
	fclose(fp);
	fclose(fo);
	
	if(strcmp(errorList[0], "") == 0){
		SendMessage(hNotifs, WM_SETTEXT, 0, (LPARAM) "No error");
		hasError = 0;	
	} else {
		hasError = 1;
		int i;
		for(i = 0; i < sizeof(errorList) / sizeof(errorList[0]); i++){
			int index = GetWindowTextLength(hNotifs);
			SetFocus(hNotifs);
			SendMessageA(hNotifs, EM_SETSEL, (WPARAM)index, (LPARAM)index); // set selection - end of text
			SendMessageA(hNotifs, EM_REPLACESEL, 0, (LPARAM) errorList[i]); // append!
		}	
	}
	memset(errorList, 0, sizeof(errorList) / sizeof(errorList[0]));	
}
Пример #5
0
//
// Checks to see if the document has been modified and asks the
// user if they would like to save the document before they continue
// with the operation they are trying to perform.
//
// Returns TRUE if the operation can continue otherwise returns FALSE
// and the calling process should not perform any actions.
//
bool MQLEdit::askSaveIfModified()
{
  if(_text->document()->isModified())
  {
    int ret = QMessageBox::question(this, tr("Document Modified!"),
                                    tr("Would you like to save your changes before continuing?"),
                          QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel,
                          QMessageBox::Yes);
    switch(ret)
    {
      case QMessageBox::Yes:
        return fileSave();
        break;
      case QMessageBox::No:
        break;
      case QMessageBox::Cancel:
        return false;
      default:
        QMessageBox::warning(this, tr("Warning"),
             tr("Encountered an unknown response. No action will be taken."));
        return false;
    
    }
  }
  return true;
}
Пример #6
0
void kerp::setupActions()
{
    KStdAction::openNew(this, SLOT(fileNew()), actionCollection());
    KStdAction::open(this, SLOT(fileOpen()), actionCollection());
    KStdAction::save(this, SLOT(fileSave()), actionCollection());
    KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection());
    KStdAction::print(this, SLOT(filePrint()), actionCollection());
    KStdAction::quit(kapp, SLOT(quit()), actionCollection());

    m_toolbarAction = KStdAction::showToolbar(this, SLOT(optionsShowToolbar()), actionCollection());
    m_statusbarAction = KStdAction::showStatusbar(this, SLOT(optionsShowStatusbar()), actionCollection());

    KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection());
    KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection());
    KStdAction::preferences(this, SLOT(optionsPreferences()), actionCollection());

    // this doesn't do anything useful.  it's just here to illustrate
    // how to insert a custom menu and menu item
    KAction *city_action = new KAction(i18n("&City/province"), 0,
                                  this, SLOT(city_action()),
                                  actionCollection(), "city_action");
    KAction *invoice_action=new KAction(i18n("&Invoice"),0,
    					this,SLOT(invoice_action()),
					actionCollection(),"invoice_action");

    KAction * partner_action = new KAction(i18n("&Partner"),0,
    									this,SLOT( partner_action()),
    									actionCollection(),"partner_action");

    createGUI();
}
Пример #7
0
void FITSViewer::fileOpen()
{

  if (Dirty)
  {
    
  QString caption = i18n( "Save Changes to FITS?" );
		QString message = i18n( "The current FITS file has unsaved changes.  Would you like to save before closing it?" );
		int ans = KMessageBox::warningYesNoCancel( 0, message, caption, KStdGuiItem::save(), KStdGuiItem::discard() );
		if ( ans == KMessageBox::Yes )
			fileSave();	
		else if ( ans == KMessageBox::No ) 
			fitsRestore();
   }
   
   KURL fileURL = KFileDialog::getOpenURL( QDir::homeDirPath(), "*.fits *.fit *.fts|Flexible Image Transport System");
  
  if (fileURL.isEmpty())
    return;

  
  currentURL = fileURL;
  
  initFITS();

}
Пример #8
0
bool MainWindow::qt_invoke( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: buildPalette(); break;
    case 1: buildFont(); break;
    case 2: tunePalette(); break;
    case 3: paletteSelected((int)static_QUType_int.get(_o+1)); break;
    case 4: styleSelected((const QString&)static_QUType_QString.get(_o+1)); break;
    case 5: familySelected((const QString&)static_QUType_QString.get(_o+1)); break;
    case 6: substituteSelected((const QString&)static_QUType_QString.get(_o+1)); break;
    case 7: removeSubstitute(); break;
    case 8: addSubstitute(); break;
    case 9: downSubstitute(); break;
    case 10: upSubstitute(); break;
    case 11: removeLibpath(); break;
    case 12: addLibpath(); break;
    case 13: downLibpath(); break;
    case 14: upLibpath(); break;
    case 15: browseLibpath(); break;
    case 16: removeFontpath(); break;
    case 17: addFontpath(); break;
    case 18: downFontpath(); break;
    case 19: upFontpath(); break;
    case 20: browseFontpath(); break;
    case 21: fileSave(); break;
    case 22: fileExit(); break;
    case 23: somethingModified(); break;
    case 24: helpAbout(); break;
    case 25: helpAboutQt(); break;
    case 26: pageChanged((QWidget*)static_QUType_ptr.get(_o+1)); break;
    default:
	return MainWindowBase::qt_invoke( _id, _o );
    }
    return TRUE;
}
Пример #9
0
int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QMainWindow::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: updateAspectRatio(); break;
        case 1: settingsChanged(); break;
        case 2: fileCopy3Dto2D(); break;
        case 3: fileNew(); break;
        case 4: fileOpen(); break;
        case 5: fileSave(); break;
        case 6: checkAllRayFeatures(); break;
        case 7: uncheckAllRayFeatures(); break;
        case 8: filterImage(); break;
        case 9: renderImage(); break;
        case 10: activateCanvas2D(); break;
        case 11: activateCanvas3D(); break;
        default: ;
        }
        _id -= 12;
    }
    return _id;
}
Пример #10
0
void MainWindow::closeEvent(QCloseEvent *e)
{
    if (modified) {
        switch (QMessageBox::warning(this, tr("Save Changes"),
                                     tr("Save changes to settings?"),
                                     (QMessageBox::Yes | QMessageBox::No
                                     | QMessageBox::Cancel))) {
        case QMessageBox::Yes: // save
            qApp->processEvents();
            fileSave();

            // fall through intended
        case QMessageBox::No: // don't save
            e->accept();
            break;

        case QMessageBox::Cancel: // cancel
            e->ignore();
            break;

        default: break;
        }
    } else
        e->accept();
}
Пример #11
0
AS_NAMESPACE_START

EditorTabs::EditorTabs(QWidget *parent)
    : QTabWidget(parent), _finder(nullptr)
{
    _connections << connect(parent, SIGNAL(editCopy()), this, SLOT(onEditCopy()));
    _connections << connect(parent, SIGNAL(editCut()), this, SLOT(onEditCut()));
    _connections << connect(parent, SIGNAL(editFind()), this, SLOT(onEditFind()));
    _connections << connect(parent, SIGNAL(editGoto()), this, SLOT(onEditGoto()));
    _connections << connect(parent, SIGNAL(editPaste()), this, SLOT(onEditPaste()));
    _connections << connect(parent, SIGNAL(editRedo()), this, SLOT(onEditRedo()));
    _connections << connect(parent, SIGNAL(editReplace()), this, SLOT(onEditReplace()));
    _connections << connect(parent, SIGNAL(editUndo()), this, SLOT(onEditUndo()));
    _connections << connect(parent, SIGNAL(fileClose()), this, SLOT(onFileClose()));
    _connections << connect(parent, SIGNAL(fileCloseAll()), this, SLOT(onFileCloseAll()));
    _connections << connect(parent, SIGNAL(fileOpen(QString)), this, SLOT(onFileOpen(QString)));
    _connections << connect(parent, SIGNAL(fileSave()), this, SLOT(onFileSave()));
    _connections << connect(parent, SIGNAL(fileSaveAll()), this, SLOT(onFileSaveAll()));
    _connections << connect(this, &QTabWidget::tabCloseRequested, this, &EditorTabs::onTabCloseRequested);
    _connections << connect(tabBar(), &QTabBar::tabMoved, this, &EditorTabs::onTabMoved);
    _connections << connect(this, &EditorTabs::currentChanged, this, &EditorTabs::onCurrentChanged);
    _connections << connect(this, SIGNAL(fileChanged(QString)), parent, SLOT(onFileChanged(QString)));
    _connections << connect(this, SIGNAL(fileSaved(QString)), parent, SLOT(onFileSaved(QString)));
    setMovable(true);
    setTabsClosable(true);
}
Пример #12
0
// Deletes all rating files (is invoked when all likes/dislikes are reseted)
void RadioStation::deleteAllRatings() {

	std::string filename;
	std::string line;

	for(unsigned int tempID = 0; tempID < numberOfUsers; tempID++)
	{
		filename = createFilenameWithSequence("ratingsUser", ".csv", 3, tempID);

		fstream fileSave(filename);

		// Checks if playlist file already exists. If so, removes it.
		if(fileSave.good())
		{
			fileSave.close();
			if(remove(filename.c_str()) != 0)
			{
				cout << cantRemoveFileMsg() << endl;
				waitForKey();
			}
		}
		else
		{
			return;
		}
	}

}
Пример #13
0
bool TextEdit::qt_invoke( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: fileNew(); break;
    case 1: fileOpen(); break;
    case 2: fileSave(); break;
    case 3: fileSaveAs(); break;
    case 4: filePrint(); break;
    case 5: fileClose(); break;
    case 6: fileExit(); break;
    case 7: editUndo(); break;
    case 8: editRedo(); break;
    case 9: editCut(); break;
    case 10: editCopy(); break;
    case 11: editPaste(); break;
    case 12: textBold(); break;
    case 13: textUnderline(); break;
    case 14: textItalic(); break;
    case 15: textFamily((const QString&)static_QUType_QString.get(_o+1)); break;
    case 16: textSize((const QString&)static_QUType_QString.get(_o+1)); break;
    case 17: textColor(); break;
    case 18: textAlign((QAction*)static_QUType_ptr.get(_o+1)); break;
    case 19: fontChanged((const QFont&)*((const QFont*)static_QUType_ptr.get(_o+1))); break;
    case 20: colorChanged((const QColor&)*((const QColor*)static_QUType_ptr.get(_o+1))); break;
    case 21: alignmentChanged((int)static_QUType_int.get(_o+1)); break;
    case 22: editorChanged((QWidget*)static_QUType_ptr.get(_o+1)); break;
    default:
	return QMainWindow::qt_invoke( _id, _o );
    }
    return TRUE;
}
Пример #14
0
void Kandy::setupActions()
{
    KStdAction::open(this, SLOT(fileOpen()), actionCollection());
    KStdAction::save(this, SLOT(fileSave()), actionCollection());
    KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection());
    //  KStdAction::print(this, SLOT(filePrint()), actionCollection());
    KStdAction::quit(this, SLOT(close()), actionCollection());

    createStandardStatusBarAction();
    setStandardToolBarMenuEnabled(true);

    KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection());
    KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection());
    KStdAction::preferences(this, SLOT(optionsPreferences()), actionCollection());

    new KAction(i18n("Mobile GUI"), 0, this, SLOT(showMobileGui()),
                actionCollection(), "show_mobilegui");

    mConnectAction = new KAction(i18n("Connect"), 0, this, SLOT(modemConnect()),
                                 actionCollection(), "modem_connect");
    mDisconnectAction = new KAction(i18n("Disconnect"), 0, this,
                                    SLOT(modemDisconnect()), actionCollection(),
                                    "modem_disconnect");

    createGUI();
}
Пример #15
0
bool Document::fileClose()
{
	if ( isModified() )
	{
		// If the filename is empty then it must  be an untitled file.
		QString name = m_url.fileName().isEmpty() ? caption() : m_url.fileName();
		
		if ( ViewContainer * viewContainer = (activeView() ? activeView()->viewContainer() : 0l) )
			KTechlab::self()->tabWidget()->setCurrentPage( KTechlab::self()->tabWidget()->indexOf(viewContainer) );
		
		KGuiItem saveItem = KStandardGuiItem::yes();
		saveItem.setText( i18n("Save") );
		saveItem.setIconName( "filesave" );
		
		KGuiItem discardItem = KStandardGuiItem::no();
		discardItem.setText( i18n("Discard") );
		
		int choice = KMessageBox::warningYesNoCancel( KTechlab::self(),
				i18n("The document \'%1\' has been modified.\nDo you want to save it?").arg(name),
				i18n("Save Document?"),
				saveItem,
				discardItem );
		
		if ( choice == KMessageBox::Cancel )
			return false;
		if ( choice == KMessageBox::Yes )
			fileSave();
	}
	
	deleteLater();
	return true;
}
Пример #16
0
/** Create an APrivateWindow object
  \param appName The name of the application
  \param orgName The organisation name
  \param domainName The domain of the organisation
  \param version The version of the application
  \param parent The parent of the main window ( usually 0 )
  */
APrivateWindow::APrivateWindow(QIcon icon, QString appName, bool userPluginInterface, bool needsCreateMenu, QString orgName, QString domainName, QString version, QWidget *parent )
        : QMainWindow( parent ), _document( appName, orgName, domainName, version ),
        _plugins( new APrivatePluginDialog( this, userPluginInterface ) ), ui(new Ui::appBase), _log( 0 ),
        _centralDock( 0 ), _currentContextDock( 0 ), _sdk( this )
    {
    // setup global application data
    QCoreApplication::setApplicationName( appName );
    QCoreApplication::setOrganizationName( orgName );
    QCoreApplication::setOrganizationDomain( domainName );
    QCoreApplication::setApplicationVersion( version );

    // icon
    QApplication::setWindowIcon( icon );

    // setup form based UI
    ui->setupUi(this);

    if( !needsCreateMenu )
        {
        delete ui->menuCreate;
        ui->menuCreate = 0;
        }

    // setup the workspace manager
    _workspace = new APrivateWorkspaceDialog( this );

    // we like dock nesting
    setDockNestingEnabled( TRUE );

    // our basic log
    _log = new APrivateLogDock;
    addDockedItem( "Log", _log );

    // setup plugins
    _plugins->ensureLoaded();

    // developing code
#if 0
    QByteArray state( _plugins->saveState() );
    _plugins->restoreState( state );
#endif


    // connect UI to this class
    connect( ui->actionNew, SIGNAL( triggered() ), this, SLOT( fileNew() ) );
    connect( ui->actionOpen, SIGNAL( triggered() ), this, SLOT( fileOpen() ) );
    connect( ui->actionSave, SIGNAL( triggered() ), this, SLOT( fileSave() ) );
    connect( ui->actionSave_As, SIGNAL( triggered() ), this, SLOT( fileSaveAs() ) );
    connect( ui->actionExit, SIGNAL( triggered() ), this, SLOT( close() ) );
    connect( ui->menuFile, SIGNAL( aboutToShow() ), this, SLOT( rebuildFileMenu() ) );
    connect( ui->menuWindow, SIGNAL( aboutToShow() ), this, SLOT( rebuildWindowMenu() ) );
    connect( ui->menuWindow, SIGNAL( triggered( QAction * ) ), this, SLOT( pollWindowMenuStates( QAction * ) ) );
    connect( ui->menuRecent_Files, SIGNAL(triggered(QAction*)), this, SLOT(openRecent(QAction*)) );

    if( ui->menuCreate )
        {
        connect( ui->menuCreate, SIGNAL( triggered( QAction * ) ), this, SLOT( createTriggered( QAction * ) ) );
        connect( ui->menuCreate, SIGNAL( aboutToShow() ), this, SLOT( rebuildCreateMenu() ) );
        }
Пример #17
0
void ABMainWindow::fileSaveAs()
{
    QString fn = QFileDialog::getSaveFileName( QString::null, QString::null, this );
    if ( !fn.isEmpty() ) {
        filename = fn;
        fileSave();
    }
}
Пример #18
0
void LogWindow::connectSignalsAndSlots() {
	connect(openAction, SIGNAL(triggered()), this, SLOT(fileOpen()));
	connect(saveAction, SIGNAL(triggered()), this, SLOT(fileSave()));
	connect(revertAction, SIGNAL(triggered()), this, SLOT(revert()));
	connect(calculatorAction, SIGNAL(triggered()), this, SLOT(runCalculator()));
	connect(calculator, SIGNAL(addOperation(const QString &)), logText, SLOT(append(const QString &)));
	connect(calculator, SIGNAL(resultChanged(double)), this, SLOT(updateResult(double)));
}
Пример #19
0
Status
watcherSave(Wallet &self)
{
    auto data = self.txCache.serialize();
    ABC_CHECK(fileSave(data, self.paths.watcherPath()));

    return Status();
}
bool Notepad_plus::fileSaveAll() {
	if (viewVisible(MAIN_VIEW)) {
		for(int i = 0; i < _mainDocTab.nbItem(); i++) {
			BufferID idToSave = _mainDocTab.getBufferByIndex(i);
			fileSave(idToSave);
		}
	}

	if (viewVisible(SUB_VIEW)) {
		for(int i = 0; i < _subDocTab.nbItem(); i++) {
			BufferID idToSave = _subDocTab.getBufferByIndex(i);
			fileSave(idToSave);
		}
	}
	checkDocState();
	return true;
}
Пример #21
0
QT_BEGIN_NAMESPACE

/*
 *  Constructs a MainWindowBase as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 */
MainWindowBase::MainWindowBase(QWidget* parent, const char* name, Qt::WindowFlags fl)
    : Q3MainWindow(parent, name, fl)
{
    setupUi(this);

    (void)statusBar();

    // signals and slots connections
    connect(fontpathlineedit, SIGNAL(returnPressed()), this, SLOT(addFontpath()));
    connect(PushButton15, SIGNAL(clicked()), this, SLOT(addFontpath()));
    connect(PushButton1, SIGNAL(clicked()), this, SLOT(addSubstitute()));
    connect(PushButton14, SIGNAL(clicked()), this, SLOT(browseFontpath()));
    connect(stylecombo, SIGNAL(activated(int)), this, SLOT(buildFont()));
    connect(psizecombo, SIGNAL(activated(int)), this, SLOT(buildFont()));
    connect(PushButton12, SIGNAL(clicked()), this, SLOT(downFontpath()));
    connect(PushButton3, SIGNAL(clicked()), this, SLOT(downSubstitute()));
    connect(familycombo, SIGNAL(activated(QString)), this, SLOT(familySelected(QString)));
    connect(fileExitAction, SIGNAL(activated()), this, SLOT(fileExit()));
    connect(fileSaveAction, SIGNAL(activated()), this, SLOT(fileSave()));
    connect(helpAboutAction, SIGNAL(activated()), this, SLOT(helpAbout()));
    connect(helpAboutQtAction, SIGNAL(activated()), this, SLOT(helpAboutQt()));
    connect(TabWidget3, SIGNAL(currentChanged(QWidget*)), this, SLOT(pageChanged(QWidget*)));
    connect(paletteCombo, SIGNAL(activated(int)), this, SLOT(paletteSelected(int)));
    connect(PushButton13, SIGNAL(clicked()), this, SLOT(removeFontpath()));
    connect(PushButton4, SIGNAL(clicked()), this, SLOT(removeSubstitute()));
    connect(effectcheckbox, SIGNAL(toggled(bool)), effectbase, SLOT(setEnabled(bool)));
    connect(fontembeddingcheckbox, SIGNAL(toggled(bool)), GroupBox10, SLOT(setEnabled(bool)));
    connect(toolboxeffect, SIGNAL(activated(int)), this, SLOT(somethingModified()));
    connect(dcispin, SIGNAL(valueChanged(int)), this, SLOT(somethingModified()));
    connect(cfispin, SIGNAL(valueChanged(int)), this, SLOT(somethingModified()));
    connect(wslspin, SIGNAL(valueChanged(int)), this, SLOT(somethingModified()));
    connect(menueffect, SIGNAL(activated(int)), this, SLOT(somethingModified()));
    connect(comboeffect, SIGNAL(activated(int)), this, SLOT(somethingModified()));
    connect(audiosinkCombo, SIGNAL(activated(int)), this, SLOT(somethingModified()));
    connect(videomodeCombo, SIGNAL(activated(int)), this, SLOT(somethingModified()));
    connect(tooltipeffect, SIGNAL(activated(int)), this, SLOT(somethingModified()));
    connect(strutwidth, SIGNAL(valueChanged(int)), this, SLOT(somethingModified()));
    connect(strutheight, SIGNAL(valueChanged(int)), this, SLOT(somethingModified()));
    connect(effectcheckbox, SIGNAL(toggled(bool)), this, SLOT(somethingModified()));
    connect(resolvelinks, SIGNAL(toggled(bool)), this, SLOT(somethingModified()));
    connect(fontembeddingcheckbox, SIGNAL(clicked()), this, SLOT(somethingModified()));
    connect(rtlExtensions, SIGNAL(toggled(bool)), this, SLOT(somethingModified()));
    connect(inputStyle, SIGNAL(activated(int)), this, SLOT(somethingModified()));
    connect(inputMethod, SIGNAL(activated(int)), this, SLOT(somethingModified()));
    connect(gstylecombo, SIGNAL(activated(QString)), this, SLOT(styleSelected(QString)));
    connect(familysubcombo, SIGNAL(activated(QString)), this, SLOT(substituteSelected(QString)));
    connect(btnAdvanced, SIGNAL(clicked()), this, SLOT(tunePalette()));
    connect(PushButton11, SIGNAL(clicked()), this, SLOT(upFontpath()));
    connect(PushButton2, SIGNAL(clicked()), this, SLOT(upSubstitute()));
    init();
}
Пример #22
0
VkBool32 VKTS_APIENTRY fileSaveText(const char* filename, const ITextBufferSP& text)
{
    if (!text.get())
    {
        return VK_FALSE;
    }

    return fileSave(filename, text->getString(), text->getLength());
}
Пример #23
0
VkBool32 VKTS_APIENTRY fileSaveBinary(const char* filename, const IBinaryBufferSP& buffer)
{
    if (!buffer.get())
    {
        return VK_FALSE;
    }

    return fileSave(filename, buffer->getData(), buffer->getSize());
}
Пример #24
0
bool TextEdit::fileSaveAs()
{
    QString fn = QFileDialog::getSaveFileName(this, tr("Save as..."),
                                              QString(), tr("HTML-Files (*.htm *.html);;All Files (*)"));
    if (fn.isEmpty())
        return false;
    setCurrentFileName(fn);
    return fileSave();
}
Пример #25
0
void MainWindow::fileSaveAs()
{
	QString fileName = QFileDialog::getSaveFileName(this, tr("Save File"), "", tr("Images (*.png *.bmp *.jpg *.tiff)"));
	if (!fileName.isEmpty())
	{
		currentFileName = fileName;
		fileSave();
	}
}
Пример #26
0
void MainWindow::fileSaveAs()
{
	QString fileName = QFileDialog::getSaveFileName(this, tr("Save File"), "", tr("Kinect Stream (*.knt)"));
	if (!fileName.isEmpty())
	{
		currentFileName = fileName;
		fileSave();
	}
}
Пример #27
0
void MainWindow::dirViewClicked(QModelIndex idx){
    if(NULL != currentFile){
        fileSave();
    }
    QFileSystemModel *model = (QFileSystemModel*) ui->listView->model();

    openFile(model->filePath(idx));

}
Пример #28
0
void MainWindow::fileSaveAs(){
    QString fileName = QFileDialog::getSaveFileName(this,tr("Save File As"));
    if(NULL != fileName ){
        delete currentFile;
        currentFile = new QFile(fileName);
        setWindowFilePath(fileName);
        fileSave();
    }
}
Пример #29
0
bool CryptoPage::fileSaveAs()
{
    QString fn;
    if (misc::getSaveFileName(this, RshareSettings::LASTDIR_CERT, tr("Save as..."), tr("RetroShare Certificate (*.rsc );;All Files (*)"), fn)) {
        setCurrentFileName(fn);
        return fileSave();
    }
    return false;
}
Пример #30
0
void attemptQuit()
{
	if (document.modified())
	{
		UINT res = MessageBox(hwnd, "Save before exit?", mainWindowTitle, MB_YESNOCANCEL | MB_ICONQUESTION);
		if ((IDYES == res && fileSave()) || (IDNO == res))
			DestroyWindow(hwnd);
	}
	else DestroyWindow(hwnd);
}