Package com.trolltech.qt.gui

Examples of com.trolltech.qt.gui.QMenu


  private void setupFileActions(){
    QToolBar tb = new QToolBar(this);
    tb.setWindowTitle(tr("File Actions"));
    addToolBar(tb);

    QMenu fileMenu = new QMenu(tr("&File"), this);
    menuBar().addMenu(fileMenu);

    action(tr("Open XDL Design"), "open", StandardKey.Open, "openDesign()",fileMenu, tb);   
    action(tr("Load Timing Info"), "openTimingReport", StandardKey.UnknownKey, "loadDesignTimingInfo()",fileMenu, tb);
    fileMenu.addSeparator();
    action(tr("&Quit"), null, "Ctrl+Q", "close()", fileMenu, null);
  }
View Full Code Here


        browser.view.hasPanned = false;

      }
      else{
        reachabilityTile = getTile(event);
        QMenu menu = new QMenu();
        QAction action1 = new QAction("Draw Reachability (1 Hop)", this);
        QAction action2 = new QAction("Draw Reachability (2 Hops)", this);
        QAction action3 = new QAction("Draw Reachability (3 Hops)", this);
        QAction action4 = new QAction("Draw Reachability (4 Hops)", this);
        QAction action5 = new QAction("Draw Reachability (5 Hops)", this);
        QAction actionClear = new QAction("Clear Highlighted Tiles", this);
        action1.triggered.connect(this, "menuReachability1()");
        action2.triggered.connect(this, "menuReachability2()");
        action3.triggered.connect(this, "menuReachability3()");
        action4.triggered.connect(this, "menuReachability4()");
        action5.triggered.connect(this, "menuReachability5()");
        actionClear.triggered.connect(this, "menuReachabilityClear()");
        menu.addAction(action1);
        menu.addAction(action2);
        menu.addAction(action3);
        menu.addAction(action4);
        menu.addAction(action5);
        menu.addAction(actionClear);
        menu.exec(event.screenPos());     
      }
    }
   
   
    super.mouseReleaseEvent(event);
View Full Code Here

  private final QMenu menu;
  QWidget parent;
  QColor currentColor;
 
  public ColorMenu(QWidget b) {
    menu = new QMenu();
    parent = b;
    populateList();
    currentColor = new QColor("black");
  }
View Full Code Here

  QAction toggleTodo;
 


  public EditorButtonBar() {
    contextMenu = new QMenu();
   
    toggleUndoVisible = addAction("undo" ,tr("Undo"));
    toggleRedoVisible = addAction("redo", tr("Redo Change"));
    toggleCutVisible = addAction("cut", tr("Cut"));
    toggleCopyVisible = addAction("copy", tr("Copy"));
View Full Code Here

  }
 
 
  @Override
  public void contextMenuEvent(QContextMenuEvent event) {
    QMenu menu = new QMenu(this);
    menu.addAction(addAction);
    menu.addAction(editAction);
    menu.addAction(deleteAction);
    menu.addSeparator();
    menu.addAction(iconAction);
    menu.exec(event.globalPos());
  }
View Full Code Here

  }

  @Override
  public void contextMenuEvent(QContextMenuEvent event) {
    QMenu menu = new QMenu(this);
    menu.addAction(emptyAction);
    menu.exec(event.globalPos());
  }
View Full Code Here

    return false;
  }
 
  @Override
  public void contextMenuEvent(QContextMenuEvent event) {
    QMenu menu = new QMenu(this);
    menu.addAction(addAction);
    menu.addAction(editAction);
    menu.addAction(deleteAction);
    menu.addAction(mergeAction);
    menu.addSeparator();
    menu.addAction(iconAction);
    menu.exec(event.globalPos());
  }
View Full Code Here

    return names;
  }
 
  @Override
  public void contextMenuEvent(QContextMenuEvent event) {
    QMenu menu = new QMenu(this);
    menu.addAction(addAction);
    menu.addAction(editAction);
    menu.addAction(deleteAction);
    menu.addAction(stackAction);
    menu.addSeparator();
    menu.addAction(publishAction);
    menu.addAction(shareAction);
    menu.addSeparator();
    menu.addAction(iconAction);
    menu.exec(event.globalPos());
  }
View Full Code Here

    super(orientation, parent);
   
    setSortIndicatorShown(true);
    setClickable(true);
   
    contextMenu = new QMenu();

    titleAction = new QAction(this);
    titleAction.setText(tr("Title"));
    titleAction.setCheckable(true);
    contextMenu.addAction(titleAction);
View Full Code Here

   
    trayExitAction.triggered.connect(this, "closeNeverNote()");
    trayAddNoteAction.triggered.connect(this, "addNote()");
    trayShowAction.triggered.connect(this, "trayToggleVisible()");
   
    trayMenu = new QMenu(this);
    trayMenu.addAction(trayAddNoteAction);
    trayMenu.addAction(trayShowAction);
    trayMenu.addAction(trayExitAction);
   
   
View Full Code Here

TOP

Related Classes of com.trolltech.qt.gui.QMenu

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.