Exemplo n.º 1
0
void QgsBrowserDockWidget::showContextMenu( QPoint pt )
{
  QModelIndex index = mProxyModel->mapToSource( mBrowserView->indexAt( pt ) );
  QgsDataItem *item = mModel->dataItem( index );
  if ( !item )
    return;

  QMenu *menu = new QMenu( this );

  if ( item->type() == QgsDataItem::Directory )
  {
    QgsSettings settings;
    QStringList favDirs = settings.value( QStringLiteral( "browser/favourites" ) ).toStringList();
    bool inFavDirs = item->parent() && item->parent()->type() == QgsDataItem::Favorites;

    if ( item->parent() && !inFavDirs )
    {
      // only non-root directories can be added as favorites
      menu->addAction( tr( "Add as a Favorite" ), this, SLOT( addFavorite() ) );
    }
    else if ( inFavDirs )
    {
      // only favorites can be removed
      menu->addAction( tr( "Remove Favorite" ), this, SLOT( removeFavorite() ) );
    }
    menu->addAction( tr( "Properties..." ), this, SLOT( showProperties() ) );
    menu->addAction( tr( "Hide from Browser" ), this, SLOT( hideItem() ) );
    QAction *action = menu->addAction( tr( "Fast Scan this Directory" ), this, SLOT( toggleFastScan() ) );
    action->setCheckable( true );
    action->setChecked( settings.value( QStringLiteral( "qgis/scanItemsFastScanUris" ),
                                        QStringList() ).toStringList().contains( item->path() ) );
  }
  else if ( item->type() == QgsDataItem::Layer )
  {
    menu->addAction( tr( "Add Selected Layer(s)" ), this, SLOT( addSelectedLayers() ) );
    menu->addAction( tr( "Properties..." ), this, SLOT( showProperties() ) );
  }
  else if ( item->type() == QgsDataItem::Favorites )
  {
    menu->addAction( tr( "Add a Directory..." ), this, SLOT( addFavoriteDirectory() ) );
  }

  QList<QAction *> actions = item->actions();
  if ( !actions.isEmpty() )
  {
    if ( !menu->actions().isEmpty() )
      menu->addSeparator();
    // add action to the menu
    menu->addActions( actions );
  }

  if ( menu->actions().isEmpty() )
  {
    delete menu;
    return;
  }

  menu->popup( mBrowserView->mapToGlobal( pt ) );
}
Exemplo n.º 2
0
std::ostream& Sequence::getCout( std::ostream& os ) const
{
	bfs::path dir;
	if( showAbsolutePath() )
	{
		dir = bfs::absolute( _directory );
		dir = boost::regex_replace( dir.string(), boost::regex( "/\\./" ), "/" );
	}
	os << std::left;
	if( showProperties() )
	{
		os << std::setw( PROPERTIES_WIDTH ) << "s ";
	}
	if( showRelativePath() )
	{
		dir = _directory;
		dir = boost::regex_replace( dir.string(), boost::regex( "/\\./" ), "/" );
		os << std::setw( NAME_WIDTH_WITH_DIR ) << _kColorSequence + ( dir / getStandardPattern() ).string() + _kColorStd;
	}
	else
	{
		os << std::setw( NAME_WIDTH ) << _kColorSequence + ( dir / getStandardPattern() ).string() + _kColorStd;
	}

	os << " [" << getFirstTime() << ":" << getLastTime();
	if( getStep() != 1 )
		os << "x" << getStep();
	os << "] " << getNbFiles() << " file" << ( ( getNbFiles() > 1 ) ? "s" : "" );
	if( hasMissingFile() )
	{
		os << ", " << _kColorError << getNbMissingFiles() << " missing file" << ( ( getNbMissingFiles() > 1 ) ? "s" : "" ) << _kColorStd;
	}
	return os;
}
Exemplo n.º 3
0
void StateWidget::slotMenuSelection(int sel) {
    bool done = false;
    bool ok = false;
    QString name = getName();

    switch( sel ) {
    case ListPopupMenu::mt_Rename:
        name = KInputDialog::getText( i18n("Enter State Name"), i18n("Enter the name of the new state:"), getName(), &ok );
        if( ok && name.length() > 0 )
            setName( name );
        done = true;
        break;

    case ListPopupMenu::mt_Properties:
        showProperties();
        done = true;
        break;
    case ListPopupMenu::mt_New_Activity:
        name = KInputDialog::getText( i18n("Enter Activity"), i18n("Enter the name of the new activity:"), i18n("new activity"), &ok );
        if( ok && name.length() > 0 )
            addActivity( name );
        done = true;
        break;
    }

    if( !done )
        UMLWidget::slotMenuSelection( sel );
}
Exemplo n.º 4
0
/**
 * Activates all action buttons.
 */
void FotoLab::activateActions()
{
	connect(ui.actionClose, SIGNAL(triggered()), qApp, SLOT(quit()));
	connect(ui.actionOpen, SIGNAL(triggered()), this, SLOT(openImage()));
	connect(ui.actionReload, SIGNAL(triggered()), this, SLOT(reloadImageData()));
	connect(ui.actionSaveAs, SIGNAL(triggered()), this, SLOT(saveImage()));
	connect(ui.actionAreaColor, SIGNAL(triggered()), this, SLOT(showColorDialog()));

	connect(ui.actionFillArea, SIGNAL(triggered()), ui.graphicsView, SLOT(fillArea()));
	connect(ui.actionCut, SIGNAL(triggered()), this, SLOT(cutArea()));
	connect(ui.actionEdges, SIGNAL(triggered()), this, SLOT(proposeEdges()));
	connect(ui.actionLines, SIGNAL(triggered()), this, SLOT(proposeLines()));

	connect(ui.actionDrawArea, SIGNAL(triggered()), ui.graphicsView, SLOT(switchDrawing()));

	//	connect(ui.actionProcess, SIGNAL(triggered()), ui.graphicsView, SLOT(processErase()));
	connect(ui.actionProcess, SIGNAL(triggered()), ui.graphicsView, SLOT(processShowEdges()));
	connect(ui.actionProperties, SIGNAL(triggered()), this, SLOT(showProperties()));

	connect(ui.actionHelpAbout, SIGNAL(triggered()), this, SLOT(showHelpAbout()));
	//	processShowEdges

	connect(ui.actionZoomIn, SIGNAL(triggered()), ui.graphicsView, SLOT(zoomIn()));
	connect(ui.actionZoomOut, SIGNAL(triggered()), ui.graphicsView, SLOT(zoomOut()));
	connect(ui.actionZoomNormal, SIGNAL(triggered()), ui.graphicsView, SLOT(zoomNormal()));

	connect(ui.actionAboutQt, SIGNAL(triggered()), qApp, SLOT(aboutQt()));

	connect(&tlowSpin, SIGNAL(valueChanged(double)), this, SLOT(validateLowTreshold(double)));
	connect(&thighSpin, SIGNAL(valueChanged(double)), this, SLOT(validateHighTreshold(double)));
}
Exemplo n.º 5
0
void NBCategoryMenu::populateMenu() {

	showAct = new QAction( "Visible", this );
	connect( showAct, SIGNAL( triggered() ), this, SLOT( showCategory() ) );
	addAction( showAct );

	foldAct = new QAction( "Folded", this );
	connect( foldAct, SIGNAL( triggered() ), this, SLOT( foldCategory() ) );
	addAction( foldAct );

	hideAct = new QAction( "Hidden", this );
	connect( hideAct, SIGNAL( triggered() ), this, SLOT( hideCategory() ) );
	addAction( hideAct );

	addSeparator();

	selAct = new QAction( QIcon( ":/icons/select1.png" ), "Select All", this );
	addAction( selAct );
	connect( selAct, SIGNAL( triggered() ), this, SLOT( manageSelection() ) );

	uselAct = new QAction( QIcon(), "Deselect All", this );
	addAction( uselAct );
	connect( uselAct, SIGNAL( triggered() ), this, SLOT( manageSelection() ) );

	addSeparator();

	propAct = new QAction( QIcon( ":/icons/props.png" ), "Properties", this );
	connect( propAct, SIGNAL( triggered() ), this, SLOT( showProperties() ) );
	addAction( propAct );
};
Exemplo n.º 6
0
void MapView::mouseDoubleClickEvent(QMouseEvent *event) {
  int centerblockx = floor(this->x);
  int centerblockz = floor(this->z);

  int centerx = image.width() / 2;
  int centery = image.height() / 2;

  centerx -= (this->x - centerblockx) * zoom;
  centery -= (this->z - centerblockz) * zoom;

  int mx = floor(centerblockx - (centerx - event->x()) / zoom);
  int mz = floor(centerblockz - (centery - event->y()) / zoom);

  // get the y coordinate
  int my = getY(mx, mz);

  QList<QVariant> properties;
  for (auto &item : getItems(mx, my, mz)) {
    properties.append(item->properties());
  }

  if (!properties.isEmpty()) {
    emit showProperties(properties);
  }
}
Exemplo n.º 7
0
KexiImageContextMenu::KexiImageContextMenu(QWidget* parent)
 : KPopupMenu(parent)
 , d( new Private(this) )
{
	setName("KexiImageContextMenu");
	insertTitle(QString::null);

	d->insertFromFileAction = new KAction(i18n("Insert From &File..."), SmallIconSet("fileopen"), 0,
			this, SLOT(insertFromFile()), &d->actionCollection, "insert");
	d->insertFromFileAction->plug(this);
	d->saveAsAction = KStdAction::saveAs(this, SLOT(saveAs()), &d->actionCollection);
//	d->saveAsAction->setText(i18n("&Save &As..."));
	d->saveAsAction->plug(this);
	insertSeparator();
	d->cutAction = KStdAction::cut(this, SLOT(cut()), &d->actionCollection);
	d->cutAction->plug(this);
	d->copyAction = KStdAction::copy(this, SLOT(copy()), &d->actionCollection);
	d->copyAction->plug(this);
	d->pasteAction = KStdAction::paste(this, SLOT(paste()), &d->actionCollection);
	d->pasteAction->plug(this);
	d->deleteAction = new KAction(i18n("&Clear"), SmallIconSet("editdelete"), 0,
		this, SLOT(clear()), &d->actionCollection, "delete");
	d->deleteAction->plug(this);
#ifdef KEXI_NO_UNFINISHED 
	d->propertiesAction = 0;
#else
	insertSeparator();
	d->propertiesAction = new KAction(i18n("Properties"), 0, 0,
		this, SLOT(showProperties()), &d->actionCollection, "properties");
	d->propertiesAction->plug(this);
#endif
	connect(this, SIGNAL(aboutToShow()), this, SLOT(updateActionsAvailability()));
}
Exemplo n.º 8
0
void showItem(CSEM_Item *item, int depth) {
    if(item) {
        int j = 0;
        CSEM_Url *itemidURL = CSEM_Item_GetId(item);
        CSEM_List *types = CSEM_Item_GetTypes(item);
        CSEM_List *refs = CSEM_Item_GetRefs(item);
        CSEM_List *properties = CSEM_Item_GetProperties(item);

        INDENT(depth);puts("ITEM {");
        if(itemidURL) {
            char *itemid = NULL;
            CSEM_URL_Serialize(itemidURL, &itemid);
            INDENT(depth);printf("@itemid=%s\n", itemid);
            free(itemid);
        }
        for(j = 0; types && j < CSEM_List_Size(types); j++) {
            INDENT(depth);printf("@itemtype=%s\n", (char *)CSEM_List_Get(types, j));
        }
        for(j = 0; refs && j < CSEM_List_Size(refs); j++) {
            INDENT(depth);printf("@itemref=%s\n", (char *)CSEM_List_Get(refs, j));
        }
        showProperties(properties, depth);
        INDENT(depth);puts("}");
    }
}
void QgsBrowserDockWidget::showContextMenu( const QPoint & pt )
{
  QModelIndex idx = mBrowserView->indexAt( pt );
  QgsDataItem* item = mModel->dataItem( idx );
  if ( !item )
    return;

  QMenu *menu = new QMenu( this );

  if ( item->type() == QgsDataItem::Directory )
  {
    QSettings settings;
    QStringList favDirs = settings.value( "/browser/favourites" ).toStringList();
    bool inFavDirs = favDirs.contains( item->path() );

    if ( item->parent() != NULL && !inFavDirs )
    {
      // only non-root directories can be added as favourites
      menu->addAction( tr( "Add as a favourite" ), this, SLOT( addFavourite() ) );
    }
    else if ( inFavDirs )
    {
      // only favourites can be removed
      menu->addAction( tr( "Remove favourite" ), this, SLOT( removeFavourite() ) );
    }

  }
  else if ( item->type() == QgsDataItem::Layer )
  {
    menu->addAction( tr( "Add Layer" ), this, SLOT( addCurrentLayer( ) ) );
    menu->addAction( tr( "Add Selected Layers" ), this, SLOT( addSelectedLayers() ) );
    menu->addAction( tr( "Properties" ), this, SLOT( showProperties( ) ) );

  }
  else if ( item->type() == QgsDataItem::Favourites )
  {
    menu->addAction( tr( "Add a directory" ), this, SLOT( addFavouriteDirectory() ) );

  }

  QList<QAction*> actions = item->actions();
  if ( !actions.isEmpty() )
  {
    if ( !menu->actions().isEmpty() )
      menu->addSeparator();
    // add action to the menu
    menu->addActions( actions );
  }

  if ( menu->actions().count() == 0 )
  {
    delete menu;
    return;
  }

  menu->popup( mBrowserView->mapToGlobal( pt ) );
}
Exemplo n.º 10
0
/**
 * @brief ChordTableWidget::ChordTableWidget
 * @param column Nombre de colonnes
 * @param row Nombre de lignes
 * @param parent Parent du widget
 *
 * Initialise la grille d'accords à une taille donnée.
 */
ChordTableWidget::ChordTableWidget(int column, int row, QWidget* parent) : QTableWidget(parent), m_barsize(1), m_savedItem(0)
{
	setEnabled(false);
	setColumnCount(column);
	insertChordRow(0, row);

	setHorizontalHeaderItem(this->columnCount() - 1, new QTableWidgetItem(tr("Annotation")));
	for (int c = 0 ; c < this->columnCount() - 1 ; c ++)
		for (int r = 0 ; r < this->rowCount() ; r ++)
		{
			if(c == 0 && r == 0)
				this->setItem(r, c, new CaseItem(false));
			else
				this->setItem(r, c, new CaseItem());
			this->setColumnWidth(c, 60);
		}
	for (int r = 0 ; r < this->rowCount() ; r ++)
	{
		this->setItem(r, this->columnCount() - 1, new QTableWidgetItem());
		this->setRowHeight(r, 40);
	}
	this->setEnabled(true);

	//menu clic droit
	m_rightClickMenu = new QMenu();

	this->setContextMenuPolicy(Qt::CustomContextMenu);
	connect(this, SIGNAL(customContextMenuRequested(const QPoint&)),
			this, SLOT(ShowContextMenu(const QPoint&)));

	//actions du menu
	m_properties = new QAction(tr("Properties"), this);
	m_playFromHere = new QAction(tr("Play from here"), this);

	connect(m_properties, SIGNAL(triggered()), this, SLOT(showProperties()));
	connect(m_playFromHere, SIGNAL(triggered()), this, SLOT(playFromHere()));

	m_setPartDialog = new PartSetter(this);
	//connect(this, SIGNAL(play(int)), parent, SIGNAL(play(int)));

	// gestion des erreurs de saisie
	connect(this, SIGNAL(itemChanged(QTableWidgetItem*)), this, SLOT(itemChanged_slot(QTableWidgetItem*)));
	connect(this, SIGNAL(currentItemChanged(QTableWidgetItem* , QTableWidgetItem* )), this, SLOT(currentItemChanged_slot(QTableWidgetItem* , QTableWidgetItem* )));

	m_currentItem = (CaseItem*) this->item(0, 0);
	m_lastPlayedCase = 0;
	setCasePart("Intro");
	m_caseItemDelegate = new CaseItemDelegate(this);

	connect(this, SIGNAL(barsizeChanged(int)), m_caseItemDelegate, SLOT(setBarSize(int)));
	connect(this, SIGNAL(barsizeChanged(int)), this, SLOT(setBarSize(int)));

	setItemDelegate(m_caseItemDelegate);

}
Exemplo n.º 11
0
void showId(CSEM_Id *id, int depth) {
    if(id) {
        char *id_value = CSEM_Id_GetId(id);
        CSEM_List *properties = CSEM_Id_GetProperties(id);

        INDENT(depth);puts("ID {");
        if(id_value) {
            INDENT(depth);printf("@id=%s\n", id_value);
        }
        showProperties(properties, depth);
        INDENT(depth);puts("}");
    }
}
Exemplo n.º 12
0
// Catch double-clicks on the list box, and fetch properties for a dn
void LdapView::OnListDoubleClick()
{
	int ind = m_list.GetCurSel();
	if ( ind >= 0 )
	{
		char *dn = (char *)m_list.GetItemDataPtr( ind );
		if ( NULL != dn )
		{
			LDAP *ld = ((LdapApp *)AfxGetApp())->GetConnection();
			if ( NULL != ld )
				showProperties( ld, dn );
		}
	}
}
bool FormWindow::qt_emit( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->signalOffset() ) {
    case 0: showProperties((QObject*)static_QUType_ptr.get(_o+1)); break;
    case 1: updateProperties((QObject*)static_QUType_ptr.get(_o+1)); break;
    case 2: undoRedoChanged((bool)static_QUType_bool.get(_o+1),(bool)static_QUType_bool.get(_o+2),(const QString&)static_QUType_QString.get(_o+3),(const QString&)static_QUType_QString.get(_o+4)); break;
    case 3: selectionChanged(); break;
    case 4: modificationChanged((bool)static_QUType_bool.get(_o+1),(FormWindow*)static_QUType_ptr.get(_o+2)); break;
    case 5: modificationChanged((bool)static_QUType_bool.get(_o+1),(const QString&)static_QUType_QString.get(_o+2)); break;
    case 6: fileNameChanged((const QString&)static_QUType_QString.get(_o+1),(FormWindow*)static_QUType_ptr.get(_o+2)); break;
    default:
	return QWidget::qt_emit(_id,_o);
    }
    return TRUE;
}
Exemplo n.º 14
0
void showItem(CSEM_Item *item, cJSON *json_parent) {
    if(item) {
        CSEM_Url *itemidURL = CSEM_Item_GetId(item);
        int j = 0;
        CSEM_List *types = CSEM_Item_GetTypes(item);
        CSEM_List *refs = CSEM_Item_GetRefs(item);
        CSEM_List *properties = CSEM_Item_GetProperties(item);

        cJSON *json_obj = cJSON_CreateObject();

        if(itemidURL) {
            char *itemid = NULL;
            CSEM_URL_Serialize(itemidURL, &itemid);
            char itemName[256];
            strcpy(itemName, "__ITEM__:");
            strcat(itemName, itemid);
            cJSON_AddItemToObject(json_parent, itemName, json_obj);
            free(itemid);
        } else {
            char blankName[32];
            sprintf(blankName, "__ITEM__:_%d", itemNum++);
            cJSON_AddItemToObject(json_parent, blankName, json_obj);
        }
        if(types) {
            cJSON *json_array = cJSON_CreateArray();
            for(j = 0; types && j < CSEM_List_Size(types); j++) {
                cJSON *json_str = cJSON_CreateString(CSEM_List_Get(types, j));
                cJSON_AddItemToArray(json_array, json_str);
            }
            cJSON_AddItemToObject(json_obj, "__ATTR__:type", json_array);
        }
        if(refs) {
            cJSON *json_array = cJSON_CreateArray();
            for(j = 0; refs && j < CSEM_List_Size(refs); j++) {
                cJSON *json_str = cJSON_CreateString(CSEM_List_Get(refs, j));
                cJSON_AddItemToArray(json_array, json_str);
            }
            cJSON_AddItemToObject(json_obj, "__ATTR__:refs", json_array);
        }
        showProperties(properties, json_obj);
    }
}
Exemplo n.º 15
0
static void showItem(CSEM_Item *item, int depth) {
    if(item) {
        int j = 0;
        CSEM_Url *resourceURL = CSEM_Item_GetId(item);
        CSEM_List *types = CSEM_Item_GetTypes(item);
        CSEM_List *properties = CSEM_Item_GetProperties(item);

        INDENT(depth);puts("ITEM {");
        if(resourceURL) {
            char *resource = NULL;
            CSEM_URL_Serialize(resourceURL, &resource);
            INDENT(depth);printf("@resource=%s\n", resource);
            free(resource);
        }
        for(j = 0; types && j < CSEM_List_Size(types); j++) {
            INDENT(depth);printf("@typeof=%s\n", (char *)CSEM_List_Get(types, j));
        }
        showProperties(properties, depth);
        INDENT(depth);puts("}");
    }
}
Exemplo n.º 16
0
Minutor::Minutor(): maxentitydistance(0) {
  mapview = new MapView;
  connect(mapview, SIGNAL(hoverTextChanged(QString)),
          statusBar(), SLOT(showMessage(QString)));
  connect(mapview, SIGNAL(showProperties(QVariant)),
          this, SLOT(showProperties(QVariant)));
  connect(mapview, SIGNAL(addOverlayItemType(QString, QColor)),
          this, SLOT(addOverlayItemType(QString, QColor)));
  dm = new DefinitionManager(this);
  mapview->attach(dm);
  connect(dm,   SIGNAL(packsChanged()),
          this, SLOT(updateDimensions()));
  dimensions = dm->dimensionIdentifer();
  connect(dimensions, SIGNAL(dimensionChanged(const DimensionInfo &)),
          this, SLOT(viewDimension(const DimensionInfo &)));
  settings = new Settings(this);
  connect(settings, SIGNAL(settingsUpdated()),
          this, SLOT(rescanWorlds()));
  jumpTo = new JumpTo(this);

  if (settings->autoUpdate) {
    // get time of last update
    QSettings settings;
    QDateTime lastUpdateTime = settings.value("packupdate").toDateTime();

    // auto-update only once a week
    if (lastUpdateTime.addDays(7) < QDateTime::currentDateTime())
      dm->autoUpdate();
  }

  createActions();
  createMenus();
  createStatusBar();

  QBoxLayout *mainLayout;
  if (settings->verticalDepth) {
    mainLayout = new QHBoxLayout;
    depth = new LabelledSlider(Qt::Vertical);
    mainLayout->addWidget(mapview, 1);
    mainLayout->addWidget(depth);
  } else {
    mainLayout = new QVBoxLayout;
    depth = new LabelledSlider(Qt::Horizontal);
    mainLayout->addWidget(depth);
    mainLayout->addWidget(mapview, 1);
  }
  depth->setValue(255);
  mainLayout->setSpacing(0);
  mainLayout->setContentsMargins(0, 0, 0, 0);

  connect(depth, SIGNAL(valueChanged(int)),
          mapview, SLOT(setDepth(int)));
  connect(mapview, SIGNAL(demandDepthChange(int)),
          depth, SLOT(changeValue(int)));
  connect(mapview, SIGNAL(demandDepthValue(int)),
          depth, SLOT(setValue(int)));
  connect(this, SIGNAL(worldLoaded(bool)),
          mapview, SLOT(setEnabled(bool)));
  connect(this, SIGNAL(worldLoaded(bool)),
          depth, SLOT(setEnabled(bool)));

  QWidget *central = new QWidget;
  central->setLayout(mainLayout);

  setCentralWidget(central);
  layout()->setContentsMargins(0, 0, 0, 0);

  setWindowTitle(qApp->applicationName());

  propView = new Properties(this);

  emit worldLoaded(false);
}
Exemplo n.º 17
0
void NBFolderView::createAndSetupActions() {

	connect( IconView, SIGNAL( peek( QModelIndex ) ), this, SLOT( doPeek( QModelIndex ) ) );

	connect( IconView, SIGNAL( open( QModelIndex ) ), this, SLOT( doOpen( QModelIndex ) ) );
	connect( IconView, SIGNAL( open( QString ) ), this, SLOT( doOpen( QString ) ) );

	connect( IconView, SIGNAL( contextMenuRequested( QPoint ) ), this, SLOT( showContextMenu( QPoint ) ) );
	connect( IconView, SIGNAL( actionsMenuRequested( QPoint ) ), this, SLOT( showActionsMenu( QPoint ) ) );

	connect(
		IconView->selectionModel(), SIGNAL( selectionChanged( const QItemSelection&, const QItemSelection& ) ),
		this, SIGNAL( selectionChanged( const QItemSelection&, const QItemSelection& ) )
	);

	connect( IconView->selectionModel(), SIGNAL( selectionChanged( const QItemSelection&, const QItemSelection& ) ), this, SLOT( updateActions() ) );

	connect( IconView, SIGNAL( link( QStringList, QString ) ), this, SLOT( link( QStringList, QString ) ) );

	// DragDrop copy
	connect( IconView, SIGNAL( copy( QStringList, QString ) ), this, SLOT( copy( QStringList, QString ) ) );

	// DragDrop move
	connect( IconView, SIGNAL( move( QStringList, QString ) ), this, SLOT( move( QStringList, QString ) ) );

	// Update actions once the directory is loaded
	connect( fsModel, SIGNAL( directoryLoaded( QString ) ), this, SLOT( updateActions() ) );

	// Peek
	peekAct = new QAction( QIcon( ":/icons/peek.png" ), "Pee&k", this );
	peekAct->setShortcuts( Settings->shortcuts( "Peek" ) );

	connect( peekAct, SIGNAL( triggered() ), this, SLOT( doPeek() ) );
	addAction( peekAct );

	// Home Dir
	actHomeDir = new QAction( QIcon( ":/icons/home.png" ), "&Home", this );
	actHomeDir->setShortcuts( Settings->shortcuts( "GoHome" ) );

	connect( actHomeDir, SIGNAL( triggered() ), this, SLOT( loadHomeDir() ) );
	addAction( actHomeDir );

	// Home
	actGoHome = new QAction( QIcon( ":/icons/home.png" ), "&Home", this );
	actGoHome->setShortcut( tr( "Alt+Shift+Home" ) );

	connect( actGoHome, SIGNAL( triggered() ), this, SLOT( doOpenHome() ) );
	addAction( actGoHome );

	// Up
	actParDir = new QAction( QIcon( ":/icons/up.png" ), "&Up", this );
	actParDir->setShortcuts( Settings->shortcuts( "GoUp" ) );

	connect( actParDir, SIGNAL( triggered() ), fsModel, SLOT( goUp() ) );
	addAction( actParDir );

	// Back
	actPrevDir = new QAction( QIcon( ":/icons/prev.png" ), "&Back", this );
	actPrevDir->setShortcuts( Settings->shortcuts( "GoLeft" ) );

	connect( actPrevDir, SIGNAL( triggered() ), fsModel, SLOT( goBack() ) );
	addAction( actPrevDir );

	// Forward
	actNextDir = new QAction( QIcon( ":/icons/next.png" ), "&Forward", this );
	actNextDir->setShortcuts( Settings->shortcuts( "GoRight" ) );

	connect( actNextDir, SIGNAL( triggered() ), fsModel, SLOT( goForward() ) );
	addAction( actNextDir );

	// New Folder
	actNewDir = new QAction( QIcon::fromTheme( "folder-new" ), "New folder", this );
	actNewDir->setShortcuts( Settings->shortcuts( "NewFolder" ) );

	connect( actNewDir, SIGNAL( triggered() ), this, SLOT( newFolder() ) );
	addAction( actNewDir );

	// New file
	actNewFile = new QAction( QIcon::fromTheme( "document-new" ), "New File", this );
	actNewFile->setShortcuts( Settings->shortcuts( "NewFile" ) );

	connect( actNewFile, SIGNAL( triggered() ), this, SLOT( newFile() ) );
	addAction( actNewFile );

	// New file
	actNewEncFS = new QAction( QIcon::fromTheme( "document-new" ), "New Encrypted Directory", this );
	actNewEncFS->setShortcuts( Settings->shortcuts( "NewEncFS" ) );

	connect( actNewEncFS, SIGNAL( triggered() ), this, SLOT( createEncFS() ) );
	addAction( actNewEncFS );

	// Copy
	copyAct = new QAction( QIcon( ":/icons/copy.png" ), "&Copy", this );
	copyAct->setShortcuts( Settings->shortcuts( "Copy" ) );

	connect( copyAct, SIGNAL( triggered() ), this, SLOT( prepareCopy() ) );
	addAction( copyAct );

	// Move
	moveAct = new QAction( QIcon( ":/icons/cut.png" ), "Cu&t", this );
	moveAct->setShortcuts( Settings->shortcuts( "Cut" ) );

	connect( moveAct, SIGNAL( triggered() ), this, SLOT( prepareMove() ) );
	addAction( moveAct );

	// Paste
	pasteAct = new QAction( QIcon( ":/icons/paste.png" ), "&Paste", this );
	pasteAct->setShortcuts( Settings->shortcuts( "Paste" ) );

	connect( pasteAct, SIGNAL( triggered() ), this, SLOT( prepareIO() ) );
	addAction( pasteAct );

	// Rename
	renameAct = new QAction( QIcon( ":/icons/rename.png" ), "&Rename", this );
	renameAct->setShortcuts( Settings->shortcuts( "Rename" ) );

	connect( renameAct, SIGNAL( triggered() ), this, SLOT( doRename() ) );
	addAction( renameAct );

	// Reload
	reloadAct = new QAction( QIcon( ":/icons/reload.png" ), "Re&fresh", this );
	reloadAct->setShortcuts( Settings->shortcuts( "Reload" ) );

	connect( reloadAct, SIGNAL( triggered() ), this, SLOT( doReload() ) );
	addAction( reloadAct );

	// showDotFiles
	showHideDotFiles = new QAction( QIcon( ":/icons/showDotFiles.png" ), "Show &Hidden", this );
	showHideDotFiles->setShortcuts( Settings->shortcuts( "ToggleHidden" ) );

	connect( showHideDotFiles, SIGNAL( triggered() ), this, SLOT( doToggleHidden() ) );
	addAction( showHideDotFiles );

	// Trash
	trashAct = new QAction( QIcon( ":/icons/trash.png" ), "Move to trash", this );
	trashAct->setShortcuts( Settings->shortcuts( "Trash" ) );

	connect( trashAct, SIGNAL( triggered() ), this, SLOT( doSendToTrash() ) );
	addAction( trashAct );

	// Delete
	delAct = new QAction( QIcon( ":/icons/delete.png" ), "Delete", this );
	delAct->setShortcuts( Settings->shortcuts( "Delete" ) );

	connect( delAct, SIGNAL( triggered() ), this, SLOT( doDelete() ) );
	addAction( delAct );

	// Properties
	propertiesAct = new QAction( QIcon( ":/icons/props.png" ), "&Properties", this );
	propertiesAct->setShortcuts( Settings->shortcuts( "Properties" ) );

	connect( propertiesAct, SIGNAL( triggered() ), this, SIGNAL( showProperties() ) );
	addAction( propertiesAct );

	// Permissions
	permissionsAct = new QAction( QIcon::fromTheme( "system-users" ), "P&ermissions", this );
	permissionsAct->setShortcuts( Settings->shortcuts( "Permissions" ) );

	connect( permissionsAct, SIGNAL( triggered() ), this, SIGNAL( showPermissions() ) );
	addAction( permissionsAct );

	// Open a virtual terminal emulator
	openVTE = new QAction( QIcon::fromTheme( "utilities-terminal" ), "Open &VTE", this );
	openVTE->setShortcuts( Settings->shortcuts( "Terminal" ) );

	connect( openVTE, SIGNAL( triggered() ), this, SLOT( openTerminal() ) );
	addAction( openVTE );

	// Open a virtual terminal emulator
	openVTEin = new QAction( QIcon::fromTheme( "utilities-terminal" ), "Open &VTE Here", this );
	// openVTEin->setShortcuts( Settings->shortcuts( "Terminal" ) );
	connect( openVTEin, SIGNAL( triggered() ), this, SLOT( openTerminalIn() ) );

	// Select All
	QAction *selectAllAct = new QAction( "&Select All", this );
	selectAllAct->setShortcuts( Settings->shortcuts( "SelectAll" ) );

	connect( selectAllAct, SIGNAL( triggered() ), this, SLOT( selectAll() ) );
	addAction( selectAllAct );

	// Sorting
	sortByNameAct = new QAction( QIcon::fromTheme( "format-text-underline" ), "&Name", this );
	sortByNameAct->setCheckable( true );
	connect( sortByNameAct, SIGNAL( triggered() ), this, SLOT( sortByName() ) );

	sortByTypeAct = new QAction( QIcon::fromTheme( "preferences-other" ), "&Type", this );
	sortByTypeAct->setCheckable( true );
	connect( sortByTypeAct, SIGNAL( triggered() ), this, SLOT( sortByType() ) );

	sortBySizeAct = new QAction( QIcon( ":/icons/size.png" ), "&Size", this );
	sortBySizeAct->setCheckable( true );
	connect( sortBySizeAct, SIGNAL( triggered() ), this, SLOT( sortBySize() ) );

	sortByDateAct = new QAction( QIcon::fromTheme( "office-calendar" ), "&Date", this );
	sortByDateAct->setCheckable( true );
	connect( sortByDateAct, SIGNAL( triggered() ), this, SLOT( sortByDate() ) );

	QActionGroup *sortGroup = new QActionGroup( this );
	sortGroup->addAction( sortByNameAct );
	sortGroup->addAction( sortByTypeAct );
	sortGroup->addAction( sortBySizeAct );
	sortGroup->addAction( sortByDateAct );

	switch( ( int )Settings->value( "SortColumn" ) ) {
		case 0: {
			sortByNameAct->setChecked( true );
			break;
		}
		case 1: {
			sortBySizeAct->setChecked( true );
			break;
		}
		case 2: {
			sortByTypeAct->setChecked( true );
			break;
		}
		case 4: {
			sortByDateAct->setChecked( true );
			break;
		}
	}

	groupsAct = new QAction( QIcon::fromTheme( "view-group", QIcon( ":/icons/groups.png" ) ), "Show in &Groups", this );
	groupsAct->setCheckable( true );
	groupsAct->setChecked( Settings->value( "Grouping" ) );
	connect( groupsAct, SIGNAL( triggered() ), this, SIGNAL( toggleGroups() ) );

	// Add bookmark
	addBookMarkAct = new QAction( QIcon( ":/icons/bookmark.png" ), "Add &Bookmark", this );
	addBookMarkAct->setShortcuts( Settings->shortcuts( "AddBookmark" ) );

	connect( addBookMarkAct, SIGNAL( triggered() ), this, SLOT( addBookMark() ) );
	addAction( addBookMarkAct );

	/* Add to SuperStart */
	addToSuperStartAct = new QAction( QIcon( ":/icons/superstart.png" ), "Add to S&uperStart", this );
	addToSuperStartAct->setShortcut( tr( "Ctrl+U" ) );

	connect( addToSuperStartAct, SIGNAL( triggered() ), this, SLOT( addToSuperStart() ) );
	addAction( addToSuperStartAct );

	updateActions();
};
bool MainWindow::qt_invoke( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0:
        showProperties((QObject*)static_QUType_ptr.get(_o+1));
        break;
    case 1:
        updateProperties((QObject*)static_QUType_ptr.get(_o+1));
        break;
    case 2:
        showDialogHelp();
        break;
    case 3:
        showDebugStep((QObject*)static_QUType_ptr.get(_o+1),(int)static_QUType_int.get(_o+2));
        break;
    case 4:
        showStackFrame((QObject*)static_QUType_ptr.get(_o+1),(int)static_QUType_int.get(_o+2));
        break;
    case 5:
        showErrorMessage((QObject*)static_QUType_ptr.get(_o+1),(int)static_QUType_int.get(_o+2),(const QString&)static_QUType_QString.get(_o+3));
        break;
    case 6:
        finishedRun();
        break;
    case 7:
        breakPointsChanged();
        break;
    case 8:
        fileNew();
        break;
    case 9:
        fileNewDialog();
        break;
    case 10:
        fileNewFile();
        break;
    case 11:
        fileClose();
        break;
    case 12:
        fileQuit();
        break;
    case 13:
        fileCloseProject();
        break;
    case 14:
        fileOpen();
        break;
    case 15:
        fileOpen((const QString&)static_QUType_QString.get(_o+1),(const QString&)static_QUType_QString.get(_o+2));
        break;
    case 16:
        fileOpen((const QString&)static_QUType_QString.get(_o+1),(const QString&)static_QUType_QString.get(_o+2),(const QString&)static_QUType_QString.get(_o+3));
        break;
    case 17:
        fileOpen((const QString&)static_QUType_QString.get(_o+1),(const QString&)static_QUType_QString.get(_o+2),(const QString&)static_QUType_QString.get(_o+3),(bool)static_QUType_bool.get(_o+4));
        break;
    case 18:
        static_QUType_bool.set(_o,fileSave());
        break;
    case 19:
        static_QUType_bool.set(_o,fileSaveForm());
        break;
    case 20:
        static_QUType_bool.set(_o,fileSaveProject());
        break;
    case 21:
        static_QUType_bool.set(_o,fileSaveAs());
        break;
    case 22:
        fileSaveAll();
        break;
    case 23:
        fileCreateTemplate();
        break;
    case 24:
        editUndo();
        break;
    case 25:
        editRedo();
        break;
    case 26:
        editCut();
        break;
    case 27:
        editCopy();
        break;
    case 28:
        editPaste();
        break;
    case 29:
        editDelete();
        break;
    case 30:
        editSelectAll();
        break;
    case 31:
        editLower();
        break;
    case 32:
        editRaise();
        break;
    case 33:
        editAdjustSize();
        break;
    case 34:
        editLayoutHorizontal();
        break;
    case 35:
        editLayoutVertical();
        break;
    case 36:
        editLayoutHorizontalSplit();
        break;
    case 37:
        editLayoutVerticalSplit();
        break;
    case 38:
        editLayoutGrid();
        break;
    case 39:
        editLayoutContainerHorizontal();
        break;
    case 40:
        editLayoutContainerVertical();
        break;
    case 41:
        editLayoutContainerGrid();
        break;
    case 42:
        editBreakLayout();
        break;
    case 43:
        editAccels();
        break;
    case 44:
        editFunctions();
        break;
    case 45:
        editConnections();
        break;
    case 46:
        static_QUType_ptr.set(_o,editSource());
        break;
    case 47:
        static_QUType_ptr.set(_o,editSource((SourceFile*)static_QUType_ptr.get(_o+1)));
        break;
    case 48:
        static_QUType_ptr.set(_o,openSourceEditor());
        break;
    case 49:
        static_QUType_ptr.set(_o,createSourceEditor((QObject*)static_QUType_ptr.get(_o+1),(Project*)static_QUType_ptr.get(_o+2)));
        break;
    case 50:
        static_QUType_ptr.set(_o,createSourceEditor((QObject*)static_QUType_ptr.get(_o+1),(Project*)static_QUType_ptr.get(_o+2),(const QString&)static_QUType_QString.get(_o+3)));
        break;
    case 51:
        static_QUType_ptr.set(_o,createSourceEditor((QObject*)static_QUType_ptr.get(_o+1),(Project*)static_QUType_ptr.get(_o+2),(const QString&)static_QUType_QString.get(_o+3),(const QString&)static_QUType_QString.get(_o+4)));
        break;
    case 52:
        static_QUType_ptr.set(_o,createSourceEditor((QObject*)static_QUType_ptr.get(_o+1),(Project*)static_QUType_ptr.get(_o+2),(const QString&)static_QUType_QString.get(_o+3),(const QString&)static_QUType_QString.get(_o+4),(bool)static_QUType_bool.get(_o+5)));
        break;
    case 53:
        editFormSettings();
        break;
    case 54:
        editProjectSettings();
        break;
    case 55:
        editPixmapCollection();
        break;
    case 56:
        editDatabaseConnections();
        break;
    case 57:
        editPreferences();
        break;
    case 58:
        projectInsertFile();
        break;
    case 59:
        searchFind();
        break;
    case 60:
        searchIncremetalFindMenu();
        break;
    case 61:
        searchIncremetalFind();
        break;
    case 62:
        searchIncremetalFindNext();
        break;
    case 63:
        searchReplace();
        break;
    case 64:
        searchGotoLine();
        break;
    case 65:
        previewForm();
        break;
    case 66:
        previewForm((const QString&)static_QUType_QString.get(_o+1));
        break;
    case 67:
        toolsCustomWidget();
        break;
    case 68:
        toolsConfigure();
        break;
    case 69:
        helpContents();
        break;
    case 70:
        helpManual();
        break;
    case 71:
        helpAbout();
        break;
    case 72:
        helpAboutQt();
        break;
    case 73:
        helpRegister();
        break;
    case 74:
        activeWindowChanged((QWidget*)static_QUType_ptr.get(_o+1));
        break;
    case 75:
        updateUndoRedo((bool)static_QUType_bool.get(_o+1),(bool)static_QUType_bool.get(_o+2),(const QString&)static_QUType_QString.get(_o+3),(const QString&)static_QUType_QString.get(_o+4));
        break;
    case 76:
        updateEditorUndoRedo();
        break;
    case 77:
        toolSelected((QAction*)static_QUType_ptr.get(_o+1));
        break;
    case 78:
        clipboardChanged();
        break;
    case 79:
        selectionChanged();
        break;
    case 80:
        windowsMenuActivated((int)static_QUType_int.get(_o+1));
        break;
    case 81:
        setupWindowActions();
        break;
    case 82:
        createNewTemplate();
        break;
    case 83:
        projectSelected((QAction*)static_QUType_ptr.get(_o+1));
        break;
    case 84:
        setupRecentlyFilesMenu();
        break;
    case 85:
        setupRecentlyProjectsMenu();
        break;
    case 86:
        recentlyFilesMenuActivated((int)static_QUType_int.get(_o+1));
        break;
    case 87:
        recentlyProjectsMenuActivated((int)static_QUType_int.get(_o+1));
        break;
    case 88:
        emitProjectSignals();
        break;
    case 89:
        showStartDialog();
        break;
    case 90:
        doFunctionsChanged();
        break;
    case 91:
        static_QUType_bool.set(_o,openProjectSettings((Project*)static_QUType_ptr.get(_o+1)));
        break;
    default:
        return QMainWindow::qt_invoke( _id, _o );
    }
    return TRUE;
}
void MainWindow::updateTreeModel()
{
    mTreeModel = new ProjectTreeModel();
    ui->treeView->setModel(mTreeModel);
    connect(ui->treeView->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(showProperties(QModelIndex)));
    ui->treeView->expandAll();
}