Exemplo n.º 1
0
void KraftView::setup( DocGuardedPtr doc )
{
  KraftViewBase::setup(doc);

  setupDocHeaderView();
  setupItems();
  setupFooter();
  setCaption( m_doc->docIdentifier() );
  slotSwitchToPage( KraftDoc::Header );
}
Exemplo n.º 2
0
CloudView::CloudView(QWidget *parent)
    : QWidget(parent),
      clone_task_dialog_(NULL)

{
    setupUi(this);

    // seahub_messages_monitor_ = new SeahubMessagesMonitor(this);
    // mSeahubMessagesBtn->setVisible(false);

    layout()->setContentsMargins(1, 0, 1, 0);

    // Setup widgets from top down
    setupHeader();

    createAccountView();

    createTabs();

    // tool bar have to be created after tabs, since some of the toolbar
    // actions are provided by the tabs
    createToolBar();

    setupDropArea();

    setupFooter();

    QVBoxLayout *vlayout = (QVBoxLayout *)layout();
    vlayout->insertWidget(kIndexOfAccountView, account_view_);
    vlayout->insertWidget(kIndexOfToolBar, tool_bar_);
    vlayout->insertWidget(kIndexOfTabWidget, tabs_);

    resizer_ = new QSizeGrip(this);
    resizer_->resize(resizer_->sizeHint());

    refresh_status_bar_timer_ = new QTimer(this);
    connect(refresh_status_bar_timer_, SIGNAL(timeout()), this, SLOT(refreshStatusBar()));

    AccountManager *account_mgr = seafApplet->accountManager();
    connect(account_mgr, SIGNAL(accountsChanged()),
            this, SLOT(onAccountChanged()));

#if defined(Q_OS_MAC)
    mHeader->setVisible(false);
#endif

    connect(ServerStatusService::instance(), SIGNAL(serverStatusChanged()),
            this, SLOT(refreshServerStatus()));
    connect(CustomizationService::instance(), SIGNAL(serverLogoFetched(const QUrl&)),
            this, SLOT(onServerLogoFetched(const QUrl&)));

    QTimer::singleShot(0, this, SLOT(onAccountChanged()));
}
Exemplo n.º 3
0
CloudView::CloudView(QWidget *parent)
    : QWidget(parent),
      in_refresh_(false),
      list_repo_req_(NULL),
      clone_task_dialog_(NULL)

{
    setupUi(this);

    // seahub_messages_monitor_ = new SeahubMessagesMonitor(this);
    mSeahubMessagesBtn->setVisible(false);

    setupHeader();
    createRepoModelView();
    createLoadingView();
    createLoadingFailedView();
    mStack->insertWidget(INDEX_LOADING_VIEW, loading_view_);
    mStack->insertWidget(INDEX_LOADING_FAILED_VIEW, loading_failed_view_);
    mStack->insertWidget(INDEX_REPOS_VIEW, repos_tree_);

    createToolBar();
    updateAccountInfoDisplay();
    prepareAccountButtonMenu();

    setupDropArea();
    setupFooter();

    mDropArea->setVisible(false); //disk42

    resizer_ = new QSizeGrip(this);
    resizer_->resize(resizer_->sizeHint());

    refresh_status_bar_timer_ = new QTimer(this);
    connect(refresh_status_bar_timer_, SIGNAL(timeout()), this, SLOT(refreshStatusBar()));

    refresh_timer_ = new QTimer(this);
    connect(refresh_timer_, SIGNAL(timeout()), this, SLOT(refreshRepos()));

    connect(seafApplet->accountManager(), SIGNAL(accountAdded(const Account&)),
            this, SLOT(setCurrentAccount(const Account&)));

    connect(seafApplet->accountManager(), SIGNAL(accountAdded(const Account&)),
            this, SLOT(updateAccountMenu()));

    connect(seafApplet->accountManager(), SIGNAL(accountRemoved(const Account&)),
            this, SLOT(updateAccountMenu()));
#ifdef Q_WS_MAC
    mHeader->setVisible(false);
#endif
}
Exemplo n.º 4
0
CloudView::CloudView(QWidget* parent)
    : QWidget(parent), clone_task_dialog_(NULL)

{
    setupUi(this);

    int marginTop = 0;
    if (shouldUseFramelessWindow()) {
        marginTop = 0;
    }
#ifdef Q_OS_MAC
    marginTop = 0;
#endif

    layout()->setContentsMargins(1, marginTop, 1, 0);

    // Setup widgets from top down
    setupHeader();

    createAccountView();

    createTabs();

    // tool bar have to be created after tabs, since some of the toolbar
    // actions are provided by the tabs
    // createToolBar();

    setupDropArea();

    setupFooter();

    QVBoxLayout* vlayout = (QVBoxLayout*)layout();
    vlayout->insertWidget(kIndexOfAccountView, account_view_);
    vlayout->insertWidget(kIndexOfTabWidget, tabs_);

    if (shouldUseFramelessWindow()) {
        resizer_ = new QSizeGrip(this);
        resizer_->resize(resizer_->sizeHint());
    }

    refresh_status_bar_timer_ = new QTimer(this);
    connect(refresh_status_bar_timer_, SIGNAL(timeout()), this,
            SLOT(refreshStatusBar()));

    AccountManager* account_mgr = seafApplet->accountManager();
    connect(account_mgr, SIGNAL(accountsChanged()), this,
            SLOT(onAccountChanged()));
    connect(account_mgr, SIGNAL(accountInfoUpdated(const Account&)), this,
            SLOT(onAccountInfoUpdated(const Account&)));

    if (!shouldUseFramelessWindow()) {
        mHeader->setVisible(false);
    }

    connect(ServerStatusService::instance(), SIGNAL(serverStatusChanged()),
            this, SLOT(refreshServerStatus()));
    connect(CustomizationService::instance(),
            SIGNAL(serverLogoFetched(const QUrl&)), this,
            SLOT(onServerLogoFetched(const QUrl&)));

    QTimer::singleShot(0, this, SLOT(onAccountChanged()));
}