Example #1
0
	void Account::handleFileList (const QList<DBoxItem>& items)
	{
		QList<StorageItem> result;

		for (const auto& item : items)
			result << CreateItem (item);

		emit gotListing (result);
		emit listingUpdated (result.value (0).ParentID_);
	}
Example #2
0
	void Account::handleFileList (const QList<DriveItem>& items)
	{
		QList<StorageItem> result;

		for (const auto& item : items)
			result << CreateItem (item);

		emit gotListing (result);
		emit listingUpdated (QByteArray ());
	}
Example #3
0
MEDUSA_NAMESPACE_USE

MainWindow::MainWindow()
  : QMainWindow(), Ui::MainWindow()
  , _about(this)
  , _openConfirmation(this)
  , _loaderChooser(this, this->_medusa)
  , _goto(this)
  , _settingsDialog(this)
  , _undoJumpView()
  , _documentOpened(false)
  , _fileName()
  , _closeWindow(false)
  , _openDocument(false)
  , _medusa()
  , _selectedLoader()
  , _disasmView(this)
{
  this->setupUi(this);

  medusa::Log::SetLog(boost::bind(&MainWindow::appendLog, this, _1));

  setCentralWidget(&_disasmView);

  connect(this->dataList,     SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(_on_label_clicked(QListWidgetItem *)));
  connect(this->codeList,     SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(_on_label_clicked(QListWidgetItem *)));
  connect(this->stringList,   SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(_on_label_clicked(QListWidgetItem *)));
  connect(this->importedList, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(_on_label_clicked(QListWidgetItem *)));
  connect(this->exportedList, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(_on_label_clicked(QListWidgetItem *)));

  connect(this, SIGNAL(logAppended(QString const &)), this, SLOT(onLogMessageAppended(QString const &)));

  connect(this, SIGNAL(disassemblyListingUpdated()), &_disasmView, SLOT(listingUpdated()));
  connect(&Settings::instance(), SIGNAL(settingsChanged()), &_disasmView, SLOT(setFont()));

  qRegisterMetaType<medusa::Label>("medusa::Label");
  connect(this, SIGNAL(labelAdded(medusa::Label const&)), this, SLOT(onLabelAdded(medusa::Label const&)));
  connect(this, SIGNAL(labelRemoved(medusa::Label const&)), this, SLOT(onLabelRemoved(medusa::Label const&)));

  this->restoreGeometry(Settings::instance().value(WINDOW_GEOMETRY, WINDOW_GEOMETRY_DEFAULT).toByteArray());
  this->restoreState(Settings::instance().value(WINDOW_LAYOUT, WINDOW_LAYOUT_DEFAULT).toByteArray());
}
Example #4
0
	void Account::handleGotNewItem (const DBoxItem& item)
	{
		const auto& storageItem = CreateItem (item);
		emit gotNewItem (storageItem, storageItem.ParentID_);
		emit listingUpdated (storageItem.ParentID_);
	}
Example #5
0
	void Account::handleGotNewItem (const DriveItem& item)
	{
		emit gotNewItem (CreateItem (item), item.ParentId_.toUtf8 ());
		emit listingUpdated (item.ParentIsRoot_ ? QByteArray () : item.ParentId_.toUtf8 ());
	}