• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ setupActions函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中setupActions函数的典型用法代码示例。如果您正苦于以下问题:C++ setupActions函数的具体用法?C++ setupActions怎么用?C++ setupActions使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了setupActions函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: QSplitter

KateViewManager::KateViewManager (QWidget *parentW, KateMainWindow *parent)
    : QSplitter  (parentW)
    , m_mainWindow(parent)
    , m_blockViewCreationAndActivation (false)
    , m_activeViewRunning (false)
{
  // while init
  m_init = true;

  // important, set them up, as we use them in other methodes
  setupActions ();

  guiMergedView = 0;

  // resize mode
  setOpaqueResize( KGlobalSettings::opaqueResize() );

  KateViewSpace* vs = new KateViewSpace( this, 0 );
  addWidget (vs);

  vs->setActive( true );
  m_viewSpaceList.append(vs);

  connect( this, SIGNAL(viewChanged()), this, SLOT(slotViewChanged()) );
  connect(KateDocManager::self(), SIGNAL(initialDocumentReplaced()), this, SIGNAL(viewChanged()));

  connect(KateDocManager::self(), SIGNAL(documentCreated(KTextEditor::Document *)), this, SLOT(documentCreated(KTextEditor::Document *)));
  connect(KateDocManager::self(), SIGNAL(documentDeleted(KTextEditor::Document *)), this, SLOT(documentDeleted(KTextEditor::Document *)));

  // init done
  m_init = false;
}
开发者ID:rtaycher,项目名称:kate,代码行数:32,代码来源:kateviewmanager.cpp


示例2: QMainWindow

TimerWindow::TimerWindow(QWidget *parent) : QMainWindow(parent) {
    qDebug("TimerWindow::TimerWindow");

    setAllowClose( false );

    setupUi(this);

    libkiIcon = QIcon(":images/libki_clock.png");

    this->setWindowIcon(libkiIcon);

    setFixedSize(width(), height()); // Prevent the window from being resized
    setWindowFlags( (windowFlags() | Qt::CustomizeWindowHint) & ~Qt::WindowMaximizeButtonHint); // Remove the maximize window button
    setWindowFlags( (windowFlags() | Qt::CustomizeWindowHint) & ~Qt::WindowSystemMenuHint); // Remove the close window button

    setupActions();
    setupTrayIcon();

    trayIconPopupTimer = new QTimer(this);
    connect(trayIconPopupTimer, SIGNAL(timeout()), this, SLOT(showSystemTrayIconTimeLeftMessage()) );


    // Disable unused features
    pauseButton->hide();

    this->move(QApplication::desktop()->screen()->rect().center()-this->rect().center());

    this->hide();
}
开发者ID:Libki,项目名称:libki-client,代码行数:29,代码来源:timerwindow.cpp


示例3: QTreeWidget

akuTreeWidget::akuTreeWidget(QWidget *parent) : QTreeWidget(parent)
{
  setDragEnabled(false);
  setDragDropOverwriteMode(false);
  setDragDropMode(QAbstractItemView::NoDragDrop);
  setAlternatingRowColors(true);
  setSelectionMode(QAbstractItemView::ExtendedSelection);
  setAutoExpandDelay(-1);
  setRootIsDecorated(true);
  setUniformRowHeights(false);
  setSortingEnabled(true);
  setAnimated(true);
  setAllColumnsShowFocus(true);
  headerItem()->setText(0, i18n("File Name", 0));
  headerItem()->setText(1, i18n("Size", 0));
  headerItem()->setText(2, i18n("Packed Size", 0));
  headerItem()->setText(3, i18n("Ratio", 0));
  headerItem()->setText(4, i18n("Modified", 0));
  headerItem()->setText(5, i18n("Attributes", 0));
  headerItem()->setText(6, i18n("CRC", 0));
  headerItem()->setText(7, i18n("Method", 0));
  headerItem()->setText(8, i18n("Version", 0));
  headerItem()->setText(9, i18n("MIME Type", 0));
  headerItem()->setText(10,"");
  headerItem()->setIcon(10,KIcon("document-properties"));
  headerItem()->setToolTip(10, i18n("Status: a key is shown if the file is crypted"));
  header() -> moveSection(10,0);
  header() -> setResizeMode(10,QHeaderView::ResizeToContents);
  header() -> setResizeMode(4,QHeaderView::ResizeToContents);
  setupActions();
}
开发者ID:alediaferia,项目名称:aku,代码行数:31,代码来源:akutreewidget.cpp


示例4: Plugin

 SyndicationPlugin::SyndicationPlugin(QObject* parent, const QStringList& args): Plugin(parent), add_feed(0)
 {
     Q_UNUSED(args);
     setupActions();
     //  setXMLFile("ktsyndicationpluginui.rc");
     LogSystemManager::instance().registerSystem(i18n("Syndication"), SYS_SYN);
 }
开发者ID:dreamsxin,项目名称:ktorrent,代码行数:7,代码来源:syndicationplugin.cpp


示例5: QWidget

Player::Player(  QWidget * parent, Qt::WindowFlags f)
    : QWidget(parent, f)
{
    m_current =NULL;
    last=NULL;

#ifdef REPEAT
    m_repeatCheck = false;
#endif
    m_mediaPlayer = new QMediaPlayer();
    connect(m_mediaPlayer,SIGNAL(stateChanged(QMediaPlayer::State)),this,SLOT(playerStatusChanged(QMediaPlayer::State)));
    connect(m_mediaPlayer,SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)),this,SLOT(statusChanged(QMediaPlayer::MediaStatus)));

    connect(m_mediaPlayer,SIGNAL(currentMediaChanged(QMediaContent)),this,SLOT(sourceChanged(QMediaContent)));
    mypreference = Preference_data::getInstance();
    myPlaylist = Playlist::getInstance();
    m_listposition = -1;
    position = 0;
    selectedReadMode = mypreference->getSelectedReadMode();

    setupActions();

    //readSettings();
    setupUi();
    m_seekSlider->setMaximum(0);

}
开发者ID:obiwankennedy,项目名称:audioPlayer,代码行数:27,代码来源:player.cpp


示例6: TorrentActivityInterface

    TorrentActivity::TorrentActivity(Core* core, GUI* gui, QWidget* parent)
        : TorrentActivityInterface(i18n("Torrents"), QStringLiteral("ktorrent"), parent),
          core(core),
          gui(gui)
    {
        setXMLGUIFile(QStringLiteral("kttorrentactivityui.rc"));
        QWidget* view_part = new QWidget(this);
        view = new View(core, gui, view_part);
        connect(view, &View::currentTorrentChanged, this, &TorrentActivity::currentTorrentChanged);
        search_bar = new TorrentSearchBar(view, view_part);
        search_bar->setHidden(true);

        QVBoxLayout* layout = new QVBoxLayout(this);
        layout->setSpacing(0);
        layout->setMargin(0);
        vsplit = new QSplitter(Qt::Vertical, this);
        layout->addWidget(vsplit);
        hsplit = new QSplitter(Qt::Horizontal, vsplit);

        group_switcher = new GroupSwitcher(view, core->getGroupManager(), this);
        connect(core->getQueueManager(), SIGNAL(queueOrdered()), this, SLOT(queueOrdered()));

        QVBoxLayout* vlayout = new QVBoxLayout(view_part);
        vlayout->setSpacing(0);
        vlayout->setMargin(0);
        vlayout->addWidget(group_switcher);
        vlayout->addWidget(search_bar);
        vlayout->addWidget(view);

        group_view = new GroupView(core->getGroupManager(), view, core, gui, hsplit);
        group_view->setupActions(part()->actionCollection());
        connect(group_view, &GroupView::currentGroupChanged, group_switcher, &GroupSwitcher::currentGroupChanged);
        connect(group_view, &GroupView::openTab, group_switcher, &GroupSwitcher::addTab);

        setupActions();

        hsplit->addWidget(group_view);
        hsplit->addWidget(view_part);
        hsplit->setStretchFactor(0, 1);
        hsplit->setStretchFactor(1, 3);
        vsplit->addWidget(hsplit);
        tool_views = new TabBarWidget(vsplit, this);
        vsplit->setStretchFactor(0, 3);
        vsplit->setStretchFactor(1, 1);
        layout->addWidget(tool_views);

        qm = new QueueManagerWidget(core->getQueueManager(), this);
        connect(core, &Core::torrentAdded, qm, &QueueManagerWidget::onTorrentAdded);
        connect(core, &Core::torrentRemoved, qm, &QueueManagerWidget::onTorrentRemoved);
        tool_views->addTab(qm, i18n("Queue Manager"), QStringLiteral("kt-queue-manager"), i18n("Widget to manage the torrent queue"));

        magnet_view = new MagnetView(core->getMagnetManager(), this);
        tool_views->addTab(magnet_view, i18n("Magnet Downloader"), QStringLiteral("kt-magnet"),
                           i18n("Displays the currently downloading magnet links"));

        QueueManager* qman = core->getQueueManager();
        connect(qman, &QueueManager::suspendStateChanged, this, &TorrentActivity::onSuspendedStateChanged);

        queue_suspend_action->setChecked(core->getSuspendedState());
    }
开发者ID:biwin,项目名称:ktorrent,代码行数:60,代码来源:torrentactivity.cpp


示例7: QObject

DiscoverMainWindow::DiscoverMainWindow(CompactMode mode)
    : QObject()
    , m_collection(this)
    , m_engine(new QQmlApplicationEngine)
    , m_mode(mode)
{
    ResourcesModel *m = ResourcesModel::global();
    m->integrateActions(actionCollection());

    setObjectName(QStringLiteral("DiscoverMain"));
    KDeclarative::KDeclarative kdeclarative;
    kdeclarative.setDeclarativeEngine(m_engine);
    kdeclarative.setupBindings();
    
    qmlRegisterType<UnityLauncher>("org.kde.discover.app", 1, 0, "UnityLauncher");
    qmlRegisterType<PaginateModel>("org.kde.discover.app", 1, 0, "PaginateModel");
    qmlRegisterType<IconColors>("org.kde.discover.app", 1, 0, "IconColors");
    qmlRegisterType<KConcatenateRowsProxyModel>("org.kde.discover.app", 1, 0, "KConcatenateRowsProxyModel");

    qmlRegisterSingletonType<SystemFonts>("org.kde.discover.app", 1, 0, "SystemFonts", ([](QQmlEngine*, QJSEngine*) -> QObject* { return new SystemFonts; }));
    qmlRegisterSingletonType(QUrl(QStringLiteral("qrc:/qml/DiscoverSystemPalette.qml")), "org.kde.discover.app", 1, 0, "DiscoverSystemPalette");
    qmlRegisterSingletonType(QUrl(QStringLiteral("qrc:/qml/Helpers.qml")), "org.kde.discover.app", 1, 0, "Helpers");
    qmlRegisterType<QQuickView>();
    qmlRegisterType<QActionGroup>();
    qmlRegisterType<QAction>();
    qmlRegisterUncreatableType<DiscoverMainWindow>("org.kde.discover.app", 1, 0, "DiscoverMainWindow", QStringLiteral("don't do that"));
    setupActions();
    
    //Here we set up a cache for the screenshots
    m_engine->rootContext()->setContextProperty(QStringLiteral("app"), this);

    connect(m_engine, &QQmlApplicationEngine::objectCreated, this, &DiscoverMainWindow::integrateObject);
    m_engine->load(QUrl(QStringLiteral("qrc:/qml/DiscoverWindow.qml")));
}
开发者ID:KDE,项目名称:discover,代码行数:34,代码来源:DiscoverMainWindow.cpp


示例8: QMainWindow

ClintWindow::ClintWindow(QWidget *parent) :
  QMainWindow(parent) {

  QString filename;
  QStringList args = qApp->arguments();
  for (int i = 0; i < args.size(); i++) {
    if (!args[i].startsWith("--") && !args[i].endsWith("clint")) {
      if (filename.length() != 0) {
        QMessageBox::warning(this, "Multiple files to open", "Extra file to open is ignored", QMessageBox::Ok, QMessageBox::Ok);
        continue;
      }
      filename = args[i];
    }
  }

  QFont monospacefont("PT Mono");
  m_scriptEditor = new QTextEdit;
  m_codeEditor = new QTextEdit;
  m_codeEditor->setFont(monospacefont);
  m_scriptEditor->setFont(monospacefont);

  m_reparseCodeButton = new QPushButton("<");
  m_reparseScriptButton = new QPushButton("<");
  connect(m_reparseCodeButton, &QPushButton::clicked, this, &ClintWindow::reparseCode);
  connect(m_reparseScriptButton, &QPushButton::clicked, this, &ClintWindow::reparseScript);

  setWindowTitle("Clint: Chunky Loop INTerface");
  setupActions();
  setupMenus();
  if (filename.length() != 0) {
    openFileByName(filename);
  }
}
开发者ID:ftynse,项目名称:clint,代码行数:33,代码来源:clintwindow.cpp


示例9: KXmlGuiWindow

KTutorialEditor::KTutorialEditor(): KXmlGuiWindow(0),
    mTutorial(0) {

    mTreeView = new AutoExpandableTreeView();
    mTreeView->setObjectName("centralTreeView");
    mTreeView->setWordWrap(true);
    setCentralWidget(mTreeView);

    setupDocks();

    setupActions();

    connect(mEditActions, SIGNAL(cleanChanged(bool)),
            this, SIGNAL(cleanChanged(bool)));
    connect(this, SIGNAL(cleanChanged(bool)),
            this, SLOT(handleUndoStackCleanChanged(bool)));

    //The actions can not be added in setupDocks because setupActions() needs
    //the docks to be created (to get their toggleAction), so it can be called
    //before setupDocks().
    setupActionListWidgets();

    mFileActions->newTutorial();

    ktutorial::KTutorial::self()->setup(this);

    setupGUI();
}
开发者ID:KDE,项目名称:ktutorial,代码行数:28,代码来源:KTutorialEditor.cpp


示例10: QSortFilterProxyModel

UProcessView::UProcessView(QWidget *parent /*= 0*/)
:QTableView(parent)
,killProcessAction_(0)
,selectColumnAction_(0)
{
    //设置Model。
    QSortFilterProxyModel *proxyModel = new QSortFilterProxyModel(this);
    UProcessModel *processModel = new UProcessModel(this);
    connect(this,SIGNAL(processTerminated(unsigned int)),processModel,SLOT(refresh()));

    proxyModel->setSourceModel(processModel);
    proxyModel->setDynamicSortFilter(true);
    proxyModel->setSortCaseSensitivity(Qt::CaseInsensitive);
    setModel(proxyModel);
    setSortingEnabled(true);
    
    setSelectionBehavior(QAbstractItemView::SelectRows);
    horizontalHeader()->setStretchLastSection(true);
    verticalHeader()->hide();
    setSelectionMode(QAbstractItemView::SingleSelection);

    setContextMenuPolicy(Qt::ActionsContextMenu);
    setupActions();

    setupConnections();
}
开发者ID:gauldoth,项目名称:UniCore,代码行数:26,代码来源:UProcessView.cpp


示例11: KXmlGuiWindow

StorageServiceManagerMainWindow::StorageServiceManagerMainWindow()
    : KXmlGuiWindow()
{
    StorageServiceManagerSettingsJob *settingsJob = new StorageServiceManagerSettingsJob;
    PimCommon::StorageServiceJobConfig *configJob = PimCommon::StorageServiceJobConfig::self();
    configJob->registerConfigIf(settingsJob);

    mStorageManager = new PimCommon::StorageServiceManager(this);
    connect(mStorageManager, &PimCommon::StorageServiceManager::servicesChanged, this, &StorageServiceManagerMainWindow::slotServicesChanged);
    mStorageServiceMainWidget = new StorageServiceManagerMainWidget;
    connect(mStorageServiceMainWidget, &StorageServiceManagerMainWidget::configureClicked, this, &StorageServiceManagerMainWindow::slotConfigure);
    connect(mStorageServiceMainWidget->storageServiceTabWidget(), &QTabWidget::currentChanged, this, &StorageServiceManagerMainWindow::slotUpdateActions);
    connect(mStorageServiceMainWidget->storageServiceTabWidget(), &StorageServiceTabWidget::updateStatusBarMessage, this, &StorageServiceManagerMainWindow::slotSetStatusBarMessage);
    connect(mStorageServiceMainWidget->storageServiceTabWidget(), &StorageServiceTabWidget::listFileWasInitialized, this, &StorageServiceManagerMainWindow::slotUpdateActions);
    connect(mStorageServiceMainWidget->storageServiceTabWidget(), &StorageServiceTabWidget::selectionChanged, this, &StorageServiceManagerMainWindow::slotUpdateActions);
    setCentralWidget(mStorageServiceMainWidget);

    mNetworkConfigurationManager = new QNetworkConfigurationManager();
    connect(mNetworkConfigurationManager, &QNetworkConfigurationManager::onlineStateChanged, this, &StorageServiceManagerMainWindow::slotSystemNetworkOnlineStateChanged);

    setupActions();
    setupGUI(Keys | StatusBar | Save | Create);
    readConfig();
    mStorageServiceMainWidget->storageServiceTabWidget()->setListStorageService(mStorageManager->listService());
    slotUpdateActions();
    initStatusBar();
    slotSystemNetworkOnlineStateChanged(mNetworkConfigurationManager->isOnline());
}
开发者ID:KDE,项目名称:kdepim,代码行数:28,代码来源:storageservicemanagermainwindow.cpp


示例12: k

PencilTool::PencilTool() : k(new Private)
{
    k->configurator = 0;
    k->item = 0;

    setupActions();
}
开发者ID:hpsaturn,项目名称:tupi,代码行数:7,代码来源:penciltool.cpp


示例13: TupToolPlugin

PencilTool::PencilTool() : TupToolPlugin(), k(new Private)
{
    k->configurator = 0;
    k->item = 0;

    setupActions();
}
开发者ID:xtingray,项目名称:tupi,代码行数:7,代码来源:penciltool.cpp


示例14: QMainWindow

Kaqtoos::Kaqtoos()
	: QMainWindow(),
	  downloadManager(this),
	  isOAuthUserConnected(false)
{
	oauthRequest = new KQOAuthRequest();
	oauthManager = new KQOAuthManager(this);

	setupUi();
	setupActions();
	setupConnections();
	
	publicXmlUrls <<
		QString("http://api.kactoos.com/br/api/products/get-product-list/format/xml/oauth_consumer_key/%1/limit/30/orderby/new-products").arg(consumerKey) <<
		QString("http://api.kactoos.com/br/api/products/get-product-list/format/xml/oauth_consumer_key/%1/limit/30/orderby/popular").arg(consumerKey) <<
		QString("http://api.kactoos.com/br/api/products/get-product-list/format/xml/oauth_consumer_key/%1/limit/30/orderby/economic").arg(consumerKey);

	// start downloading
	downloadManager.append(publicXmlUrls);

	// NOTE: just for test
	QGraphicsScene *scene = new QGraphicsScene();

	ProductItem *item = new ProductItem();
	item->setImage("http://www.kactoos.com/libraries/thumb/?src=/images/products/5791_3556942391.jpg");
	
	scene->addItem(item);
	allProductsView->setScene(scene);

	setWindowTitle(tr("KaQToos"));
	resize(QSize(600, 480));
}
开发者ID:ftonello,项目名称:KaQToos,代码行数:32,代码来源:kaqtoos.cpp


示例15: QMainWindow

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent)

{
    /* Window Title */
    setWindowTitle(tr(APPLICATION_NAME));

    /* Set sticky places for dockwidgets */
    setCorner(Qt::TopLeftCorner, Qt::TopDockWidgetArea);
    setCorner(Qt::TopRightCorner, Qt::RightDockWidgetArea);
    setCorner(Qt::BottomLeftCorner, Qt::BottomDockWidgetArea);
    setCorner(Qt::BottomRightCorner, Qt::BottomDockWidgetArea);

    /*
     * Create Mastercontroller (zone -1)
     * Controls all zones on all bridges.
     */
    master = new SingleController("Master", -1, this);
    masterDockWidget = new QDockWidget(tr("Master Controller"), this);
    masterDockWidget->setWidget(master);
    masterDockWidget->setMaximumWidth(200);
    addDockWidget(Qt::TopDockWidgetArea, masterDockWidget);

    /* Audio Controller */
    audio = new audioController(this);
    addDockWidget(Qt::TopDockWidgetArea, audio);

    /* Connect Audio to Master .*/
    connect(audio, SIGNAL(setRandomSame()), master, SLOT(setRandomExt()));
    connect(audio, SIGNAL(flash()), master, SLOT(flash()));
    connect(audio, SIGNAL(flashRandom()), master, SLOT(flashRandom()));
    connect(audio, SIGNAL(fade10()), master, SLOT(fade10Ext()));
    connect(audio, SIGNAL(fade20()), master, SLOT(fade20Ext()));

    presetController = new PresetController(this);
    presetController->setMinimumWidth(230);
    addDockWidget(Qt::TopDockWidgetArea, presetController);
    connect(presetController, SIGNAL(createPreset()), this, SLOT(getPreset()));
    connect(this, SIGNAL(presetAvailable(Preset*)), presetController, SLOT(addPreset(Preset*)));
    connect(presetController, SIGNAL(setPreset(Preset*)), this, SLOT(setPreset(Preset*)));

    /* Center the window. */
    QWidget *w = window();
    w->setGeometry(QStyle::alignedRect(Qt::LeftToRight, Qt::AlignCenter, w->size(), qApp->desktop()->availableGeometry()));

    /* Create Bridge Discovery Dialog. */
    MiLightDiscover *d = new MiLightDiscover(this);
    connect(d, SIGNAL(selectedDevices(QStringList, bool)), this, SLOT(setupControllers(QStringList, bool)));
    d->exec();

    setupActions();
    setupToolBar();
    setupMenuBar();
    setupStatusBar();

    loadSettings();

    delete d;

}
开发者ID:nzhome,项目名称:lightcontroller,代码行数:60,代码来源:mainwindow.cpp


示例16: QMainWindow

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
	_doExit = false;

	ui->setupUi(this);

	connect(qApp, SIGNAL(commitDataRequest(QSessionManager&)),
	        this, SLOT(commitAppData(QSessionManager&)));

	createTrayIcon();

	_tabsWidgetModifyMapper = new QSignalMapper(this);
	connect(_tabsWidgetModifyMapper, SIGNAL(mapped(QWidget*)),
	        this, SLOT(taskListModified(QWidget*)));

	_tabsWidgetFileNameChangeMapper = new QSignalMapper(this);
	connect(_tabsWidgetFileNameChangeMapper, SIGNAL(mapped(QWidget*)),
	        this, SLOT(taskListFileNameChanged(QWidget*)));

	connect(ui->tabWidget, SIGNAL(tabCloseRequested(int)),
	        this, SLOT(closeTab(int)));

	setupActions();

	loadSettings();

	//setCentralWidget( new TaskTreeWidget(_rootTask, this) );
}
开发者ID:shizarheu,项目名称:Hussein,代码行数:30,代码来源:mainwindow.cpp


示例17: QWidget

SettingsWidget::SettingsWidget(QWidget *parent):
    QWidget( parent )
{
    setupComponents();
    setupActions();
    setupLayout();
}
开发者ID:biosignalpi,项目名称:Version-A1-Rapsberry-PI,代码行数:7,代码来源:settingswidget.cpp


示例18: QObject

////////////////////////////////////////////////////////////////////////////////
/// CTreeNodeEditor::CTreeNodeEditor
///
/// @description    This is the default constructor for the CTreeNodeEditor
///                 class.  It initializes member variables.
/// @pre            None
/// @post           Member variables are initialized.
///
/// @param canvas:  This is a pointer to the canvas.
///
/// @limitations    None
///
////////////////////////////////////////////////////////////////////////////////
CTreeNodeEditor::CTreeNodeEditor( QWidget *canvas )
: QObject(canvas)
{
    m_canvas = canvas;
    m_isAddingChildNode = false;
    m_selNode = NULL;
    m_oldParent = NULL;

    //Setup the line edit used for editing node history values.
    m_historyEdit = new QLineEdit( m_canvas );
    m_historyEdit->setAlignment( Qt::AlignCenter );
    m_historyEdit->hide();
    connect( m_historyEdit, SIGNAL( editingFinished() ), this,
             SLOT( historyDone() ) );

    //Setup the line edit used for editing node names.
    m_nameEdit = new QLineEdit( m_canvas );
    m_nameEdit->setAlignment( Qt::AlignCenter );
    m_nameEdit->hide();
    connect( m_nameEdit, SIGNAL( editingFinished() ), this,
             SLOT( nameDone() ) );

    //Setup the line edit used for editing node values.
    m_valueEdit = new QLineEdit( m_canvas );
    m_valueEdit->setAlignment( Qt::AlignCenter );
    m_valueEdit->hide();
    connect( m_valueEdit, SIGNAL( editingFinished() ), this,
             SLOT( valueDone() ) );

    //Setup actions and menus.
    setupActions();
    setupMenus();
}
开发者ID:raymyers,项目名称:gnat,代码行数:46,代码来源:CTreeNodeEditor.cpp


示例19: KXmlGuiWindow

KTNEFMain::KTNEFMain( QWidget *parent )
  : KXmlGuiWindow( parent )
{
  setupActions();
  setupStatusbar();

  setupTNEF();

  KConfigGroup config( KGlobal::config(), "Settings" );
  mDefaultDir = config.readPathEntry( "defaultdir", "/tmp/" );
  mLastDir = mDefaultDir;

  // create personale temo extract dir
  KStandardDirs::makeDir( KGlobal::dirs()->localkdedir() + "/share/apps/ktnef/tmp" );

  resize( 430, 350 );

  setStandardToolBarMenuEnabled( true );

  createStandardStatusBarAction();

  setupGUI( Keys | Save | Create, "ktnefui.rc" );

  setAutoSaveSettings();
}
开发者ID:chusopr,项目名称:kdepim-ktimetracker-akonadi,代码行数:25,代码来源:ktnefmain.cpp


示例20: QFrame

// - Application constructor
ItemWidget::ItemWidget(QWidget *parent, XDGDesktop item) : QFrame(parent){
  createWidget();
  isDirectory = false;
  if(LUtils::isFavorite(item.filePath)){
    linkPath = item.filePath;
    isShortcut=true;
  }else if( item.filePath.section("/",0,-2)==QDir::homePath()+"/Desktop" ){
    isShortcut = true;
  }else{
    isShortcut = false;
  }
  if(isShortcut){
    name->setToolTip(icon->whatsThis()); //also allow the user to see the full shortcut path
  }
  //Now fill it appropriately
  icon->setPixmap( LXDG::findIcon(item.icon,"preferences-system-windows-actions").pixmap(64,64) );
      text = item.name;
      if(!item.genericName.isEmpty() && item.name!=item.genericName){ text.append("<br><i> -- "+item.genericName+"</i>"); }
      name->setText(text);
      name->setToolTip(item.comment);
  this->setWhatsThis(item.name);
  icon->setWhatsThis(item.filePath);
  iconPath = item.icon;
  //Now setup the buttons appropriately
  setupContextMenu();
  setupActions(item);
}
开发者ID:abishai,项目名称:lumina,代码行数:28,代码来源:ItemWidget.cpp



注:本文中的setupActions函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ setupCamera函数代码示例发布时间:2022-05-30
下一篇:
C++ setup函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap