Ejemplo n.º 1
0
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    QCoreApplication::setOrganizationName("Fudeco Oy");
    QCoreApplication::setOrganizationDomain("fudeco.com");
    QCoreApplication::setApplicationName("Speed Freak");

    helpDialog = NULL;
    accstart = NULL;
    routeSaveDialog = NULL;
    topResultDialog = NULL;

    settingsDialog = new SettingsDialog;
    connect(settingsDialog, SIGNAL(sendregistration()), this, SLOT(clientRegUserToServer()));
    connect(settingsDialog, SIGNAL(userNameChanged()),  this, SLOT(clientUserLogin()));
    connect(settingsDialog, SIGNAL(logout()),           this, SLOT(setUsernameToMainPanel()));
    connect(settingsDialog, SIGNAL(saveprofile()),      this, SLOT(saveProfile()));

    httpClient = new HttpClient(this);
    connect(httpClient->myXmlreader, SIGNAL(receivedCategoryList()), this, SLOT(setCategoryCompoBox()));
    connect(httpClient->myXmlreader, SIGNAL(receivedTop10List()), this, SLOT(showTop10()));    

    welcomeDialog = new WelcomeDialog;
    welcomeDialog->show();

    this->setUsernameToMainPanel();

    //Create icon for acceleration start button
    QIcon* icon = new QIcon();
    icon->addFile(QString(":/new/prefix1/Graphics/Speedometer.png"), QSize(125,125), QIcon::Normal, QIcon::Off);
    icon->addFile(QString(":/new/prefix1/Graphics/Speedometer2.png"), QSize(125,125), QIcon::Normal, QIcon::On);

    //Acceleration start button

    customButtonAccelerate = new CustomButton(this,icon);
    delete icon;

    int buttons_x = 50,buttons_y = 165;
    customButtonAccelerate->setGeometry(buttons_x,buttons_y,130,130);
    connect(customButtonAccelerate, SIGNAL(OpenDialog()), this, SLOT(OpenAccStartDialog()));
    customButtonAccelerate->show();

    //Create icon for route dialog button
    icon = new QIcon();
    icon->addFile(QString(":/new/prefix1/Graphics/route.png"), QSize(125,125), QIcon::Normal, QIcon::Off);
    icon->addFile(QString(":/new/prefix1/Graphics/route_selected.png"), QSize(125,125), QIcon::Normal, QIcon::On);

    //Route dialog button

    customButtonRoute = new CustomButton(this,icon);
    delete icon;

    buttons_x += 140;
    customButtonRoute->setGeometry(buttons_x,buttons_y,130,130);
    connect(customButtonRoute, SIGNAL(OpenDialog()), this, SLOT(OpenRouteDialog()));
    customButtonRoute->show();

    //Create icon for results dialog button
    icon = new QIcon();
    icon->addFile(QString(":/new/prefix1/Graphics/trophy_gold.png"), QSize(125,125), QIcon::Normal, QIcon::Off);
    icon->addFile(QString(":/new/prefix1/Graphics/trophy_gold_selected.png"), QSize(125,125), QIcon::Normal, QIcon::On);

    //Results dialog button

    customButtonResults = new CustomButton(this,icon);
    delete icon;

    buttons_x += 140;
    customButtonResults->setGeometry(buttons_x,buttons_y,130,130);
    connect(customButtonResults, SIGNAL(OpenDialog()), this, SLOT(OpenResultDialog()));
    customButtonResults->show();
    //Create icon for settings dialog button
    icon = new QIcon();
    icon->addFile(QString(":/new/prefix1/Graphics/settings.png"), QSize(125,125), QIcon::Normal, QIcon::Off);
    icon->addFile(QString(":/new/prefix1/Graphics/settings_selected.png"), QSize(125,125), QIcon::Normal, QIcon::On);

    //Settings dialog button

    customButtonSettings = new CustomButton(this,icon);
    delete icon;

    buttons_x += 140;
    customButtonSettings->setGeometry(buttons_x,buttons_y,130,130);
    connect(customButtonSettings, SIGNAL(OpenDialog()), this, SLOT(OpenSettingsDialog()));
    customButtonSettings->show();

    //Create icon for www page button
    icon = new QIcon();
    icon->addFile(QString(":/new/prefix1/Graphics/applications_internet.png"), QSize(125,125), QIcon::Normal, QIcon::Off);
    icon->addFile(QString(":/new/prefix1/Graphics/applications_internet_selected.png"), QSize(125,125), QIcon::Normal, QIcon::On);

    //WWW page button

    customButtonWWW = new CustomButton(this,icon);
    delete icon;

    buttons_x += 140;
    customButtonWWW->setGeometry(buttons_x,buttons_y,130,130);
    connect(customButtonWWW, SIGNAL(OpenDialog()), this, SLOT(OpenWWWPage()));
    customButtonWWW->show();

    //Create icon for help dialog button
    icon = new QIcon();
    icon->addFile(QString(":/new/prefix1/Graphics/info.png"), QSize(105,105), QIcon::Normal, QIcon::Off);
    icon->addFile(QString(":/new/prefix1/Graphics/info_selected.png"), QSize(105,105), QIcon::Normal, QIcon::On);

    //Help dialog button

    customButtonHelp = new CustomButton(this,icon);
    delete icon;

    customButtonHelp->setGeometry(670,10,105,105);
    connect(customButtonHelp, SIGNAL(OpenDialog()), this, SLOT(OpenHelpDialog()));
    customButtonHelp->show();
}
Ejemplo n.º 2
0
LRESULT OnSettingsDialog( HWND hWnd, WPARAM wParam, LPARAM lParam, LPCLASSDATA lpcd )
{
	return OpenSettingsDialog( hWnd );
}
Ejemplo n.º 3
0
	void ViewSettingsManager::ShowSettings ()
	{
		OpenSettingsDialog (XSD_.get (), tr ("SB2 panel settings"));
	}
Ejemplo n.º 4
0
  bool cMainWindow::OnCommand(int idCommand)
  {
    switch (idCommand) {
      case ID_MENU_FILE_OPEN_FOLDER: {
        win32mm::cFolderDialog dialog;
        dialog.Run(*this);
        return true;
      }
      case ID_MENU_FILE_IMPORT_FOLDER: {
        if (OpenImportDialog(settings, *this)) {
          // Run the import process
          win32mm::cProgressDialog dialog(*this, taskBar);

          cImportProcess process(dialog);
          process.SetFromFolder(settings.GetLastImportFromFolder());
          process.SetToFolder(settings.GetLastImportToFolder());
          process.SetSeparateFolderForEachYear(settings.IsImportSeparateFolderForEachYear());
          process.SetSeparateFolderForEachDate(settings.IsImportSeparateFolderForEachDate());
          process.SetDescription(settings.IsImportDescription());
          process.SetDescriptionText(settings.GetImportDescriptionText());
          process.SetDeleteFromSourceFolderOnSuccessfulImport(settings.IsAfterImportDeleteFromSourceFolderOnSuccessfulImport());

          /*spitfire::util::PROCESS_RESULT result =*/ dialog.Run(process);
        }
        return true;
      }
      case ID_MENU_FILE_SETTINGS: {
        OpenSettingsDialog(settings, *this);
        return true;
      }
      case ID_MENU_FILE_QUIT: {
        // Set our quit flag
        bShouldQuit = true;

        CloseSoon();
        return true;
      }
      case ID_MENU_VIEW_SINGLE_PHOTO_MODE: {
        //bIsSinglePhotoMode = !bIsSinglePhotoMode;

        // TODO: UPDATE THE MENU ITEM CHECKBOX
        return true;
      }
      case ID_MENU_HELP_ABOUT: {
        win32mm::OpenAboutDialog(*this);
        return false;
      }
      case ID_CONTROL_PATH: {
        LOG<<"cMainWindow::HandleCommand Path \""<<comboBoxPath.GetText()<<"\""<<std::endl;
        photoBrowserViewController.SetCurrentFolderPath(comboBoxPath.GetText());
        return true;
      }
      case ID_CONTROL_UP: {
        LOG<<"cMainWindow::HandleCommand Up"<<std::endl;
        // Get the current path
        const string_t sFolderPath = comboBoxPath.GetText();

        // Get the parent folder and check that it is valid
        const string_t sParentFolderPath = spitfire::filesystem::StripLastDirectory(sFolderPath);
        if (spitfire::filesystem::DirectoryExists(sParentFolderPath)) {
          // Change the current path
          photoBrowserViewController.SetCurrentFolderPath(sParentFolderPath);

          // Update the combobox text
          comboBoxPath.SetText(sParentFolderPath);
        }
        return true;
      }
      case ID_CONTROL_SHOW_FOLDER: {
        LOG<<"cMainWindow::HandleCommand Show folder"<<std::endl;
        if (spitfire::filesystem::DirectoryExists(comboBoxPath.GetText())) spitfire::operatingsystem::ShowFolder(comboBoxPath.GetText());
        return true;
      }
      case 101: {
        photoBrowserViewController.OnScrollBarScrolled(float(scrollBar.GetPosition()));
        photoBrowserView.Update();
        break;
      }
    }

    return false;
  }
Ejemplo n.º 5
0
void MenuEntryCallback(CBTYPE Type, PLUG_CB_MENUENTRY *Info)
{
	switch (Info->hEntry)
	{
	case PLUGIN_MENU_LOADSIG:
		OpenSelectionDialog("Open an IDA signature file", "Signatures (*.sig)\0*.sig\0\0", false, ApplySignatureSymbols);
		break;

	case PLUGIN_MENU_LOADDIF:
		OpenSelectionDialog("Open an IDA DIF file", "Diff files (*.dif)\0*.dif\0\0", false, ApplyDiffSymbols);
		break;

	case PLUGIN_MENU_LOADMAP:
		OpenSelectionDialog("Open a linker map file", "Map files (*.map)\0*.map\0\0", false, ApplyMapSymbols);
		break;

	case PLUGIN_MENU_LOADPEID:
		OpenSelectionDialog("Open a PEiD database", "Any file (*.*)\0*.*\0\0", false, ApplyPEiDSymbols);
		break;

	case PLUGIN_MENU_EXPORTDIF:
		OpenSelectionDialog("Save a DIF file", "Diff files (*.dif)\0*.dif\0\0", true, ExportDiffSymbols);
		break;

	case PLUGIN_MENU_EXPORTMAP:
		OpenSelectionDialog("Save a MAP file", "Map files (*.map)\0*.map\0\0", true, ExportMapSymbols);
		break;

	case PLUGIN_MENU_FINDCRYPTO:
		FindcryptScanModule();
		break;

	case PLUGIN_MENU_AESFINDER:
		AESFinderScanModule();
		break;

	case PLUGIN_MENU_MAKESIG:
		OpenSigMakeDialog();
		break;

	case PLUGIN_MENU_SETTINGS:
		OpenSettingsDialog();
		break;

	case PLUGIN_MENU_ABOUT:
		MessageBoxA(GuiGetWindowHandle(),
			"Plugin created by Nukem.\n\n"
			"Source code at:\n"
			"https://github.com/Nukem9/SwissArmyKnife"
			"\n\nFindcrypt2-with-MMX:\n"
			"https://github.com/vlad902/findcrypt2-with-mmx"
			"\n\nAES-Finder:\n"
			"https://github.com/mmozeiko/aes-finder"
			"\n\nZLIB:\n"
			"http://www.zlib.net/"
			, "About", 0);
		break;
	}

	//
	// Update GUI
	//
	GuiUpdateAllViews();
}