JBoolean
SVNPropertiesList::RemoveNextProperty()
{
	if (!itsRemovePropertyCmdList->IsEmpty())
		{
		const JString cmd = *(itsRemovePropertyCmdList->FirstElement());
		itsRemovePropertyCmdList->DeleteElement(1);

		JSimpleProcess* p;
		const JError err = JSimpleProcess::Create(&p, cmd, kJTrue);
		if (err.OK())
			{
			itsProcessList->Append(p);
			ListenTo(p);
			return kJTrue;
			}
		else
			{
			err.ReportIfError();
			return kJFalse;
			}
		}
	else
		{
		if ((GetDirector())->OKToStartActionProcess())
			{
			RefreshContent();
			}

		(GetDirector())->ScheduleStatusRefresh();
		return kJTrue;
		}
}
Example #2
0
void ImageTab::ImageFileModified()
{
    const QFileInfo fileInfo = QFileInfo( m_Resource.GetFullPath() );

    const qint64 lastModified = fileInfo.lastModified().toMSecsSinceEpoch();
    if ( lastModified == m_RefreshedTimestamp )
    {
        return;
    }

    // It's best to wait a bit before triggering the actual page refresh,
    // in case the file has not been completely written to disk. The image tab will take
    // a bit to become up-to-date with the file on disk, but it's just an informational tab
    // and instant reaction to file changes is not critical.
    // - If the file is empty, then the file-modified signal was received
    //   exactly when the editor application truncated the file, but before
    //   writing any data to it, so we'll be extra patient.
    // - If the file is larger than 512k (unlikely for images in an ebook, but possible),
    //   it might get even larger than that, and the editor application
    //   might take a long time (ms-wise) to write it, so we'll be extra patient again.
    // The values below are mostly guesswork derived from how things go on my machine;
    // they may not work just as well on slower (disk/cpu) systems.

    const int delay = 500 + ( fileInfo.size() == 0 ? 750 : 0); // + ( fileInfo.size() > 512 * 1024 ? 500 : 0 );

    if ( QDateTime::currentMSecsSinceEpoch() - lastModified < delay )
    {
        QTimer::singleShot( delay, this, SLOT( ImageFileModified() ) );
    }
    else
    {
        QTimer::singleShot( 0, this, SLOT( RefreshContent() ) );
    }
}
Example #3
0
void InputWidget::RenderVertices(std::vector<Vertex_2f_2f_4f_1f>& vertices)
{
	//RenderSolid(GetViewport()->GetTransform(), GetBounds(), glm::vec4(1, 1, 1, 0.7f));
	RefreshContent();

	if (_inputEditor == nullptr)
		StringWidget::RenderVertices(vertices);
}
Example #4
0
AVTab::AVTab(Resource &resource, QWidget *parent)
    : ContentTab(resource, parent),
      m_WebView(new QWebView(this))
{
    m_WebView->setContextMenuPolicy(Qt::NoContextMenu);
    m_WebView->setFocusPolicy(Qt::NoFocus);
    m_WebView->setAcceptDrops(false);
    m_Layout.addWidget(m_WebView);
    ConnectSignalsToSlots();
    RefreshContent();
}
Example #5
0
ImageTab::ImageTab( ImageResource& resource, QWidget *parent )
    :
    ContentTab( resource, parent ),
    m_WebView(*new QWebView(this))
{
    m_WebView.setContextMenuPolicy(Qt::NoContextMenu);
    m_WebView.setFocusPolicy(Qt::NoFocus);
    m_WebView.setAcceptDrops(false);

    m_Layout.addWidget( &m_WebView);

    // Set the Zoom factor but be sure no signals are set because of this.
    SettingsStore settings;
    m_CurrentZoomFactor = settings.zoomImage();
    Zoom();

    ConnectSignalsToSlots();

    RefreshContent();
}
Example #6
0
void AVTab::ConnectSignalsToSlots()
{
    connect(&m_Resource, SIGNAL(ResourceUpdatedOnDisk()), this, SLOT(RefreshContent()));
    connect(&m_Resource, SIGNAL(Deleted(Resource)), this, SLOT(Close()));
}
Example #7
0
void Sidebar::DoEnable(bool)
{
    RefreshContent();
}
Example #8
0
void Sidebar::SetSelectedItem(Catalog *catalog, CatalogItem *item)
{
    m_catalog = catalog;
    m_selectedItem = item;
    RefreshContent();
}
Example #9
0
void Sidebar::SetSelectedItem(const CatalogPtr& catalog, const CatalogItemPtr& item)
{
    m_catalog = catalog;
    m_selectedItem = item;
    RefreshContent();
}