KWindowInfo

svn path=/trunk/KDE/kdebase/workspace/; revision=651965
This commit is contained in:
Aaron J. Seigo 2007-04-09 18:30:03 +00:00
parent 4fa16a5039
commit 81f00aa8b8
4 changed files with 8 additions and 8 deletions

View file

@ -65,7 +65,7 @@ class DetectDialog
QString selectedTitle() const;
Rules::StringMatch titleMatch() const;
QByteArray selectedMachine() const;
const KWM::WindowInfo& windowInfo() const;
const KWindowInfo& windowInfo() const;
signals:
void detectionDone( bool );
protected:
@ -84,11 +84,11 @@ class DetectDialog
QByteArray machine;
DetectWidget* widget;
QDialog* grabber;
KWM::WindowInfo info;
KWindowInfo info;
};
inline
const KWM::WindowInfo& DetectDialog::windowInfo() const
const KWindowInfo& DetectDialog::windowInfo() const
{
return info;
}

View file

@ -69,7 +69,7 @@ static void saveRules( const QList< Rules* >& rules )
static Rules* findRule( const QList< Rules* >& rules, Window wid, bool whole_app )
{
KWM::WindowInfo info = KWM::windowInfo( wid,
KWindowInfo info = KWM::windowInfo( wid,
NET::WMName | NET::WMWindowType,
NET::WM2WindowClass | NET::WM2WindowRole | NET::WM2ClientMachine );
if( !info.valid()) // shouldn't really happen

View file

@ -588,7 +588,7 @@ void RulesWidget::detected( bool ok )
machine_match->setCurrentIndex( Rules::UnimportantMatch );
machineMatchChanged();
// prefill values from to window to settings which already set
const KWM::WindowInfo& info = detect_dlg->windowInfo();
const KWindowInfo& info = detect_dlg->windowInfo();
prefillUnusedValues( info );
}
delete detect_dlg;
@ -606,7 +606,7 @@ void RulesWidget::detected( bool ok )
#define LINEEDIT_PREFILL( var, func, info ) GENERIC_PREFILL( var, func, info, setText )
#define COMBOBOX_PREFILL( var, func, info ) GENERIC_PREFILL( var, func, info, setCurrentIndex )
void RulesWidget::prefillUnusedValues( const KWM::WindowInfo& info )
void RulesWidget::prefillUnusedValues( const KWindowInfo& info )
{
LINEEDIT_PREFILL( position, positionToStr, info.frameGeometry().topLeft() );
LINEEDIT_PREFILL( size, sizeToStr, info.frameGeometry().size() );
@ -673,7 +673,7 @@ bool RulesWidget::finalCheck()
void RulesWidget::prepareWindowSpecific( WId window )
{
tabs->setCurrentIndex( 2 ); // geometry tab, skip tabs for window identification
KWM::WindowInfo info( window, -1U, -1U ); // read everything
KWindowInfo info( window, -1U, -1U ); // read everything
prefillUnusedValues( info );
}

View file

@ -89,7 +89,7 @@ class RulesWidget
private:
int desktopToCombo( int d ) const;
int comboToDesktop( int val ) const;
void prefillUnusedValues( const KWM::WindowInfo& info );
void prefillUnusedValues( const KWindowInfo& info );
DetectDialog* detect_dlg;
bool detect_dlg_ok;
};