Esempio n. 1
0
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    mDialog(0),
    mWebView(0),
    mCurrentNoteIndex(0)
{
    loadSettings();
    checkExistenceTempImgDir();

    setWindowTitle(tr("Zoth Reader"));
    setWindowIcon(QIcon(":/images/green_book_zoth.png"));
    createCentralWidget();
    //showFullScreen();
    showMaximized();
    setContextMenuPolicy(Qt::NoContextMenu);
    mDialog = new SettingsDialog();

    connect(&mEnExport, SIGNAL(exported()), SLOT(notesReloaded()));
    connect(&mEnExport, SIGNAL(exported()), SLOT(displayNotes()));
    connect(&mEnExport, SIGNAL(exported()), SLOT(refreshNavigationLabel()));
    connect(mDialog, SIGNAL(accepted()), SLOT(saveDialogSettings()));

    if(isFirstRun){
        HelloDialog* helloDialog = new HelloDialog(this);
        QPalette palette;
        palette.setColor(QPalette::Window, QColor(mBgColor));
        helloDialog->setPalette(palette);
        helloDialog->setBackgroundRole(QPalette::Window);
        helloDialog->activateWindow();
        helloDialog->show();
        connect(helloDialog, SIGNAL(tagAccepted(QString)), SLOT(setTagAndReload(QString)));
    }else{
        reloadNotes();
    }
}
Esempio n. 2
0
STDMETHODIMP TffdshowPageBase::Deactivate(void)
{
    deci->setOnChangeMsg(NULL, 0);
    deci->setOnFrameMsg(NULL, 0);

    if (m_hwnd == NULL) {
        return E_UNEXPECTED;
    }

    // Remove WS_EX_CONTROLPARENT before DestroyWindow call
    DWORD dwStyle = GetWindowLong(m_hwnd, GWL_EXSTYLE);
    dwStyle = dwStyle&~WS_EX_CONTROLPARENT;
    // Set m_hwnd to be NULL temporarily so the message handler
    // for WM_STYLECHANGING doesn't add the WS_EX_CONTROLPARENT
    // style back in
    HWND hwnd = m_hwnd;
    m_hwnd = NULL;
    SetWindowLong(hwnd, GWL_EXSTYLE, dwStyle);
    m_hwnd = hwnd;
    // Destroy the dialog window
    DestroyWindow(m_hwnd);
    m_hwnd = NULL;

    saveDialogSettings();
    deci->setCfgDlgHwnd(NULL);
    return S_OK;
}
CSearchDialog::~CSearchDialog() {
    saveDialogSettings();
    m_staticDialog = 0;
}
CConfigurationDialog::~CConfigurationDialog() {
    saveDialogSettings();
}
BtModuleManagerDialog::~BtModuleManagerDialog() {
    saveDialogSettings();
    m_staticModuleManagerDialog = 0;
}