Exemplo n.º 1
0
void Pdb::DoExplorer()
{
	tab.Set(TAB_EXPLORER);
	expexp.SetFocus();
	expexp.SetSelection();
	Explorer();
}
Exemplo n.º 2
0
void Pdb::Explore(const String& exp)
{
	exprev.Add(~expexp);
	expexp = exp;
	Explorer();
	DoExplorer();
}
Exemplo n.º 3
0
//return 0  or 1 
// -1 no file , 0 complate
int SelectFile (char *folder, char *name)
{
	int size;

	while( 1 ){
		size = ReadFile( folder );
		qsort( files, size, sizeof(Files), filecmp );

		Explorer( size, folder );

		if( index == size ){			//return to root
			if (folder[0] == '\0'){		//根目录下按exit返回上级目录
				index = 0 ;
				free( files );
				return 0 ;
			}
			else{
				folder[0] = '\0';
				index = 0;
			}
		}
		else if( files[index].filesize == -1 ){				//folder
			strcpy( folder,files[index].filename );
			index = 0;
		}
		else{										//file
			strcpy( name,files[index].filename );
			free( files );
			return 1;
		}
	}
}
Exemplo n.º 4
0
void Pdb::ExFw()
{
	if(exnext.GetCount()) {
		exprev.Add(~expexp);
		expexp <<= exnext.Pop();
		Explorer();
	}
}
Exemplo n.º 5
0
void Pdb::Data()
{
	switch(tab.Get()) {
	case TAB_AUTOS: Autos(); break;
	case TAB_LOCALS: Locals(); break;
	case TAB_THIS: This(); break;
	case TAB_WATCHES: Watches(); break;
	case TAB_EXPLORER: Explorer(); break;
	case TAB_MEMORY: memory.Refresh(); break;
	}
}
Exemplo n.º 6
0
/** "Help message" or "About" dialog box */
HelpMessageDialog::HelpMessageDialog(QWidget *parent, bool about) :
    QDialog(parent),
    ui(new Ui::HelpMessageDialog)
{
    ui->setupUi(this);
    this->setWindowModality(Qt::NonModal);
            
    GUIUtil::restoreWindowGeometry("nHelpMessageDialogWindow", this->size(), this);

    QString version = tr("Bitcredit Core") + " " + tr("version") + " " + QString::fromStdString(FormatFullVersion());
    /* On x86 add a bit specifier to the version so that users can distinguish between
     * 32 and 64 bit builds. On other architectures, 32/64 bit may be more ambigious.
     */
#if defined(__x86_64__)
    version += " " + tr("(%1-bit)").arg(64);
#elif defined(__i386__ )
    version += " " + tr("(%1-bit)").arg(32);
#endif

    if (about)
    {
        setWindowTitle(tr("About Bitcredit Core"));

        /// HTML-format the license message from the core
        QString licenseInfo = QString::fromStdString(LicenseInfo());
        QString licenseInfoHTML = licenseInfo;
        // Make URLs clickable
        QRegExp uri("<(.*)>", Qt::CaseSensitive, QRegExp::RegExp2);
        uri.setMinimal(true); // use non-greedy matching
        licenseInfoHTML.replace(uri, "<a href=\"\\1\">\\1</a>");
        // Replace newlines with HTML breaks
        licenseInfoHTML.replace("\n\n", "<br><br>");

        //ui->helpMessage->setTextFormat(Qt::RichText);
        //ui->scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
        text = version + "\n" + licenseInfo;
        ui->helpMessage->setText(version + "<br><br>" + licenseInfoHTML);
        //ui->helpMessage->setWordWrap(true);
        
        connect(ui->pushButtonBCT, SIGNAL(clicked()), this, SLOT(BCT()));
        connect(ui->pushButtonForum, SIGNAL(clicked()), this, SLOT(Forum()));
        connect(ui->pushButtonWiki, SIGNAL(clicked()), this, SLOT(Wiki()));
        connect(ui->pushButtonExplorer, SIGNAL(clicked()), this, SLOT(Explorer()));
       
        
        
        
    } else {
        setWindowTitle(tr("Command-line options"));
        QString header = tr("Usage:") + "\n" +
            "  bitcredit-qt [" + tr("command-line options") + "]                     " + "\n";

        QString coreOptions = QString::fromStdString(HelpMessage(HMM_BITCREDIT_QT));

        QString uiOptions = tr("UI options") + ":\n" +
            "  -choosedatadir            " + tr("Choose data directory on startup (default: 0)") + "\n" +
            "  -lang=<lang>              " + tr("Set language, for example \"de_DE\" (default: system locale)") + "\n" +
            "  -min                      " + tr("Start minimized") + "\n" +
            "  -rootcertificates=<file>  " + tr("Set SSL root certificates for payment request (default: -system-)") + "\n" +
            "  -splash                   " + tr("Show splash screen on startup (default: 1)");

        ui->helpMessage->setFont(GUIUtil::bitcreditAddressFont());
        text = version + "\n" + header + "\n" + coreOptions + "\n" + uiOptions;
        ui->helpMessage->setText(text);
    }
}